DELL Networking SONiC: IPv4-adres en maximale transmissie-eenheid configureren in Layer 3-interfaces
Summary: In dit artikel wordt uitgelegd hoe u IPv4-adres en maximale transmissie-eenheid (MTU)-interfaces configureert in Dell Networking SONiC. In dit artikel wordt een switch gebruikt waarop Dell SONiC 4.1 wordt uitgevoerd. ...
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
|
Vereisten
We gebruiken standaard interfacenaamgeving om de concepten te demonstreren. Zie Dell artikel 202172 Dell Networking S-serie: Basic Interface Configuration - SONiC 4.0 voor meer informatie over interfacenaamgeving |
Index
- Configuratiesyntaxis en opdrachten weergeven
- Opmerkingen bij de MTU-configuratie
- Voorbeeldconfiguratie
Wijs een IP-adres toe.
Configuratiesyntaxis
| Opdracht | Uitleg |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Ga naar de opdrachtregelinterface van Dell Management |
DELLSONiC# configure terminal |
Activeer de configuratiemodus |
DELLSONiC(config)# interface <Eth slot/port><Vlan ID><PortChannel ID><Eth slot/port.subport><Loopback ID> |
Configureer interface, VLAN, PortChannel, subinterface, Loopback. |
DELLSONiC(conf-if-XXXX)# ip address A.B.C.D/mask |
Configureer IP-adres met masker. |
DELLSONiC(conf-if-XXXX)# no ip address A.B.C.D/mask |
Verwijder het IP-adres. |
DELLSONiC(conf-if-XXXX)# no shutdown |
Als de interface is afgesloten, maakt u de interface los. |
Een opdracht weergeven om het IP-adres te verifiëren.
| Opdracht | Uitleg |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Ga naar de opdrachtregelinterface van Dell Management |
DELLSONiC# configure terminal |
Activeer de configuratiemodus |
DELLSONiC# show ip interfaces |
Toon IP geconfigureerd in interfaces. |
DELLSONiC# show running-configuration interface <Eth slot/port><Vlan ID><PortChannel ID><Loopback ID> |
Interfaceconfiguratie weergeven |
Laten we een IP-adres configureren op interface Eth 1/1 met IP-adres 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# |
Laten we de configuratie controleren.
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# |
Laten we het IP-adres op VLAN 1 configureren met IP-adres 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# |
Laten we de configuratie controleren.
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 |
Laten we het IP-adres op PortChannel 1 configureren met IP-adres 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 |
Laten we de configuratie controleren.
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# |
Laten we het IP-adres op Loopback 1 configureren met IP-adres 10.0.0.1/32.
OPMERKING: Loopback ondersteunt alleen /32 prefix lengte of subnet.
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# |
Laten we de configuratie controleren.
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# |
Anycast IP-adres toewijzenZie het artikel Dell Networking SONiC Statische Anycast-gateway (Anycast-adres) configureren voor het configureren van een Anycast-adres. |
MTU
Configuratiesyntaxis
| Opdracht | Uitleg |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Ga naar de opdrachtregelinterface van Dell Management |
DELLSONiC# configure terminal |
Activeer de configuratiemodus |
DELLSONiC(config)# interface <Eth slot/port><Vlan ID><PortChannel ID><Eth slot/port.subport> |
Configureer interface, VLAN, PortChannel, subinterface. |
DELLSONiC(conf-if-XXXX)# mtu <MTU> |
MTU configureren MTU wijzigen (1312 naar 9216). Standaard: 9100 |
DELLSONiC(conf-if-XXXX)# no mtu |
Configureer de standaard MTU in de interface (standaard is 9100). |
Opdrachten weergeven om MTU te verifiëren.
| Opdracht | Uitleg |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Ga naar de opdrachtregelinterface van Dell Management |
DELLSONiC# configure terminal |
Activeer de configuratiemodus |
DELLSONiC# show interface <Eth slot/port><Vlan ID><PortChannel ID> |
Interfacedetails weergeven. |
DELLSONiC# show running-configuration interface <Eth slot/port><Vlan ID><PortChannel ID> |
Interfaceconfiguratie weergeven |
DELLSONiC#show interface status |
Interfacestatus weergeven |
-
Opmerkingen bij de MTU-configuratie
- Configureer eerst de MTU op VLAN-leden voordat u VLAN MTU configureert. Alle leden van een VLAN moeten dezelfde MTU-waarde hebben. Getagde leden moeten een link MTU hebben die 4 bytes hoger is dan die van niet-getagde leden om rekening te houden met de pakkettag.
- Configureer eerst de MTU op poortkanaalleden voordat u de MTU van het poortkanaal configureert. Alle leden van een poortkanaal moeten dezelfde MTU-waarde hebben. Getagde leden moeten een link MTU hebben die 4 bytes hoger is dan die van niet-getagde leden om rekening te houden met de pakkettag.
- Zorg ervoor dat de MTU van poortkanaalleden groter dan of gelijk is aan de MTU van het poortkanaal. Als u de MTU op poortkanaalleden configureert nadat u de MTU van het poortkanaal hebt geconfigureerd, wordt de MTU van het poortkanaal mogelijk niet bijgewerkt. Het systeem selecteert de laagste MTU-waarde die is geconfigureerd op het poortkanaal of de leden van het poortkanaal als de MTU van het poortkanaal. Het poortkanaal bevat bijvoorbeeld getagde leden met Link MTU van 1522 en IP MTU van 1500 en niet-getagde leden met Link MTU van 1518 en IP MTU van 1500. De Link MTU van het poortkanaal mag niet hoger zijn dan 1518 bytes en de IP MTU mag niet hoger zijn dan 1500 bytes.
Laten we de MTU configureren 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 |
Laten we de configuratie controleren (kortheidshalve uitvoer gegrepped).
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 |
Laten we MTU configureren in de 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# |
Laten we de configuratie controleren (kortheidshalve uitvoer gegrepped).
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 |
Laten we PortChannel 1 configureren met 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# |
Laten we de configuratie controleren (kortheidshalve uitvoer gegrepped).
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.