Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 158 additions & 0 deletions ont-epon/free_iliad.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,161 @@ Iliad's (Italy) PON network is delivered through two types of technology: GPON o
Using a Xilinx Kintex 7 FPGA with an integrated logic analyzer, an optical module has been connected to the FPGA's transceiver. The transceiver synchronized successfully and the sync header sequence was the one expected for 10G-EPON: a FEC codeword is a sequence of 31 words. Those words have a sync header binary value of `10` or `01` repeated 27 times corresponding to the original message plus `00, 11, 11, 00` corresponding to the FEC parity information. Discarding the latter part and descrambling the remaining data, the packets have been retrieved.

As an example, a packet starts with `55 d5 55 1b 3c 07 5f` in hex, which corresponds to a DPoE (10G) preamble (actually it's missing one starting `0x55` byte but the CRC8 at the end is correct nonetheless).

## The 10G-EPON / DPoE network

The EPON network is 10G-EPON managed with DPoE (SIEPON Package-A, see [EPON standard](/epon-standard)), the same in Free's network in France and Iliad's in Italy. The difference is in the access: in some areas Iliad does not use its own EPON but the GPON of Open Fiber or FiberCop. This section describes the EPON network as it looks to an ONU on the line: MPCP, the DPoE OAM dialogue, a Free-specific OAM, the downstream encryption, and the firmware the OLT pushes.

What a router replacing the Freebox needs (VLANs, DHCPv6, IPv4) is on the [router page](/router/free_iliad). Chip-level facts (registers, CLI, flash) are on the device page of the ONU used for these measurements, the [F-MDCONU3A](/epon/free_iliad_F-MDCONU3A).

::: info Note
Everything below was observed on a live Free line in France. The attribute, field and frame names come from reverse engineering, not from a Free or Broadcom document; they are described by their value and behaviour. Items from a published standard (IEEE 802.3av, DPoE) are marked as such. Identity values (MAC addresses, LLIDs, serial numbers, IPv6 prefixes, the line's IPv4, the OLT name) are shown as placeholders such as `<Freebox MAC>`. Encryption keys are never given, only the mechanism. Readings that are not proven are collected under [Open questions](#open-questions).
:::

### Physical layer and MPCP

The line is 10 Gb/s downstream, 1 Gb/s upstream (10/1GBASE-PRX). The downstream is 64b/66b at 1577 nm (IEEE 802.3av; not measured here). The upstream is a 1.25 GBd burst at 1310 nm: the SFF-8472 EEPROM of the ONU's optical module reads a nominal bit rate near 1.3 Gb/s and a Tx wavelength of 1310 nm.

MPCP (IEEE 802.3 clause 64/77) behaves as on any EPON line:

| Item | Observed on the line |
| ---- | -------------------- |
| Broadcast channel | the OLT's broadcast frames (discovery GATE, slow-protocol OAM) are on the 10G broadcast LLID `0x7FFE`, in clear |
| Discovery GATE | about 2 per second; the Discovery Information field alternates between `0x0013` and `0x0023` |
| Registration | the ONU answers a discovery GATE with `REGISTER_REQ` (flags 1, laser on/off `0x20` TQ, a random delay in the window). The OLT answers `REGISTER` (flags 3) with the assigned `<LLID>`, sync time and laser on/off both `0x20` TQ |
| `REGISTER_ACK` | sent by the EPON MAC hardware, before the CPU sees the `REGISTER` |
| After registration | unicast GATEs at 5,300 to 6,300 per second; REPORTs are produced by the MAC alone, with no CPU involvement |
| OAM discovery | starts about 2 s after the `REGISTER`. The Information OAMPDU flags go `0x0008` (local evaluating) → `0x0010` (local stable) → `0x0050` (local and remote stable). Once registered, the OLT sends an Information OAMPDU about once per second |
| Deregistration | the OLT sends `REGISTER` with flags 2, three times; the ONU must restart discovery |

MPCP registration alone gives no service: what the OLT does next depends on the identity the ONU presents.

### Identity (MAC / serial) and the OLT

An ONU presents its MPCP MAC address at registration; the OLT then reads its manufacturer information by OAM (`D7/0006`, a 16-byte string specific to the unit, such as a serial number). The OLT registers **any** MAC at MPCP level; a Free OUI is not required. Only an identity attached to the subscription of that line gets OAM and service:

| Identity presented | MPCP registration | OAM / DPoE provisioning | Rate profile | Deregistration |
| ------------------ | ----------------- | ----------------------- | ------------ | -------------- |
| The Freebox of the line | yes | complete, with the extra steps marked "Freebox only" below | the profile of the subscription | none, the link stays in service |
| An ONU attached to the same subscription earlier (with a previous Freebox) | yes | complete, OAM starts about 2 s after the `REGISTER` | much lower than the Freebox profile | none, the link stays in service |
| A random, locally administered MAC | yes | **none** | no service | about 8 s after the `REGISTER` |
| A second-hand ONU that had been attached to another subscriber's line | yes | **none** | no service | about 20 s after the `REGISTER` |

More than one identity can therefore be attached to one subscription: on the line observed, the identity of an ONU used with a previous Freebox was still provisioned while the current Freebox, which has its own identity, was the device in service. The OLT serves each of them, with a rate profile of its own (see [Per-identity rate profile](/router/free_iliad#per-identity-rate-profile)).

::: danger Warning
Only use an identity that belongs to your own subscription, and never have two devices with the same identity on the fibre at the same time: unplug the Freebox before presenting its identity.
:::

### DPoE extended OAM

Provisioning uses the DPoE extended OAM (organization-specific OAMPDU, OUI `00-10-00`) over IEEE 802.3 clause 57 OAM. Frames go to `01:80:C2:00:00:02`, EtherType `0x8809`, subtype `0x03`, code `0xFE`. Two other organization-specific OAMs share the channel: the Teknovus/Broadcom OUI `00-0D-B6`, which the OLT uses to read the optical module, and Free's own OUI `00-07-CB`, described [below](#the-free-specific-oam).

After `FE` and the OUI comes a one-byte DPoE opcode, then the TLVs:

| Opcode | Meaning | TLV layout |
| ------ | ------- | ---------- |
| `01` | Get request | `<branch(1)> <leaf(2)>`, repeated |
| `02` | Get response | `<branch> <leaf> <len(1)> <value>`, repeated |
| `03` | Set request | `<branch> <leaf> <len(1)> <value>`, repeated |
| `04` | Set response | `<branch> <leaf> <status(1)>`, no length field, one entry per request TLV, same order |
| `08` | Key exchange (ONU to OLT only, see [encryption](#downstream-encryption)) | `<keynum(1)> 10 <16-byte key>` |

A Set-response status of `0x80` is success. Answering a mandatory Set with a non-success status makes the OLT deregister the ONU about 10 ms later. A `D6` branch sets the object context of the TLVs that follow (`D6/0001` the PON port, `D6/0002` the link, `D6/0003` the user port); `D7` carries attributes, `D9` carries actions, and a `09` branch carries the user-port enable.

Attributes the Free OLT reads or writes:

| Attribute | Direction | Use on this line |
| --------- | --------- | ---------------- |
| `D7/0006`, `D7/0003`, `D7/000E` | Get | manufacturer information, firmware information, a short version string |
| `D7/0012`, `D7/0015` | Get | model number, software bundle; asked only of the Freebox identity |
| `D7/0402` = `2` | Set | encryption mode "10Down" (downstream encryption on the 10G channel) |
| `D7/0401` = `0x0258` | Set | key expiry time, 600 s |
| `D7/010D` | Set | queue provisioning of the link and the user port |
| `D7/0501` + `D9/0502` | Set | the classifier rules: C-VLANs 835 and 836 on the PON-port and user-port objects |
| `D7/000B` | Set | upstream REPORT threshold, `0x8000` |
| `09/0005` | Set | `1`, then `2` (disable, then enable, of the user port) |
| `D9/0601` | Set (action) | **Enable User Traffic** |

**Provisioning order.** The OLT follows this order from the `REGISTER`; the whole dialogue lasts a few seconds:

| # | OLT action | ONU answer |
| -: | ---------- | ---------- |
| 1 | `REGISTER` (flags 3), then OAM discovery | `REGISTER_ACK` is hardware |
| 2 | capability Gets (`D7/0006`, `D7/0003`, `D7/000E`; for the Freebox also `D7/0012`, `D7/0015`; for other identities, seven Teknovus Gets that read the optical module) | answer each |
| 3 | (Freebox only) Free OAM type `2` | answer (see below) |
| 4 | Set `D7/0402` = 2, `D7/0401` = 600 s, `D7/010D` | `0x80`; install a downstream key and send it upstream |
| 5 | Set `09/0005` = 1 (user port disabled) | `0x80` |
| 6 | Set the user-port rules (`D7/0501`, `D9/0502`) | `0x80` on every entry |
| 7 | Set `D7/000B` (report threshold) | `0x80` |
| 8 | Set the PON-port rules (`D7/0501`, `D9/0502`) | `0x80` on every entry |
| 9 | Set `09/0005` = 2 (user port enabled) | `0x80` |
| 10 | (Freebox only) Free OAM type `0x10` | answer (see below) |
| 11 | Set `D9/0601` (Enable User Traffic), about 10 ms after step 9 | `0x80`; the data path opens |

Answering `0x80` to every step, as the vendor firmware does, is enough to pass: the OLT does not check that the rules or thresholds were applied. **`D9/0601` is what starts user traffic** — before it the link is registered and provisioned but nothing is forwarded; after it, frames flow PON ↔ user port.

**Answers that cause a deregistration** (the OLT reacts within about 10 ms with `REGISTER` flags 2):

* a mandatory Set answered with a non-success status (seen on `09/0005`, the `D7/0501` rule batch, and `D9/0601`);
* a Get of `D7/0012` or `D7/0015` missing or not valid (about 11 ms after the Get).

Under the Freebox identity, if the Free OAM type `0x10` is not answered, the link still registers and is fully provisioned, then is deregistered about 2 s after `09/0005` = 2 without ever receiving `D9/0601`.

### The Free-specific OAM

Besides DPoE, the Free OLT uses a private OAM: an organization-specific OAMPDU (code `0xFE`) with Free's OUI `00-07-CB`. After the OUI the body is a fixed `7E 91 FA 1F`, a 32-bit type, a 16-bit length, `00 00`, then `<length>` bytes.

Broadcast on `0x7FFE`, in clear, a few per second:

| Type | Body |
| ---: | ---- |
| 1 | the OLT's name, as an ASCII string |
| 4 | empty |
| 5 | a list of 8-byte entries (`<MAC(6)> 01 00`) |

Addressed to a registered link under the Freebox identity, flags `0x0050`, during provisioning:

| Type | When | Length | Answer the OLT accepts |
| ---: | ---- | -----: | ---------------------- |
| `2` | ~10 ms after the last capability Get, before `D7/0402` | 0 | an unmodified echo from the ONU's MAC; `D7/0402` follows ~45 ms later. With no answer the OLT waits ~3.8 s |
| `0x10` | ~10 ms after `09/0005` = 2 | 4, body `00 00 00 01` | the same frame from the ONU's MAC with the **type word set to `80 00 00 10`**, length 4, body `00 00 00 01`. `D9/0601` then arrives ~10 ms later |

Any other answer to type `0x10` (an unmodified echo, another type word, another length or body) is refused: `REGISTER` flags 2 follows after ~10 ms. The vendor firmware does not contain this protocol: the constant `7E 91 FA 1F` and the type words are absent from every firmware image.

### Downstream encryption

The downstream of every ONU on the splitter is encrypted by the OLT, Ethernet addresses included; only the broadcast LLIDs are in clear. An ONU cannot read another subscriber's downstream.

The OLT turns encryption on with `D7/0402` = `2` ("10Down") and `D7/0401` = `0x0258` (key expiry time, 600 s), in the same burst. In this mode **the ONU supplies the key**: the OLT runs no exchange of its own and never acknowledges the key. The ONU draws a 16-byte key, picks the key number the OLT is not currently using for its LLID, installs it in its downstream-decrypt path, and sends it upstream once in a DPoE Key Exchange OAMPDU (opcode `08`). The OLT then switches its frames for that LLID to the new key number in under a second; the frame preamble names the key number used, so two keys can coexist during the changeover. The cipher is AES-128 in counter mode over DA..FCS (per DPoE-SP-SEC; not measured independently).

**Rotation.** The OLT asks for a 600 s key expiry; the ONU draws a new key at each expiry and sends it the same way. The key number alternates at each exchange and the OLT is on the new key within a second, without interrupting traffic. A shorter period (60 s) is accepted as well. An ONU that never renewed its key was not deregistered after two expiries (DPoE-SP-SEC §7.1.9 only says the OLT MAY deregister it).

The downstream is encrypted at both user-port speeds, 1G and 10G. The silicon receive-key path (register map) is on the [F-MDCONU3A](/epon/free_iliad_F-MDCONU3A#downstream-encryption-registers) page.

### Firmware updates pushed by the OLT

The Free OLT can rewrite an ONU's flash over OAM. The push starts **less than a second** after the ONU appears on the line, over the vendor's multi-path OAM channel (a file-transfer start, data chunks, then an OAM reboot request). The offered file is a bootloader image matching the version the unit shipped with. On the vendor firmware the console shows `Copying to Boot...` within a second of the fibre being plugged, `Upgrade OK` about 78 s later, then a reset into the vendor bootloader: a replaced boot chain is overwritten.

::: danger Warning
Do not boot the unmodified vendor firmware on a live Free fibre if you want to keep your own bootloader or image. The update arrives too fast to block from a CLI. Protect the image itself: run a firmware that starts listen-only and refuses the transfer chunks and the OAM reboot request. Faking the version the OLT reads does **not** stop the offers — the vendor firmware itself signals the update request.
:::

### Safety on a shared PON

The PON is shared: one splitter serves tens of subscribers, and the upstream is a burst TDMA channel. A burst sent outside the ONU's own grant lands on the slots of the other subscribers, so an uncontrolled transmitter can disturb the whole tree.

::: danger Warning
* Keep the laser gated off in hardware until transmission is explicitly allowed. A firmware under development must start listen-only (no `REGISTER_REQ`).
* Only transmit with the Freebox unplugged, so that a single device of the subscription is on the fibre.
:::

### Open questions

The items below are not established.

* **The Free OAM types.** Types `2` and `0x10` are two requests of an unknown protocol. The meaning of the trailing 4-byte fields is not known, nor whether the OLT sends these requests to identities other than a Freebox.
* **Why the Freebox identity needs the `0x10` answer** to get `D9/0601`. It may be an identity or capability check for the Freebox device type.
* **Discovery Information `0x0013` / `0x0023`.** They may be alternating 1G and 10G upstream discovery windows (a reading of IEEE 802.3av).
* **A key that is never renewed**: what the OLT does after more than two expiries.
* **The downstream rate profile**: it depends on the registered identity but appears in no OAM attribute. An OLT-side shaper per identity is the likeliest explanation.
Loading
Loading