DELL Networking SONiC : Configuration de l’adresse IPv4 et de l’unité de transmission maximale dans les interfaces de couche 3
Summary: Cet article explique comment configurer les interfaces d’adresse IPv4 et d’unité de transmission maximale (MTU) dans Dell Networking SONiC. Cet article utilise un commutateur exécutant 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
|
Configuration requise
Nous utilisons une dénomination d’interface standard pour démontrer les concepts. Voir l’article Dell 202172 Dell Networking série S : Configuration de l’interface de base - SONiC 4.0 pour plus d’informations sur la dénomination des interfaces |
Index
- Syntaxe de configuration et commandes d’affichage
- Notes de configuration MTU
- Exemple de configuration
Attribuez une adresse IP.
Syntaxe de configuration
| Commande | Explication |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Accédez à l’interface de ligne de commande de gestion Dell |
DELLSONiC# configure terminal |
Passer en mode configuration |
DELLSONiC(config)# interface <Eth slot/port><Vlan ID><PortChannel ID><Eth slot/port.subport><Loopback ID> |
Configurer l’interface, le VLAN, le canal de port, la sous-interface, le bouclage. |
DELLSONiC(conf-if-XXXX)# ip address A.B.C.D/mask |
Configurez l’adresse IP avec un masque. |
DELLSONiC(conf-if-XXXX)# no ip address A.B.C.D/mask |
Supprimez l’adresse IP. |
DELLSONiC(conf-if-XXXX)# no shutdown |
Si l’interface est arrêtée, désactivez-la. |
Affichez une commande pour vérifier l’adresse IP.
| Commande | Explication |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Accédez à l’interface de ligne de commande de gestion Dell |
DELLSONiC# configure terminal |
Passer en mode configuration |
DELLSONiC# show ip interfaces |
Affichez l’adresse IP configurée dans Interfaces. |
DELLSONiC# show running-configuration interface <Eth slot/port><Vlan ID><PortChannel ID><Loopback ID> |
Afficher la configuration de l’interface |
Configureons une adresse IP sur l’interface Eth 1/1 avec l’adresse IP 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# |
Vérifions la 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# |
Configureons l’adresse IP sur le VLAN 1 avec l’adresse IP 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# |
Vérifions la 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 |
Configureons l’adresse IP sur PortChannel 1 avec l’adresse IP 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 |
Vérifions la 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# |
Configureons l’adresse IP sur le loopback 1 avec l’adresse IP 10.0.0.1/32.
Remarque : Le bouclage prend en charge la longueur du préfixe /32 ou le sous-réseau uniquement.
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# |
Vérifions la 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# |
Attribuer une adresse IP AnycastVoir l’article Dell Networking SONiC Comment configurer la passerelle Anycast statique (adresse anycast) pour savoir comment configurer l’adresse Anycast. |
MTU
Syntaxe de configuration
| Commande | Explication |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Accédez à l’interface de ligne de commande de gestion Dell |
DELLSONiC# configure terminal |
Passer en mode configuration |
DELLSONiC(config)# interface <Eth slot/port><Vlan ID><PortChannel ID><Eth slot/port.subport> |
Configurer l’interface, le VLAN, le canal de port, la sous-interface. |
DELLSONiC(conf-if-XXXX)# mtu <MTU> |
Configurer la MTU Modifiez la MTU (1312 à 9216). Par défaut 9100 |
DELLSONiC(conf-if-XXXX)# no mtu |
Configurez la MTU par défaut dans l’interface (la valeur par défaut est 9100). |
Affichez les commandes pour vérifier la MTU.
| Commande | Explication |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Accédez à l’interface de ligne de commande de gestion Dell |
DELLSONiC# configure terminal |
Passer en mode configuration |
DELLSONiC# show interface <Eth slot/port><Vlan ID><PortChannel ID> |
Afficher les détails de l’interface. |
DELLSONiC# show running-configuration interface <Eth slot/port><Vlan ID><PortChannel ID> |
Afficher la configuration de l’interface |
DELLSONiC#show interface status |
Affichage de l’état de l’interface |
-
Notes de configuration MTU
- Configurez d’abord la MTU sur les membres VLAN avant de configurer la MTU VLAN. Tous les membres d’un VLAN doivent avoir la même valeur MTU. Les membres marqués doivent avoir une MTU de liaison supérieure de 4 octets à celle des membres non balisés pour tenir compte de la balise de paquet.
- Configurez d’abord la MTU sur les membres du canal de port avant de configurer la MTU du canal de port. Tous les membres d’un canal de port doivent avoir la même valeur MTU. Les membres marqués doivent avoir une MTU de liaison supérieure de 4 octets à celle des membres non balisés pour tenir compte de la balise de paquet.
- Assurez-vous que la MTU des membres du canal de port est supérieure ou égale à la MTU du canal de port. Si vous configurez la MTU sur les membres du canal de port après avoir configuré la MTU du canal de port, il se peut que la MTU du canal de port ne soit pas mise à jour. Le système sélectionne la valeur MTU la plus basse configurée sur le canal de port ou les membres du canal de port comme MTU du canal de port. Par exemple, le canal de port contient des membres balisés avec une MTU de liaison de 1 522 et une MTU IP de 1 500, et des membres non balisés avec une MTU de liaison de 1 518 et une MTU IP de 1 500. Le MTU de liaison du canal de port ne peut pas être supérieur à 1 518 octets et son MTU IP ne peut pas être supérieur à 1 500 octets.
Configureons la MTU dans l’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 |
Vérifions la configuration (sortie Grepped pour plus de brièveté).
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 |
Configureons la MTU dans l’interface VLAN.
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface Vlan 1 DELLSONiC(config-if-Vlan1)# mtu 1500 DELLSONiC(config-if-Vlan1)# end DELLSONiC# |
Vérifions la configuration (sortie Grepped pour plus de brièveté).
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 |
Configurons PortChannel 1 avec 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# |
Vérifions la configuration (sortie Grepped pour plus de brièveté).
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.