DELL Networking SONiC: How to Configure IPv4 Address and Maximum Transmission Unit in Layer 3 Interfaces
Summary: This article explains how to configure IPv4 address and maximum transmission unit (MTU) Interfaces in Dell Networking SONiC. This article uses a switch running Dell SONiC 4.1.
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Instructions
|
Prerequisites
We are using standard interface naming to demonstrate the Concepts. See Dell article 202172 Dell Networking S-Series: Basic Interface Configuration - SONiC 4.0 for more information regarding interface naming |
Index
Assign an IP address.
Configuration Syntax
| Command | Explanation |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Enter Dell Management Command-Line Interface |
DELLSONiC# configure terminal |
Enter Configuration Mode |
DELLSONiC(config)# interface <Eth slot/port><Vlan ID><PortChannel ID><Eth slot/port.subport><Loopback ID> |
Configure Interface, VLAN, PortChannel, subinterface, Loopback. |
DELLSONiC(conf-if-XXXX)# ip address A.B.C.D/mask |
Configure IP address with mask. |
DELLSONiC(conf-if-XXXX)# no ip address A.B.C.D/mask |
Remove IP address. |
DELLSONiC(conf-if-XXXX)# no shutdown |
If the Interface is shut down, unshut the interface. |
Show a command to verify the IP address.
| Command | Explanation |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Enter Dell Management Command-Line Interface |
DELLSONiC# configure terminal |
Enter Configuration Mode |
DELLSONiC# show ip interfaces |
Show IP configured in Interfaces. |
DELLSONiC# show running-configuration interface <Eth slot/port><Vlan ID><PortChannel ID><Loopback ID> |
Show interface configuration |
Let us configure an IP address on interface Eth 1/1 with IP address 10.0.0.1/24.
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface Eth 1/1 DELLSONiC(config-if-Eth1/1)# ip address 10.0.0.1/24 DELLSONiC(config-if-Eth1/1)# end DELLSONiC# |
Let us verify the configuration.
DELLSONiC# show ip interfaces Flags: U-Unnumbered interface, A-Anycast IP ----------------------------------------------------------------------------------------------------------------- Interface IP address/mask VRF Admin/Oper Flags ----------------------------------------------------------------------------------------------------------------- Eth1/1 10.0.0.1/24 up/up |
DELLSONiC# show running-configuration interface Eth 1/1 ! interface Eth1/1 mtu 9100 no shutdown ip address 10.0.0.1/24 DELLSONiC# |
Let us configure IP address on VLAN 1 with IP address 10.0.0.1/24.
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface Vlan 1 DELLSONiC(config-if-Vlan1)# ip address 10.0.0.1/24 DELLSONiC(config-if-Vlan1)# end DELLSONiC# |
Let us verify the configuration.
DELLSONiC# show ip interfaces Flags: U-Unnumbered interface, A-Anycast IP ----------------------------------------------------------------------------------------------------------------- Interface IP address/mask VRF Admin/Oper Flags ----------------------------------------------------------------------------------------------------------------- Vlan1 10.0.0.1/24 up/up |
DELLSONiC# show running-configuration interface Vlan 1 ! interface Vlan1 ip address 10.0.0.1/24 |
Let us configure IP address on PortChannel 1 with Ip address 10.0.0.1/24.
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface PortChannel 1 DELLSONiC(config-if-po1)# ip address 10.0.0.1/24 DELLSONiC(config-if-po1)# end |
Let us verify the configuration.
DELLSONiC# show ip interfaces Flags: U-Unnumbered interface, A-Anycast IP ----------------------------------------------------------------------------------------------------------------- Interface IP address/mask VRF Admin/Oper Flags ----------------------------------------------------------------------------------------------------------------- PortChannel1 10.0.0.1/24 up/up |
DELLSONiC# show running-configuration interface PortChannel 1 ! interface PortChannel1 no shutdown ip address 10.0.0.1/24 DELLSONiC# |
Let us configure the IP address on Loopback 1 with IP address 10.0.0.1/32.
NOTE: Loopback supports /32 prefix length or subnet only.
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface Loopback 1 DELLSONiC(config-if-lo1)# ip address 10.0.0.1/32 DELLSONiC(config-if-lo1)# end DELLSONiC# |
Let us verify the configuration.
DELLSONiC# show ip interfaces Flags: U-Unnumbered interface, A-Anycast IP ----------------------------------------------------------------------------------------------------------------- Interface IP address/mask VRF Admin/Oper Flags ----------------------------------------------------------------------------------------------------------------- Loopback1 10.0.0.1/32 up/up |
DELLSONiC# show running-configuration interface Loopback 1 ! interface Loopback 1 ip address 10.0.0.1/32 DELLSONiC# |
Assign Anycast IP addressSee Article Dell Networking SONiC How to configure Static Anycast gateway (anycast address) on how to configure anycast address. |
MTU
Configuration Syntax
| Command | Explanation |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Enter Dell Management Command-Line Interface |
DELLSONiC# configure terminal |
Enter Configuration Mode |
DELLSONiC(config)# interface <Eth slot/port><Vlan ID><PortChannel ID><Eth slot/port.subport> |
Configure Interface, VLAN, PortChannel, subinterface. |
DELLSONiC(conf-if-XXXX)# mtu <MTU> |
Configure MTU Change MTU (1312 to 9216). Default 9100 |
DELLSONiC(conf-if-XXXX)# no mtu |
Configure the Default MTU in interface (Default is 9100). |
Show commands to verify MTU.
| Command | Explanation |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Enter Dell Management Command-Line Interface |
DELLSONiC# configure terminal |
Enter Configuration Mode |
DELLSONiC# show interface <Eth slot/port><Vlan ID><PortChannel ID> |
Show Interface details. |
DELLSONiC# show running-configuration interface <Eth slot/port><Vlan ID><PortChannel ID> |
Show interface configuration |
DELLSONiC#show interface status |
Show interface status |
-
MTU Configuration notes
- Configure the MTU on VLAN members first before configuring VLAN MTU. All members of a VLAN must have the same MTU value. Tagged members must have a link MTU 4 bytes higher than untagged members to account for the packet tag.
- Configure the MTU on port channel members first before you configure the port channel MTU. All members of a port channel must have the same MTU value. Tagged members must have a link MTU 4 bytes higher than untagged members to account for the packet tag.
- Ensure that the MTU of port channel members is greater than or equal to the port channel MTU. If you configure the MTU on port channel members after you configure the port channel MTU, the port channel MTU may not be updated. The system selects the lowest MTU value that is configured on the port channel or port channel members to be the port channel MTU. For example, the port channel contains tagged members with Link MTU of 1522 and IP MTU of 1500 and untagged members with Link MTU of 1518 and IP MTU of 1500. The port channel’s Link MTU cannot be higher than 1518 bytes and its IP MTU cannot be higher than 1500 bytes.
Let us configure the MTU in interface Eth 1/1.
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface Eth 1/1 DELLSONiC(config-if-Eth1/1)# mtu 1500 DELLSONiC(config-if-Eth1/1)# end |
Let us verify the configuration (Output Grepped for brevity).
DELLSONiC# show interface status -------------------------------------------------------------------------------------------------------------------------------------- Name Description Oper Reason AutoNeg Speed MTU Alternate Name -------------------------------------------------------------------------------------------------------------------------------------- Eth1/1 - up oper-up off 25000 1500 Ethernet0 |
DELLSONiC# show running-configuration interface Eth 1/1 ! interface Eth1/1 mtu 1500 no shutdown |
DELLSONiC# show interface Eth 1/1 Eth1/1 is up, line protocol is up, reason oper-up Hardware is Eth, address is xx:xx:xx:xx:xx:xx Mode of IPV4 address assignment: not-set Mode of IPV6 address assignment: not-set Interface IPv6 oper status: Disabled IP MTU 1500 bytes LineSpeed 25GB, Auto-negotiation off Link-training: off |
Let us configure MTU in VLAN interface.
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface Vlan 1 DELLSONiC(config-if-Vlan1)# mtu 1500 DELLSONiC(config-if-Vlan1)# end DELLSONiC# |
Let us verify the configuration (Output Grepped for brevity).
DELLSONiC# show interface Vlan 1 Vlan1 is up, line protocol is up Hardware is Vlan, address is xx:xx:xx:xx:xx:xx Mode of IPV4 address assignment: not-set Mode of IPV6 address assignment: not-set Interface IPv6 oper status: Disabled IP MTU 1500 bytes Time since last interface status change: 02:33:17 |
DELLSONiC# show running-configuration interface Vlan 1 ! interface Vlan1 mtu 1500 |
Let us configure PortChannel 1 with MTU 1500.
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface PortChannel 1 DELLSONiC(config-if-po1)# mtu 1500 DELLSONiC(config-if-po1)# end DELLSONiC# |
Let us verify the configuration (Output Grepped for brevity).
DELLSONiC# show running-configuration interface PortChannel 1 ! interface PortChannel1 mode on mtu 1500 no shutdown |
DELLSONiC# show interface status -------------------------------------------------------------------------------------------------------------------------------------- Name Description Oper Reason AutoNeg Speed MTU Alternate Name -------------------------------------------------------------------------------------------------------------------------------------- Eth1/1 - up oper-up off 25000 1500 Ethernet0 Eth1/2 - up oper-up off 25000 1500 Ethernet1 PortChannel1 - up oper-up - 25000 1500 - |
DELLSONiC# show interface PortChannel 1 PortChannel1 is up, line protocol is up, reason oper-up, mode Static Hardware is PortChannel, address is xx:xx:xx:xx:xx:xx Minimum number of links to bring PortChannel up is 1 Mode of IPV4 address assignment: not-set Mode of IPV6 address assignment: not-set Graceful shutdown: Disabled MTU 1500 LineSpeed 25.0GB Events: |
Affected Products
Enterprise SONiC Distribution, PowerSwitch E3200-ON Series, Dell EMC Networking N3200-ON, PowerSwitch S5212F-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S5248F-ON, PowerSwitch S5296F-ON, PowerSwitch Z9264F-ON, PowerSwitch Z9332F-ON
, PowerSwitch Z9432F-ON
...
Article Properties
Article Number: 000218581
Article Type: How To
Last Modified: 10 Apr 2024
Version: 5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.