11# Ethernet Interfaces
22
3- This document covers VLAN interfaces, physical Ethernet interfaces,
4- and virtual Ethernet (VETH) pairs.
5-
6-
7- ## VLAN Interfaces
8-
9- Creating a VLAN can be done in many ways. This section assumes VLAN
10- interfaces created atop another Linux interface. E.g., the VLAN
11- interfaces created on top of the Ethernet interface or bridge in the
12- picture below.
13-
14- ![ VLAN interface on top of Ethernet or Bridge interfaces] ( img/interface-vlan-variants.svg )
15-
16- A VLAN interface is basically a filtering abstraction. When you run
17- ` tcpdump ` on a VLAN interface you will only see the frames matching the
18- VLAN ID of the interface, compared to * all* the VLAN IDs if you run
19- ` tcpdump ` on the lower-layer interface.
20-
21- <pre class =" cli " ><code >admin@example:/> <b >configure</b >
22- admin@example:/config/> <b >edit interface eth0.20</b >
23- admin@example:/config/interface/eth0.20/> <b >show</b >
24- type vlan;
25- vlan {
26- tag-type c-vlan;
27- id 20;
28- lower-layer-if eth0;
29- }
30- admin@example:/config/interface/eth0.20/> <b >leave</b >
31- </code ></pre >
32-
33- The example below assumes bridge br0 is already created, see [ VLAN
34- Filtering Bridge] ( bridging.md#vlan-filtering-bridge ) .
35-
36- <pre class =" cli " ><code >admin@example:/> <b >configure</b >
37- admin@example:/config/> <b >edit interface vlan10</b >
38- admin@example:/config/interface/vlan10/> <b >set vlan id 10</b >
39- admin@example:/config/interface/vlan10/> <b >set vlan lower-layer-if br0</b >
40- admin@example:/config/interface/vlan10/> <b >leave</b >
41- </code ></pre >
42-
43- As conventions, a VLAN interface for VID 20 on top of an Ethernet
44- interface * eth0* is named * eth0.20* , and a VLAN interface for VID 10 on
45- top of a bridge interface * br0* is named * vlan10* .
46-
47- > [ !NOTE]
48- > If you name your VLAN interface ` foo0.N ` or ` vlanN ` , where ` N ` is a
49- > number, the CLI infers the interface type automatically.
3+ This document covers physical Ethernet interfaces and virtual Ethernet
4+ (VETH) pairs. For VLAN interfaces stacked on top of an Ethernet port
5+ or bridge, see [ VLAN Interfaces] ( vlan.md ) .
506
517
528## Physical Ethernet Interfaces
@@ -120,19 +76,23 @@ admin@example:/>
12076
12177### Restricting advertised link modes
12278
123- Auto-negotiation of speed/duplex is the desired default for almost all
124- use-cases, but sometimes a port must come up at a specific speed —
125- typically when interoperating with legacy hardware that does not
126- auto-negotiate, or that does so poorly. IEEE Std 802.3.2-2025 retired
127- the older * disable auto-negotiation, then set fixed speed/duplex*
128- idiom; the standards-correct way to express the same intent is to
129- ** restrict the set of PMD types auto-negotiation may advertise** .
130- When only one PMD is advertised, the link pins to that mode against
131- any cooperating peer.
79+ Auto-negotiation is the right default for almost all links, but sometimes a
80+ port has to come up at a fixed speed, usually when talking to old hardware
81+ that won't auto-negotiate or does it badly. IEEE Std 802.3.2-2025 dropped
82+ the old "turn off auto-negotiation, then set a fixed speed and duplex"
83+ approach. Instead you restrict the set of PMD types the port may advertise:
84+ list a single PMD and the link pins to that mode against any peer that
85+ supports it.
13286
133- Each entry in ` auto-negotiation/advertised-pmd-types ` is an IEEE
134- PMD-type identity (` ieee802-ethernet-phy-type:pmd-type-* ` ). Half- vs
135- full-duplex pinning is expressed by the orthogonal ` duplex ` leaf.
87+ > [ !NOTE]
88+ > Earlier Infix releases needed ` enable false ` plus explicit ` speed ` and
89+ > ` duplex ` leaves. IEEE Std 802.3.2-2025 retired the ` eth:speed ` leaf, so
90+ > the speed now comes from the ` advertised-pmd-types ` entry instead.
91+ > Existing ` startup-config.cfg ` files are migrated automatically on upgrade.
92+
93+ Each entry in ` auto-negotiation/advertised-pmd-types ` is an IEEE PMD-type
94+ identity (` ieee802-ethernet-phy-type:pmd-type-* ` ). The separate ` duplex `
95+ leaf controls half vs full duplex.
13696
13797The example below pins port ` eth3 ` to 100 Mbit/s half-duplex.
13898
@@ -149,20 +109,58 @@ admin@example:/config/interface/eth3/ethernet/> <b>leave</b>
149109admin@example:/>
150110</code ></pre >
151111
152- Listing multiple PMD identities advertises that set; the peer's
153- auto-negotiation picks the highest mutually-supported mode.
112+ List several PMDs to advertise all of them; auto-negotiation then settles
113+ on the highest mode both ends support .
154114
155115> [ !IMPORTANT]
156- > When pinning to a specific link mode, ensure both sides of the link
157- > agree on at least one common (PMD, duplex) combination. If they
158- > don't, the link will not come up.
116+ > When pinning a link mode, make sure both ends share at least one common
117+ > (PMD, duplex) combination, otherwise the link will not come up.
118+
119+ #### Duplex and advertised modes
120+
121+ A PMD type like ` 10BASE-T ` or ` 100BASE-TX ` says nothing about duplex on its
122+ own, but the kernel tracks half and full duplex as separate link modes.
123+ Infix advertises both variants of every PMD you list, then narrows to one
124+ duplex when the ` duplex ` leaf is set:
125+
126+ | ` advertised-pmd-types ` | ` duplex ` | Resulting advertised modes |
127+ | ----------------------------| ----------| ------------------------------------------|
128+ | ` [10BASE-T] ` | _ unset_ | ` 10baseT/Half ` + ` 10baseT/Full ` |
129+ | ` [10BASE-T] ` | ` full ` | ` 10baseT/Full ` |
130+ | ` [10BASE-T] ` | ` half ` | ` 10baseT/Half ` |
131+ | ` [10BASE-T, 100BASE-TX] ` | _ unset_ | all four half/full combinations |
132+ | ` [10BASE-T, 100BASE-TX] ` | ` full ` | ` 10baseT/Full ` + ` 100baseT/Full ` |
133+ | _ unset_ | _ unset_ | every mode the PHY supports (default) |
134+
135+ So ` duplex ` filters the PMDs you listed. PMDs with no half-duplex variant
136+ (everything above 1 Gbps) only ever advertise full.
137+
138+ #### Disabling auto-negotiation
139+
140+ The method above keeps auto-negotiation on and only limits what it
141+ advertises, so the peer still negotiates as usual. That doesn't help with
142+ gear that won't negotiate at all, like some old switches or a back-to-back
143+ copper link. For those, set ` auto-negotiation/enable false ` together with a
144+ single ` advertised-pmd-types ` entry to force a fixed speed and duplex with
145+ negotiation off:
146+
147+ <pre class =" cli " ><code >admin@example:/config/interface/eth3/ethernet/> <b >set auto-negotiation enable false</b >
148+ admin@example:/config/interface/eth3/ethernet/> <b >set auto-negotiation advertised-pmd-types pmd-type-100BASE-TX</b >
149+ admin@example:/config/interface/eth3/ethernet/> <b >set duplex full</b >
150+ </code ></pre >
151+
152+ With ` enable false ` you must list exactly one PMD: it sets the speed, and
153+ the ` duplex ` leaf sets half or full. Leave ` duplex ` out and Infix uses
154+ whatever the PMD supports, normally full.
159155
160156> [ !NOTE]
161- > Earlier Infix releases used ` auto-negotiation/enable=false ` with
162- > ` speed ` and ` duplex ` leaves to express the same thing. That syntax
163- > is retired together with the IEEE obsoletion of ` eth:speed ` ; existing
164- > ` startup-config.cfg ` snippets are automatically migrated to the new
165- > shape on upgrade.
157+ > Whether ` enable false ` reaches the external PHY depends on the driver.
158+ > Direct-attach NICs handle it directly. Switch user ports go through the
159+ > switch driver, and some accept the request at the MAC but leave the PHY
160+ > auto-negotiating: the kernel reports the configured speed while the wire
161+ > runs at whatever was negotiated, and traffic stalls. If that happens,
162+ > read the PHY's BMCR register (e.g. with ` mdio ` from ` mdiotools ` ) to see
163+ > what the PHY is actually doing.
166164
167165The detail view exposes a ` supported ` block (operational state,
168166backed by the ` supported-pmd-types ` leaf-list) listing the PMD types
0 commit comments