Sub-interface

A sub port interface is a logical interface that can be created on a physical port or a port channel.

A sub port interface serves as an interface to either a .1D bridge or a VRF, but not both.

Multiple L3 sub port interfaces, each characterized by a VLAN id in the 802.1q tag, can be created on a physical port or a port channel. Sub port interfaces attaching to the same physical port or port channel can interface to different VRFs, though they share the same VLAN id space and must have different VLAN ids. Sub port interfaces attaching to different physical ports or port channels can use the same VLAN id, even when they interface to the same VRF. However, there is no L2 bridging between these sub port interfaces; each sub port interface is considered to stay in a separate bridge domain.

Limitations:

  • The MTU of the sub-interface is not configurable, and it will follow the parent interface value.
  • A VLAN bound to sub-interface cannot be used as a normal VLAN.
  • The name of the sub-interface cannot be greater than 15 characters(including “.”).

Example model & SONiC version:

  • Aurora 615/715
  • Netberg SONiC: sonic-202012-nb-inno-211121

Difference between a sub port interface and a vlan interface

Sub port interface is a router interface (RIF type sub port Vlan#) between a VRF and a physical port or a port channel. Vlan interface is a router interface (RIF type vlan Vlan#) facing a .1Q bridge. It is an interface between a bridge port type router (connecting to a .1Q bridge) and a VRF, as shown below.

Figure 1. Sub port router interface
subinterface
Figure 2. Vlan interface
vlan

Configuring sub interface

admin@sonic:~$ sudo config interface ip add Ethernet0.100 192.168.0.100/24
admin@sonic:~$ sudo config interface ip add PortChannel02.5 192.168.10.100/24
admin@sonic:~$ show subinterfaces status
  Sub port interface    Speed    MTU    Vlan    Admin                  Type
--------------------  -------  -----  ------  -------  --------------------
        Ethernet0.10     100G   9100      100      up  802.1q-encapsulation
     PortChannel02.5     200G   9100       5       up  802.1q-encapsulation
NEWS

Latest news