DELL Networking SONiC: Sådan konfigureres IPv4-adresse og maksimal transmissionsenhed i lag 3-grænseflader
Summary: Denne artikel beskriver, hvordan du konfigurerer IPv4-adresser og MTU-grænseflader (Maximum Transmission Unit) i Dell Networking SONiC. Denne artikel bruger en switch, der kører 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
|
Forudsætninger
Vi bruger standard interface navngivning til at demonstrere koncepterne. Se Dell-artiklen 202172 Dell Networking S-serien: Basic Interface Configuration - SONiC 4.0 for at få flere oplysninger om navngivning af grænseflade |
Indeks
Tildel en IP-adresse.
Syntaks for konfiguration
| Kommando | Forklaring |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Gå ind i Dell Managements kommandolinjegrænseflade |
DELLSONiC# configure terminal |
Gå til konfigurationstilstand |
DELLSONiC(config)# interface <Eth slot/port><Vlan ID><PortChannel ID><Eth slot/port.subport><Loopback ID> |
Konfigurer grænseflade, VLAN, PortChannel, undergrænseflade, loopback. |
DELLSONiC(conf-if-XXXX)# ip address A.B.C.D/mask |
Konfigurer IP-adresse med maske. |
DELLSONiC(conf-if-XXXX)# no ip address A.B.C.D/mask |
Fjern IP-adressen. |
DELLSONiC(conf-if-XXXX)# no shutdown |
Hvis grænsefladen lukkes ned, skal du lukke grænsefladen ud. |
Vis en kommando til bekræftelse af IP-adressen.
| Kommando | Forklaring |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Gå ind i Dell Managements kommandolinjegrænseflade |
DELLSONiC# configure terminal |
Gå til konfigurationstilstand |
DELLSONiC# show ip interfaces |
Vis IP konfigureret i grænseflader. |
DELLSONiC# show running-configuration interface <Eth slot/port><Vlan ID><PortChannel ID><Loopback ID> |
Vis grænsefladekonfiguration |
Lad os konfigurere en IP-adresse på interface Eth 1/1 med IP-adresse 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# |
Lad os kontrollere konfigurationen.
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# |
Lad os konfigurere IP-adressen på VLAN 1 med IP-adressen 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# |
Lad os kontrollere konfigurationen.
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 |
Lad os konfigurere IP-adressen på PortChannel 1 med IP-adressen 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 |
Lad os kontrollere konfigurationen.
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# |
Lad os konfigurere IP-adressen på Loopback 1 med IP-adressen 10.0.0.1/32.
BEMÆRK: Loopback understøtter kun /32-præfikslængde eller undernet.
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# |
Lad os kontrollere konfigurationen.
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# |
Tildel Anycast IP-adresseSe artiklen Dell Networking SONiC Sådan konfigurerer du statisk Anycast-gateway (anycast-adresse) for at konfigurere anycast-adresse. |
MTU
Syntaks for konfiguration
| Kommando | Forklaring |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Gå ind i Dell Managements kommandolinjegrænseflade |
DELLSONiC# configure terminal |
Gå til konfigurationstilstand |
DELLSONiC(config)# interface <Eth slot/port><Vlan ID><PortChannel ID><Eth slot/port.subport> |
Konfigurer grænseflade, VLAN, PortChannel, undergrænseflade. |
DELLSONiC(conf-if-XXXX)# mtu <MTU> |
Konfigurer MTU Change MTU (1312 til 9216). Standard 9100 |
DELLSONiC(conf-if-XXXX)# no mtu |
Konfigurer standard-MTU i grænsefladen (standard er 9100). |
Vis kommandoer til bekræftelse af MTU.
| Kommando | Forklaring |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Gå ind i Dell Managements kommandolinjegrænseflade |
DELLSONiC# configure terminal |
Gå til konfigurationstilstand |
DELLSONiC# show interface <Eth slot/port><Vlan ID><PortChannel ID> |
Vis grænsefladedetaljer. |
DELLSONiC# show running-configuration interface <Eth slot/port><Vlan ID><PortChannel ID> |
Vis grænsefladekonfiguration |
DELLSONiC#show interface status |
Vis interfacestatus |
-
MTU-konfigurationsbemærkninger
- Konfigurer først MTU på VLAN-medlemmer, før du konfigurerer VLAN MTU. Alle medlemmer af et VLAN skal have den samme MTU-værdi. Mærkede medlemmer skal have et link, der er 4 byte højere end ikke-mærkede medlemmer for at tage højde for pakketagget.
- Konfigurer MTU på portkanalmedlemmer først, før du konfigurerer portkanalens MTU. Alle medlemmer af en portkanal skal have den samme MTU-værdi. Mærkede medlemmer skal have et link, der er 4 byte højere end ikke-mærkede medlemmer for at tage højde for pakketagget.
- Sørg for, at MTU'en for portkanalmedlemmer er større end eller lig med portkanalens MTU. Hvis du konfigurerer MTU på portkanalmedlemmer, efter du har konfigureret portkanalens MTU, opdateres portkanalens MTU muligvis ikke. Systemet vælger den laveste MTU-værdi, der er konfigureret på portkanalen eller portkanalmedlemmerne til at være portkanalens MTU. Portkanalen indeholder f.eks. mærkede medlemmer med Link MTU på 1522 og IP MTU på 1500 og umærkede medlemmer med Link MTU på 1518 og IP MTU på 1500. Portkanalens Link MTU må ikke være højere end 1518 byte, og dens IP MTU må ikke være højere end 1500 byte.
Lad os konfigurere MTU'en i grænsefladen 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 |
Lad os kontrollere konfigurationen (Output Grepped for kortfattethed).
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 |
Lad os konfigurere MTU i VLAN-grænsefladen.
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface Vlan 1 DELLSONiC(config-if-Vlan1)# mtu 1500 DELLSONiC(config-if-Vlan1)# end DELLSONiC# |
Lad os kontrollere konfigurationen (Output Grepped for kortfattethed).
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 |
Lad os konfigurere PortChannel 1 med 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# |
Lad os kontrollere konfigurationen (Output Grepped for kortfattethed).
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.