Skip to content
Open
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
14 changes: 14 additions & 0 deletions doc/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,25 @@ All notable changes to the project are documented in this file.

- Upgrade Linux kernel to 6.18.31 (LTS)
- Upgrade FRR to 10.5.4
- Upgrade `ieee802-ethernet-interface` YANG model to revision 2025-09-10 (IEEE
Std 802.3.2-2025), adding the standard `phy-type` and `pmd-type` operational
leaves. Speed is now exposed via `ietf-interfaces:speed` (bps, RFC 8343);
the now obsolete `eth:speed` is no longer returned
- Rework `show interface` summary output as layered protocol rows. When a
port has link, a physical-medium row (e.g. `1000baseT`, `10GbaseLR`) appears
above the `ethernet` row. VLAN, GRE, VXLAN and WiFi interfaces likewise get
one row per protocol layer, with type-specific data on each (`vid:`,
`remote:`, `vni:`, `station ssid:`, etc.), issue #530

### Fixes

- Fix #1493: container with a physical interface not properly removed
when switching to a configuration without containers
- Fix #1506: add documentation on how to configure VLAN interfaces,
including stacked (Q-in-Q) VLAN interfaces, in a dedicated `vlan.md`
- Fix long-standing typo `auto-negotation` in `yanger`, which caused
the operational `auto-negotiation/enable` leaf to always read as
`unknown` regardless of the actual port setting
- Handle unclean daemon exits better, e.g., `dbus-daemon` crashing and
leaving a stale pidfile behind, causing it to refuse to be restarted
- Fix occasional blank or garbled `[ OK ]` lines at startup
Expand Down
4 changes: 2 additions & 2 deletions doc/bridging.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ admin@example:/config/interface/br0/> <b>set bridge vlans vlan 20 tagged br0</b>
</code></pre>

To route or to manage via a VLAN, a VLAN interface needs to be created
on top of the bridge, see section [VLAN Interfaces](ethernet.md#vlan-interfaces)
for more on this topic.
on top of the bridge, see section [VLAN Interfaces](vlan.md) for more
on this topic.

> [!NOTE]
> In some use-cases only a single management VLAN on the bridge is used.
Expand Down
2 changes: 1 addition & 1 deletion doc/cli/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ interfaces {
}
}
admin@host-12-34-56:/config/interface/eth0/> leave
admin@host-12-34-56:/> show interfaces
admin@host-12-34-56:/> show interface
INTERFACE PROTOCOL STATE DATA
lo loopback UNKNOWN 00:00:00:00:00:00
ipv4 127.0.0.1/8 (static)
Expand Down
8 changes: 4 additions & 4 deletions doc/dhcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ When configuring, e.g., `dns-server`, or `router` options with the value
`auto`, the system uses the IP address from the interface matching the
subnet. For example:

<pre class="cli"><code>admin@example:/> <b>show interfaces</b>
<span class="header">INTERFACE PROTOCOL STATE DATA </span>
eth0 ethernet UP 02:00:00:00:00:00
<pre class="cli"><code>admin@example:/> <b>show interface</b>
<span class="header">INTERFACE PROTOCOL STATE DATA </span>
eth0 ethernet UP 02:00:00:00:00:00
ipv4 192.168.1.1/24 (static)
eth1 ethernet UP 02:00:00:00:00:01
eth1 ethernet UP 02:00:00:00:00:01
ipv4 192.168.2.1/24 (static)

admin@example:/config/dhcp-server/subnet/192.168.1.0/24/> <b>edit option dns-server</b>
Expand Down
180 changes: 79 additions & 101 deletions doc/ethernet.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,8 @@
# Ethernet Interfaces

This document covers VLAN interfaces, physical Ethernet interfaces,
and virtual Ethernet (VETH) pairs.


## VLAN Interfaces

Creating a VLAN can be done in many ways. This section assumes VLAN
interfaces created atop another Linux interface. E.g., the VLAN
interfaces created on top of the Ethernet interface or bridge in the
picture below.

