Interfaces
In SR Linux, an interface is any physical or logical port through which packets can be sent to or received from other devices. SR Linux supports the following interface types:
-
loopback
A loopback interface is a virtual interface that is always up, providing a stable source or destination from which packets can always be originated or received. SR Linux supports up to 256 loopback interfaces system-wide, across all network-instances. Loopback interfaces are named
loN, where N is 0 to 255. -
system
The system interface is a type of loopback interface that has characteristics that do not apply to regular loopback interfaces:
-
The system interface can be bound to the default network-instance only.
-
The system interface does not support multiple IPv4 addresses or multiple IPv6 addresses.
-
The system interface cannot be administratively disabled. Once configured, it is always up.
SR Linux supports a single system interface named
system0. When the system interface is bound to the default network-instance, and an IPv4 address is configured for it, the IPv4 address is the default local address for multi-hop BGP sessions to IPv4 neighbors established by the default network-instance, and it is the default IPv4 source address for IPv4 VXLAN tunnels established by the default network-instance. The same functionality applies with respect to IPv6 addresses / IPv6 BGP neighbors / IPv6 VXLAN tunnels. -
-
network
Network interfaces carry transit traffic, as well as originate and terminate control plane traffic and in-band management traffic.
The physical ports in line cards installed in the SR Linux device are network interfaces. A typical line card has a number of front-panel cages, each accepting a pluggable transceiver. Each transceiver may support a single channel or multiple channels, supporting one Ethernet port or multiple Ethernet ports, depending on the transceiver type and its breakout options.
In the SR Linux CLI, each network interface has a name that indicates its type and its location in the chassis. The location is specified using the following formats:
ethernet-slot[/mmda-slot][/connector]/portwhere:
-
slot – is a slot number (1 to 9). On 7220 IXR-Dx and 7220 IXR-Hx fixed systems there is only one slot, numbered 1; even though no other slot value is possible, the slot number 1 is still part of the interface name.
-
mda-slot – is a number representing the media dependent adapter (MDA) position within the parent card or chassis on devices that support MDA assemblies.
-
connector – is a number indicating the front-panel connector/cage to which a breakout cable is connected. It is omitted when there is no breakout configuration.
- port – is a number referring to the front-panel connector/cage to which a non-breakout cable is connected, or else it refers to the channel number (1 to 4) in a breakout configuration.
For example:
-
Interface
ethernet-1/1can refer to port 1 of a 7220 IXR-Dx system or to port 1 of the 7250 IXR IMM installed in slot 1. -
Interface
ethernet-2/1refers to port 1 of the 7250 IXR IMM installed in slot 2. -
Interface
ethernet-1/1/1can refer to breakout port 1 of connector 1 in a 7220 IXR-Dx chassis. -
Interface
ethernet-1/m1/2/4refers to breakout port 4 of connector 2 on the first MDA of the chassis.
-
-
management
Management interfaces are used for out-of-band management traffic. Fixed systems have a single out-of-band management interface named mgmt0. Modular systems with redundant CPMs have two out-of-band management ports with virtual names mgmt0 and mgmt0-standby and fixed names mgmtA and mgmtB. See Out-of-band management interfaces.
-
integrated routing and bridging (IRB)
IRB interfaces enable inter-subnet forwarding. Network-instances of type mac-vrf are associated with a Layer 3 network-instance of type ip-vrf or type default via an IRB interface.
IRB interfaces are named
irbN, where N is 0 to 255. See IRB interfaces.
In SR Linux, each loopback, network, management, and IRB interface can be subdivided into one or more subinterfaces. See Subinterfaces.
Out-of-band management interfaces
In SR Linux configuration and state, out-of-band management ports are represented by interface names that start with mgmt: mgmt0, mgmt0-standby, mgmtA, and mgmtB.
The mgmt interfaces support many of the same capabilities as regular ethernet interfaces, with the following exceptions:
-
Packets sent and received on the out-of-band management interface are processed completely in software.
-
The out-of-band management interface does not support multiple output queues, so there is no output traffic differentiation based on forwarding class.
-
The out-of-band management interface does not support pluggable optics. It is a fixed 10/100/1000-BaseT copper port.
-
The default port MTU of mgmt interfaces is 1514 bytes, and is not derived from the
system.mtu.default-port-mtusetting. -
The only supported speed for mgmt interfaces is 1G.
-
mgmt interfaces do not support breakout mode.
-
mgmt interfaces cannot be configured as LAG members.
-
mgmt interfaces do not support port loopback.
The mgmt0.0 routed subinterface of mgmt0 can be referenced by any network-instance of type ip-vrf or by the default network-instance. The management stack is accessible through any network-instance, even it does not include the mgmt0.0 subinterface.
On fixed systems, there is a single management interface named mgmt0.
On chassis-based modular systems with redundant CPMs, the out-of-band management ports have a virtual name that indicates the port's current role in the system, as well as a fixed name that indicates the port's location in the chassis:
-
The virtual name mgmt0 refers to the management interface on the active CPM in the system.
-
The virtual name mgmt0-standby refers to the management interface on the standby CPM in the system.
-
The fixed name mgmtA refers to the management port on the CPM in slot A.
-
The fixed name mgmtB refers to the management port on the CPM in slot B.
On systems with redundant CPMs, the configured list of interfaces must still include mgmt0 and mgmt0-standby, even if you intend to manage the ports using the mgmtA and mgmtB names.
Only the following port properties are configurable for mgmtA and mgmtB: description, admin-state and mtu.
Port statistics for mgmtA and mgmtB are reset whenever there is a CPM switchover.
mgmtA and mgmtB can be configured as LLDP
interfaces (under system.lldp.interface). When
mgmtA or mgmtB is enabled as an LLDP
interface, the LLDP PDUs transmitted from the corresponding mgmt
port encode mgmtA or mgmtB as the interface
name rather than mgmt0 or mgmt0-standby.
Linux interface naming conventions
Every type of SR Linux interface has an underlying interface in the Linux OS. These interfaces have names that adhere to Linux restrictions (maximum 15 characters and no slashes). The Linux interface name formats are as follows:
Loopback interfaces:
loN, where N is 0 to 255; for example,lo0Network interfaces:
eslot-port-subinterface; for example,e4-2-1Management interface:
mgmt0System interface:
system0LAG interface:
lagNIRB interface:
irbN
Basic interface configuration
The following example shows a configuration for interface basic parameters, including administratively enabling the interface, specifying a description, and setting the MTU. The settings apply to any subinterfaces on the port, unless overridden in the subinterface configuration.
--{ * candidate shared default }--[ ]--
# info with-context interface ethernet-1/2
interface ethernet-1/2
description Sample_interface_config
admin-state enable
mtu 1500