DELL Networking SONiC: Slik konfigurerer du IPv4-adresse og maksimal overføringsenhet i lag 3-grensesnitt
Summary: Denne artikkelen forklarer hvordan du konfigurerer grensesnittene for IPv4-adresse og maksimal overføringsenhet (MTU) i Dell Networking SONiC. Denne artikkelen bruker en svitsj som kjø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
|
Forhåndskrav
Vi bruker standard grensesnittnavn for å demonstrere konseptene. Se Dell-artikkelen 202172 Dell Networking S-serien: Basic Interface Configuration – SONiC 4.0 for mer informasjon om grensesnittnavn |
Indeks
Tilordne en IP-adresse.
Syntaks for konfigurasjon
| Kommando | Forklaring |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Angi kommandolinjegrensesnitt for Dell-administrasjon |
DELLSONiC# configure terminal |
Gå til konfigurasjonsmodus |
DELLSONiC(config)# interface <Eth slot/port><Vlan ID><PortChannel ID><Eth slot/port.subport><Loopback ID> |
Konfigurer grensesnitt, VLAN, PortChannel, undergrensesnitt, 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 grensesnittet er slått av, lukker du grensesnittet. |
Vis en kommando for å bekrefte IP-adressen.
| Kommando | Forklaring |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Angi kommandolinjegrensesnitt for Dell-administrasjon |
DELLSONiC# configure terminal |
Gå til konfigurasjonsmodus |
DELLSONiC# show ip interfaces |
Vis IP konfigurert i grensesnitt. |
DELLSONiC# show running-configuration interface <Eth slot/port><Vlan ID><PortChannel ID><Loopback ID> |
Vis grensesnittkonfigurasjon |
La oss konfigurere en IP-adresse på grensesnitt 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# |
La oss bekrefte konfigurasjonen.
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# |
La oss konfigurere IP-adresse på VLAN 1 med IP-adresse 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# |
La oss bekrefte konfigurasjonen.
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 |
La oss konfigurere IP-adresse på PortChannel 1 med ip-adresse 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 |
La oss bekrefte konfigurasjonen.
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# |
La oss konfigurere IP-adressen på Loopback 1 med IP-adresse 10.0.0.1/32.
MERK: Tilbakekobling støtter kun /32-prefikslengde eller delnett.
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# |
La oss bekrefte konfigurasjonen.
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# |
Tilordne Anycast IP-adresseSe artikkelen Dell Networking SONiC: Slik konfigurerer du statisk Anycast-gateway (anycast-adresse) om hvordan du konfigurerer en Anycast-adresse. |
MTU
Syntaks for konfigurasjon
| Kommando | Forklaring |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Angi kommandolinjegrensesnitt for Dell-administrasjon |
DELLSONiC# configure terminal |
Gå til konfigurasjonsmodus |
DELLSONiC(config)# interface <Eth slot/port><Vlan ID><PortChannel ID><Eth slot/port.subport> |
Konfigurer grensesnitt, VLAN, PortChannel, undergrensesnitt. |
DELLSONiC(conf-if-XXXX)# mtu <MTU> |
Konfigurer MTU Endre MTU (1312 til 9216). Standard 9100 |
DELLSONiC(conf-if-XXXX)# no mtu |
Konfigurer standard MTU i grensesnittet (standard er 9100). |
Vis kommandoer for å bekrefte MTU.
| Kommando | Forklaring |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Angi kommandolinjegrensesnitt for Dell-administrasjon |
DELLSONiC# configure terminal |
Gå til konfigurasjonsmodus |
DELLSONiC# show interface <Eth slot/port><Vlan ID><PortChannel ID> |
Vis grensesnittdetaljer. |
DELLSONiC# show running-configuration interface <Eth slot/port><Vlan ID><PortChannel ID> |
Vis grensesnittkonfigurasjon |
DELLSONiC#show interface status |
Vis grensesnittstatus |
-
Merknader om MTU-konfigurasjon
- Konfigurer MTU på VLAN-medlemmer før du konfigurerer VLAN MTU. Alle medlemmer av et VLAN må ha samme MTU-verdi. Kodede medlemmer må ha en lenke som er 4 byte høyere enn umerkede medlemmer for å ta hensyn til pakkemerket.
- Konfigurer MTU på portkanalmedlemmer før du konfigurerer MTU for portkanal. Alle medlemmer av en portkanal må ha samme MTU-verdi. Kodede medlemmer må ha en lenke som er 4 byte høyere enn umerkede medlemmer for å ta hensyn til pakkemerket.
- Kontroller at MTU for portkanalmedlemmer er større enn eller lik portkanalen MTU. Hvis du konfigurerer MTU på portkanalmedlemmer etter at du har konfigurert portkanalen MTU, kan det hende at MTU for portkanal ikke oppdateres. Systemet velger den laveste MTU-verdien som er konfigurert på portkanalen eller portkanalmedlemmene, som skal være portkanal-MTU. Portkanalen inneholder for eksempel merkede medlemmer med Link MTU på 1522 og IP MTU på 1500 og umerkede medlemmer med Link MTU på 1518 og IP MTU på 1500. Portkanalens Link MTU kan ikke være høyere enn 1518 byte, og IP-MTU-en kan ikke være høyere enn 1500 byte.
La oss konfigurere MTU i grensesnitt 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 |
La oss bekrefte konfigurasjonen (Output Grepped for korthet).
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 |
La oss konfigurere MTU i VLAN-grensesnittet.
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface Vlan 1 DELLSONiC(config-if-Vlan1)# mtu 1500 DELLSONiC(config-if-Vlan1)# end DELLSONiC# |
La oss bekrefte konfigurasjonen (Output Grepped for korthet).
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 |
La oss 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# |
La oss bekrefte konfigurasjonen (Output Grepped for korthet).
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.