![VLAN interface on top of Ethernet or Bridge interfaces](img/interface-vlan-variants.svg)

A VLAN interface is basically a filtering abstraction. When you run
`tcpdump` on a VLAN interface you will only see the frames matching the
VLAN ID of the interface, compared to *all* the VLAN IDs if you run
`tcpdump` on the lower-layer interface.

<pre class="cli"><code>admin@example:/> <b>configure</b>
admin@example:/config/> <b>edit interface eth0.20</b>
admin@example:/config/interface/eth0.20/> <b>show</b>
type vlan;
vlan {
tag-type c-vlan;
id 20;
lower-layer-if eth0;
}
admin@example:/config/interface/eth0.20/> <b>leave</b>
</code></pre>

The example below assumes bridge br0 is already created, see [VLAN
Filtering Bridge](bridging.md#vlan-filtering-bridge).

<pre class="cli"><code>admin@example:/> <b>configure</b>
admin@example:/config/> <b>edit interface vlan10</b>
admin@example:/config/interface/vlan10/> <b>set vlan id 10</b>
admin@example:/config/interface/vlan10/> <b>set vlan lower-layer-if br0</b>
admin@example:/config/interface/vlan10/> <b>leave</b>
</code></pre>

As conventions, a VLAN interface for VID 20 on top of an Ethernet
interface *eth0* is named *eth0.20*, and a VLAN interface for VID 10 on
top of a bridge interface *br0* is named *vlan10*.

> [!NOTE]
> If you name your VLAN interface `foo0.N` or `vlanN`, where `N` is a
> number, the CLI infers the interface type automatically.
This document covers physical Ethernet interfaces and virtual Ethernet
(VETH) pairs. For VLAN interfaces stacked on top of an Ethernet port
or bridge, see [VLAN Interfaces](vlan.md).


## Physical Ethernet Interfaces
Expand All @@ -56,44 +12,64 @@ top of a bridge interface *br0* is named *vlan10*.
Physical Ethernet interfaces provide low-level settings for speed/duplex as
well as packet status and [statistics](#ethernet-statistics).

By default, Ethernet interfaces defaults to auto-negotiating
speed/duplex modes, advertising all speed and duplex modes available.
In the example below, the switch would by default auto-negotiate speed
1 Gbit/s on port eth1 and 100 Mbit/s on port eth4, as those are the
highest speeds supported by H1 and H2 respectively.
By default, Ethernet interfaces defaults to auto-negotiating speed/duplex
modes, advertising all speed and duplex modes available. In the example
below, the switch would by default auto-negotiate speed 1 Gbps on port eth1
and 100 Mbps on port eth4, as those are the highest speeds supported by H1 and
H2 respectively.

![4-port Gbit/s switch connected to Gbit and Fast Ethernet Hosts](img/ethernet-autoneg.svg)

The speed and duplex status for the links can be listed as shown
below, assuming the link operational status is 'up'.
A quick at-a-glance view of the physical link is available in the summary
listing. When a port is up, a physical-layer row appears above the ethernet
row, naming the IEEE PMD type (e.g. `1000baseT`, `10GbaseLR`) in the PROTOCOL
column and the negotiated duplex in DATA. When the link is down the row is
omitted and the interface name falls onto the ethernet row.

<pre class="cli"><code>admin@example:/> <b>show interface</b>
<span class="header">INTERFACE PROTOCOL STATE DATA </span>
eth1 1000baseT UP duplex: full
ethernet 00:53:00:06:11:01
eth2 1000baseT UP duplex: full
ethernet 00:53:00:06:11:02
eth3 ethernet DOWN 00:53:00:06:11:03
eth4 100baseTX UP duplex: full
ethernet 00:53:00:06:11:04
...
</code></pre>

The detail view spells everything out, including auto-negotiation
state and the speed in Mbit/s.

<pre class="cli"><code>admin@example:/> <b>show interface eth1</b>
name : eth1
index : 2
mtu : 1500
operational status : up
auto-negotiation : on
duplex : full
speed : 1000
physical address : 00:53:00:06:11:01
ipv4 addresses :
ipv6 addresses :
in-octets : 75581
out-octets : 43130
name : eth1
index : 2
mtu : 1500
operational status : up
link mode : 1000baseT
auto-negotiation : on
duplex : full
speed : 1000
physical address : 00:53:00:06:11:01
ipv4 addresses :
ipv6 addresses :
in-octets : 75581
out-octets : 43130
...
admin@example:/> <b>show interface eth4</b>
name : eth4
index : 5
mtu : 1500
operational status : up
auto-negotiation : on
duplex : full
speed : 100
physical address : 00:53:00:06:11:04
ipv4 addresses :
ipv6 addresses :
in-octets : 75439
out-octets : 550704
name : eth4
index : 5
mtu : 1500
operational status : up
link mode : 100baseTX
auto-negotiation : on
duplex : full
speed : 100
physical address : 00:53:00:06:11:04
ipv4 addresses :
ipv6 addresses :
in-octets : 75439
out-octets : 550704
...
admin@example:/>
</code></pre>
Expand Down Expand Up @@ -138,29 +114,31 @@ require auto-negotiation to be enabled.
Ethernet packet statistics[^1] can be listed as shown below.

<pre class="cli"><code>admin@example:/> <b>show interface eth1</b>
name : eth1
index : 2
mtu : 1500
operational status : up
auto-negotiation : on
duplex : full
speed : 1000
physical address : 00:53:00:06:11:0a
ipv4 addresses :
ipv6 addresses :
in-octets : 75581
out-octets : 43130

eth-in-frames : 434
eth-in-multicast-frames : 296
eth-in-broadcast-frames : 138
eth-in-error-fcs-frames : 0
eth-in-error-oversize-frames : 0
eth-out-frames : 310
eth-out-multicast-frames : 310
eth-out-broadcast-frames : 0
eth-out-good-octets : 76821
eth-in-good-octets : 60598
name : eth1
index : 2
mtu : 1500
operational status : up
link mode : 1000baseT
auto-negotiation : on
duplex : full
speed : 1000
physical address : 00:53:00:06:11:0a
ipv4 addresses :
ipv6 addresses :
in-octets : 75581
out-octets : 43130
───────────────────
<b>Ethernet Statistics</b>
in-frames : 434
in-multicast-frames : 296
in-broadcast-frames : 138
in-error-fcs-frames : 0
in-error-oversize-frames : 0
out-frames : 310
out-multicast-frames : 310
out-broadcast-frames : 0
out-good-octets : 76821
in-good-octets : 60598
admin@example:/>
</code></pre>

Expand Down
20 changes: 13 additions & 7 deletions doc/iface.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,19 @@ admin@example:/config/interface/eth0/> <b>leave</b>
The operational status can be inspected to see both administrative and
actual link state:

<pre class="cli"><code>admin@example:/> <b>show interfaces</b>
INTERFACE PROTOCOL STATE DATA
eth0 ethernet <b>DISABLED</b> 02:00:00:00:00:00
eth1 ethernet UP 02:00:00:00:00:01
<pre class="cli"><code>admin@example:/> <b>show interface</b>
<span class="header">INTERFACE PROTOCOL STATE DATA </span>
eth0 ethernet <b>DISABLED</b> 02:00:00:00:00:00
eth1 1000baseT UP duplex: full
ethernet 02:00:00:00:00:01
...
</code></pre>

The rows are layered bottom-up by protocol: a physical-medium row (only
emitted when the link is up) on top, then the ethernet row carrying the
bare MAC, then any ipv4/ipv6 sub-rows. See [Ethernet](ethernet.md) for the
full set of summary fields.


## Description

Expand All @@ -84,9 +90,9 @@ The description is visible in the operational datastore and in `show`
commands:

<pre class="cli"><code>admin@example:/> <b>show interface eth0</b>
name : eth0
description : Uplink to core switch
index : 2
name : eth0
description : Uplink to core switch
index : 2
...
</code></pre>

Expand Down
Loading