Dell Networking SONiC Static and LACP PortChannel
Riepilogo: Questo articolo spiega il portchannel statico e LACP negli switch che eseguono Dell Networking SONiC OS. Questo articolo non riguarda MC-LAG. Questo articolo utilizza uno switch con Dell SONiC 4.1. ...
Istruzioni
Prerequisiti dell'articolo
Stiamo utilizzando la denominazione dell'interfaccia standard nella configurazione. Per ulteriori informazioni sulle varie modalità di denominazione dell'interfaccia in Dell SONiC, fare riferimento a Dell Networking serie S: Configurazione dell'interfaccia di base - SONIC 4.0
Le interfacce da aggiungere in PortChannel, Eth 1/1, 1/2 e 1/3 devono essere configurate per la stessa velocità, duplex e MTU.
Indice
Che cos'è un portchannel?
Punti da ricordare
PortChannel statico o modalità
ONLACP PortChannel o modalità
attivaLink
minimiMTU
Che cos'è un portchannel?
Un canale della porta è un set di uno o più link che possono essere aggregati per formare un canale in bonded (Gruppo di aggregazione connessioni o LAG o PortChannel).
Vantaggi della creazione di un portchannel
- Ciò fornisce ridondanza, maggiore larghezza di banda e migliore bilanciamento del carico del traffico.
- Un canale della porta aggrega la larghezza di banda dei link dei membri.
- Se una porta membro ha esito negativo, il traffico viene reindirizzato alle porte rimanenti.
Tipi di port channel
PortChannel può essere configurato come
- PortChannel statico o modalità ON
- LACP PortChannel o modalità attiva
Punti da ricordare
- Utilizzare LLDP per verificare le connessioni di collegamento se il lato peer supporta LLDP
- Il numero massimo di interfacce in un PortChannel è 32
- Un PortChannel può essere configurato come modalità switchport L2 e modalità porta routing L3 (assegnare l'indirizzo Ipv4/IPV6)
Di seguito sono riportati i punti da ricordare quando si aggiunge un'interfaccia a un portchannel.
- Tutti i membri devono essere dello stesso tipo di interfaccia (ad esempio Ethernet).
- Tutte le interfacce membro devono avere la stessa velocità/duplex/MTU.
- Un'interfaccia non deve contenere impostazioni di configurazione L2/L3 non predefinite. Sono supportati solo i comandi descrizione e arresto o nessun arresto.
- Non è possibile aggiungere un indirizzo IP o un indirizzo MAC statico a un'interfaccia membro.
- È possibile assegnare un'interfaccia a un solo canale della porta.
| Informazioni |
Lets Cleanup the configuration of Eth 1/1 before adding the interface to portchannel DELLSONiC# show running-configuration interface Eth 1/1 ! interface Eth1/1 mtu 9100 speed 25000 shutdown switchport trunk allowed Vlan 1-4094 Lets execute default interface Eth1/1 DELLSONiC# configure DELLSONiC(config)# default interface Eth 1/1 We can see the interface configuration is defaulted DELLSONiC(config)# do show running-configuration interface Eth 1/1 ! interface Eth1/1 mtu 9100 speed 25000 shutdown DELLSONiC(config)# |
PortChannel statico o modalità ON
La modalità Static PortChannel o ON è un modo semplice per configurare un PortChannel. Questa modalità può essere utilizzata se il dispositivo collegato non supporta LACP. Un LAG statico non dispone di alcun meccanismo per lo scambio di informazioni di aggregazione come LACP, pertanto inizia a inoltrare i pacchetti quando si attiva uno dei suoi collegamenti.
Configurare PortChannel
Add Interfaces to Portchannel.
Sintassi di configurazione
| Configurazione |
Spiegazione |
|---|---|
DELLSONiC(config)# interface Ethernet |
Configurare l'interfaccia. |
DELLSONiC(config)# interface range Ethernet |
Opzionale: Configurare un intervallo di interfacce. |
DELLSONiC(conf-if-EthernetX)# channel-group |
Definire il PortChannel sotto l'interfaccia. |
DELLSONiC(conf-if-EthernetX)# no channel-group |
Rimuovere un'interfaccia da un portchannel. |
DELLSONiC(conf-if-EthernetX)# no shutdown |
Abilitare l'interfaccia. |
Configurazione di esempio
Lets Configure Portchannel 1 admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface PortChannel 1 mode on DELLSONiC(config-if-po1)# no shutdown DELLSONiC(config-if-po1)# exit Lets add interface Eth 1/1 as part of Portchannel 1 DELLSONiC(config)# interface Eth 1/1 DELLSONiC(config-if-Eth1/1)# channel-group 1 DELLSONiC(config-if-Eth1/1)# no shutdown DELLSONiC(config-if-Eth1/1)# exit Lets use interface range command to add interface Eth 1/2 and Eth 1/3 as part of Portchannel 1 DELLSONiC(config)# interface range Eth 1/2-1/3 %Info: Configuring only existing interfaces in range DELLSONiC(config-if-range-eth**)# channel-group 1 DELLSONiC(config-if-range-eth**)# no shutdown DELLSONiC(config-if-range-eth**)# end DELLSONiC# |
Utilizzare il comando show interface PortChannel e show PortChannel summary per verificare lo stato di PortChannel.
Esempi di output
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 9100
LineSpeed 75.0GB
Events:
all-links-down at 2023-09-19T17:24:05.257874Z
lacp-fail at 2023-09-19T17:25:15.406803Z
portchannel-up at 2023-09-19T17:25:15.417415Z
Members in this channel: Eth1/1
Members in this channel: Eth1/2
Members in this channel: Eth1/3
Last clearing of "show interface" counters: never
10 seconds input rate 2 packets/sec, 2968 bits/sec, 371 Bytes/sec
10 seconds output rate 0 packets/sec, 0 bits/sec, 0 Bytes/sec
Input statistics:
1320 packets, 243306 octets
0 Multicasts, 0 Broadcasts, 1320 Unicasts
0 error, 28 discarded
Output statistics:
818 packets, 190127 octets
0 Multicasts, 0 Broadcasts, 818 Unicasts
0 error, 0 discarded
Time since last interface status change: 00:03:23 |
DELLSONiC# show PortChannel summary
Flags(oper-status): D - Down U - Up (portchannel) P - Up in portchannel (members)
----------------------------------------------------------------------------------------------------------------------------
Group PortChannel Type Protocol Member Ports
----------------------------------------------------------------------------------------------------------------------------
1 PortChannel1 (U) Eth NONE Eth1/1(P)
Eth1/2(P)
Eth1/3(P) |
LACP PortChannel o modalità attiva
Un canale della porta è un insieme di uno o più link che possono essere aggregati per formare un canale bonded (Gruppo di aggregazione connessioni, LAG o canale della porta).
Il protocollo LACP (Link Aggregate Control Protocol) utilizza le scambi peer (LACPDU) tra i link per determinare, su base continuativa, la funzionalità di aggregazione di vari link e fornire continuamente il livello massimo di funzionalità di aggregazione raggiungibile tra una determinata coppia di sistemi.
Configurazione dellasintassi di configurazione di PortChannel
| Configurazione |
Spiegazione |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
Accedere a DELL MF-CLI |
DELLSONiC# configure terminal |
Consente di accedere alla modalità di configurazione. |
DELLSONiC(config)# interface PortChannel |
Configurare PortChannel come LACP active portchannel. |
sonic(config)# interface PortChannel mode active |
(Opzionale) Configurare PortChannel come LACP active PortChannel. È possibile specificare una modalità attiva. (default) |
DELLSONiC(conf-if-poX)# no shutdown |
Eseguire l'unshut del PortChannel. |
DELLSONiC(conf-if-poX)#exit |
Uscire da PortChannel. |
Aggiungere interfacce a un portchannel.
Sintassi di configurazione
| Configurazione |
Spiegazione |
|---|---|
DELLSONiC(config)# interface Ethernet |
Configurare l'interfaccia. |
DELLSONiC(config)# interface range Ethernet |
Opzionale: Configurare un intervallo di interfacce. |
DELLSONiC(conf-if-EthernetX)# channel-group |
Definire il PortChannel sotto l'interfaccia. |
DELLSONiC(conf-if-EthernetX)# no channel-group |
Rimuovere un'interfaccia da un portchannel. |
DELLSONiC(conf-if-EthernetX)# no shutdown |
Abilitare l'interfaccia. |
Configurazione di esempio
Lets Configure Portchannel 1 admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface PortChannel 1 DELLSONiC(config-if-po1)# no shutdown DELLSONiC(config-if-po1)# exit Lets add interface Eth 1/1 as part of Portchannel 1 DELLSONiC(config)# interface Eth 1/1 DELLSONiC(config-if-Eth1/1)# channel-group 1 DELLSONiC(config-if-Eth1/1)# no shutdown DELLSONiC(config-if-Eth1/1)# exit Lets use interface range command to add interface Eth 1/2 and Eth 1/3 as part of Portchannel 1 DELLSONiC(config)# interface range Eth 1/2-1/3 %Info: Configuring only existing interfaces in range DELLSONiC(config-if-range-eth**)# channel-group 1 DELLSONiC(config-if-range-eth**)# no shutdown DELLSONiC(config-if-range-eth**)# end DELLSONiC# |
Utilizzare il comando show interface PortChannel e show PortChannel summary per verificare lo stato di PortChannel.
Esempi di output
DELLSONiC# show interface PortChannel 1
PortChannel1 is up, line protocol is up, reason oper-up, mode LACP
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
Fallback: Disabled
Graceful shutdown: Disabled
MTU 9100
LineSpeed 75.0GB
Events:
all-links-down at 2023-09-19T16:19:23.406682Z
lacp-fail at 2023-09-19T16:37:02.782825Z
portchannel-up at 2023-09-19T16:37:42.564118Z
LACP mode ACTIVE interval SLOW priority 65535 address XX:XX:XX:XX:XX:XX
Members in this channel: Eth1/1(Selected)
LACP Actor port 1 address XX:XX:XX:XX:XX:XX key 1
LACP Partner port 1 address XX:XX:XX:XX:XX:XX key 1
Members in this channel: Eth1/2(Selected)
LACP Actor port 2 address XX:XX:XX:XX:XX:XX key 1
LACP Partner port 2 address XX:XX:XX:XX:XX:XX key 1
Members in this channel: Eth1/3(Selected)
LACP Actor port 3 address XX:XX:XX:XX:XX:XX key 1
LACP Partner port 3 address XX:XX:XX:XX:XX:XX key 1
Last clearing of "show interface" counters: never
10 seconds input rate 0 packets/sec, 0 bits/sec, 0 Bytes/sec
10 seconds output rate 0 packets/sec, 0 bits/sec, 0 Bytes/sec
Input statistics:
107 packets, 20173 octets
0 Multicasts, 0 Broadcasts, 107 Unicasts
0 error, 16 discarded
Output statistics:
209 packets, 34421 octets
0 Multicasts, 0 Broadcasts, 209 Unicasts
0 error, 0 discarded
Time since last interface status change: 00:02:04 |
DELLSONiC# show PortChannel summary
Flags(oper-status): D - Down U - Up (portchannel) P - Up in portchannel (members)
----------------------------------------------------------------------------------------------------------------------------
Group PortChannel Type Protocol Member Ports
----------------------------------------------------------------------------------------------------------------------------
1 PortChannel1 (U) Eth LACP Eth1/1(P)
Eth1/2(P)
Eth1/3(P) |
Link minimi
È possibile configurare il numero minimo di link per attivare il port-channel utilizzando il comando min-links. Il valore predefinito è 0.
Configurazione di esempio
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface PortChannel 1 DELLSONiC(config-if-po1)# min-links 2 DELLSONiC(config-if-po1)# end DELLSONiC# |
Esempi di output
DELLSONiC# show PortChannel summary
Flags(oper-status): D - Down U - Up (portchannel) P - Up in portchannel (members)
----------------------------------------------------------------------------------------------------------------------------
Group PortChannel Type Protocol Member Ports
----------------------------------------------------------------------------------------------------------------------------
1 PortChannel1 (U) Eth LACP Eth1/1(P)
Eth1/2(P)
Eth1/3(P |
Si consideri che la porta Eth 1/2 e il collegamento Eth 1/3 non funzionano. Eth 1/1 è UP. Poiché è attivo solo un link e il link minimo è 2, portchannel 1 diventa inattivo.
Possiamo vedere che portchannel 1 è inattivo e perché si tratta di link minimi.
Esempi di output
DELLSONiC# show interface status (Output grepped for brevity) -------------------------------------------------------------------------------------------------------------------------------------- Name Description Oper Reason AutoNeg Speed MTU Alternate Name -------------------------------------------------------------------------------------------------------------------------------------- Eth1/1 - up oper-up off 25000 9100 Ethernet0 Eth1/2 - down admin-down off 25000 9100 Ethernet1 Eth1/3 - down admin-down off 25000 9100 Ethernet2 PortChannel1 - down min-links - 75000 9100 - |
MTU
È possibile configurare la MTU su un'interfaccia portchannel. Di seguito sono riportati gli aspetti chiave da conoscere prima di configurare la MTU in un PortChannel.
- Configurare la MTU sull'interfaccia assegnata a un canale della porta prima di configurare la MTU del canale della porta.
- La MTU predefinita di un PortChannel è 9100.
- Tutti i membri di un port channel devono avere lo stesso valore MTU.
- Le interfacce membro con VLAN tagged devono avere una MTU di collegamento di 4 byte superiore rispetto ai membri untagged per tenere conto del tag del pacchetto.
- Accertarsi che la MTU delle interfacce membro del canale della porta sia maggiore o uguale alla MTU del canale della porta.
- Il sistema seleziona il valore MTU più basso configurato sul canale della porta o sui membri del canale della porta come MTU del canale della porta.
Esempio
Si consideri che il canale della porta contiene membri tagged con Link MTU di 1522 e MTU IP di 1500 e membri untagged con Link MTU di 1518 e IP MTU di 1500.
La Link MTU del canale della porta non può essere superiore a 1518 byte e la relativa MTU IP non può essere superiore a 1500 byte.
NOTA:
|
Esempi di output
Cambiamo la MTU di PortChannel in 1500 (il valore predefinito è 9100)
DELLSONiC# configure DELLSONiC(config)# interface PortChannel 1 DELLSONiC(config-if-po1)# mtu 1500 DELLSONiC(config-if-po1)# end DELLSONiC# |
Esempi di output
DELLSONiC# show interface PortChannel 1
PortChannel1 is up, line protocol is up, reason oper-up, mode LACP
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
Fallback: Disabled
Graceful shutdown: Disabled
MTU 1500
LineSpeed 75.0GB
Events:
all-links-down at 2023-09-19T16:50:29.006155Z
lacp-fail at 2023-09-19T16:50:30.833807Z
portchannel-up at 2023-09-19T16:50:30.83887Z
LACP mode ACTIVE interval SLOW priority 65535 address XX:XX:XX:XX:XX:XX
Members in this channel: Eth1/1(Selected)
LACP Actor port 1 address XX:XX:XX:XX:XX:XX key 1
LACP Partner port 1 address XX:XX:XX:XX:XX:XX key 1
Members in this channel: Eth1/2(Selected)
LACP Actor port 2 address XX:XX:XX:XX:XX:XX key 1
LACP Partner port 2 address XX:XX:XX:XX:XX:XX key 1
Members in this channel: Eth1/3(Selected)
LACP Actor port 3 address XX:XX:XX:XX:XX:XX key 1
LACP Partner port 3 address XX:XX:XX:XX:XX:XX key 1
Last clearing of "show interface" counters: never
10 seconds input rate 0 packets/sec, 0 bits/sec, 0 Bytes/sec
10 seconds output rate 0 packets/sec, 0 bits/sec, 0 Bytes/sec
Input statistics:
274 packets, 59031 octets
0 Multicasts, 0 Broadcasts, 274 Unicasts
0 error, 19 discarded
Output statistics:
385 packets, 78115 octets
0 Multicasts, 0 Broadcasts, 385 Unicasts
0 error, 0 discarded
Time since last interface status change: 00:01:18 |