Wstęp
Celem ćwiczenia jest skonfigurowanie interfejsów zaagregowanych Po oraz sekcji mlag na przełączniku LEAF-4 tworzącego z przełącznikiem LEAF-3 parę pracującą w technologii MLAG 1.
Minimalne wymagania sprzętowo do samodzielnego uruchomienia środowiska:
Elementy LAB1 | 6 cEOS & 0 Linux nodes |
Wymagane zasoby sprzętowe | 4vCPU 16 GB |
Topologia | LAB1_MLAG.yaml |
Dokumentacja Producenta | · MLAG guide · cEOS guide |
Informacja o wersjach 2 | apiusLAB , ceos64-lab:4.27.1.1F |
Schemat połączeń / topologia fizyczna
Topologię fizyczną, organziację połączeń w naszej sieci przedstawia rysunek:
Start
Menu apiusLAB
Po skonfigurowaniu i uruchomieniu środowiska apiusLAB (VM + docker + github repo: LAB1_MLAG + kontenery: cEOS oraz apius lab), uruchamiamy nasze laboratorium wybierając z MENU konsoli ApiusLAB ćwiczenie: 01 MLAG, a następnie w podmenu ponownie: 01 - uruchom LABa'a.
========== Menu Głowne: Opcje wyboru ==========
Wybierz LAB'a:
01. MLAG
02. Leaf & Spine
03. VxLAN
04. EVPN VxLAN L2
05. EVPN VxLAN L3
06. Telemetria gRPC
88. Reset
99. Wyjście
Co chciałbyś zrobić?
W rezultacie po kilku minutach zostanie uruchomione środowisko: powołane zostaną kontenery cEOS oraz utworzone połączenia sieciowe przy pomocy narzędzia containerlab zgodnie z zadaną topologią opisaną deklaratywnie w pliku YAML: LAB1_MLAG.yaml:
'
+---+--------------------------+-----------+----------+--------------+---------------------------------+------+---------+-------------------+--------------+
| # | Topo Path | Lab Name | Name | Container ID | Image | Kind | State | IPv4 Address | IPv6 Address |
+---+--------------------------+-----------+----------+--------------+---------------------------------+------+---------+-------------------+--------------+
| 1 | LAB1_MLAG/LAB1_MLAG.yaml | LAB1_MLAG | CLIENT-1 | 1832039eabec | marekplaza/ceos64-lab:4.27.1.1F | ceos | running | 172.100.100.1/24 | N/A |
| 2 | | | CLIENT-2 | 034fa3b9b8b0 | marekplaza/ceos64-lab:4.27.1.1F | ceos | running | 172.100.100.2/24 | N/A |
| 3 | | | LEAF-1 | f8e12dbcd101 | marekplaza/ceos64-lab:4.27.1.1F | ceos | running | 172.100.100.12/24 | N/A |
| 4 | | | LEAF-2 | f125f9195ef5 | marekplaza/ceos64-lab:4.27.1.1F | ceos | running | 172.100.100.13/24 | N/A |
| 5 | | | LEAF-3 | bd17d7473194 | marekplaza/ceos64-lab:4.27.1.1F | ceos | running | 172.100.100.14/24 | N/A |
| 6 | | | LEAF-4 | 7de176deb149 | marekplaza/ceos64-lab:4.27.1.1F | ceos | running | 172.100.100.15/24 | N/A |
| 7 | | | SPINE-1 | 7cc0f23c2897 | marekplaza/ceos64-lab:4.27.1.1F | ceos | running | 172.100.100.10/24 | N/A |
| 8 | | | SPINE-2 | 63077f4f0964 | marekplaza/ceos64-lab:4.27.1.1F | ceos | running | 172.100.100.11/24 | N/A |
+---+--------------------------+-----------+----------+--------------+---------------------------------+------+---------+-------------------+--------------+
W naszym przypadku wygodniejszym sposobem będzie skorzytanie z ApiusLAB i wybór opcji: 04 "Screen do wszystkich routerów:
========== Menu Głowne -> Wybierz LAB'a -> LAB1_MLAG ==========
02. Restartuj LAB
03. Wyłącz LAB
04. Screen do wszystkich routerów
05. Shell/Bash
99. Powrót
Co chciałbyś zrobić?
W oddzielnych zakładkach uzyskujemy dostęp do CLI uruchomionych "urządzeń".
screen - nawigacja
Wazniejsze skróty klawiszowe do pracy z screen:
ctrl+a n
- Przejście do następnej zakładki.ctrl+a p
- Przejście do poprzedniej zakładkictrl+a d
- Zamknięcie wszystkich zakładek, przejście do poprzedniego MENU
Info
Do każdego z kontenerów, z poziomu hosta możemy zalogować się przy pomocy prokołu ssh używając nazw DNS (Name) oraz poświadczeń login/password: admin/admin.
Konfiguracje startowe
Ponizej znajdują się konfiugracje startowe, z którymi zostaną uruchomione kontenery cEOS. Konfiguracje do wglądu dostępne są równiez w postaci repozytorium na GitHub.
hostname {{ .ShortName }}
!
no aaa root
!
username admin privilege 15 secret admin
username cvpadmin privilege 15 role network-admin secret sha512 $6$IvmYcGkpLFv.DZXu$JKI11Ocs0gqsnm.jXGU.XRU3I.NasSQVVzywH0Vk1HLfLFamFL6nwKjcDPzpqgALj13CDBUFIY7HL2OYvRhOa1
!
service routing protocols model multi-agent
!
interface Management0
vrf mgmt
{{ if .MgmtIPv4Address }}ip address {{ .MgmtIPv4Address }}/{{.MgmtIPv4PrefixLength}}{{end}}
{{ if .MgmtIPv6Address }}ipv6 address {{ .MgmtIPv6Address }}/{{.MgmtIPv6PrefixLength}}{{end}}
no lldp transmit
no lldp receive
!
interface Port-Channel1
no switchport
ip address 172.16.112.201/24
!
interface Port-Channel2
no switchport
ip address 172.16.115.100/24
!
interface Ethernet1
channel-group 1 mode active
lacp timer fast
!
interface Ethernet2
channel-group 1 mode active
lacp timer fast
!
interface Ethernet3
channel-group 2 mode active
lacp timer fast
!
interface Ethernet4
channel-group 2 mode active
lacp timer fast
!
ip route 172.16.116.0/24 172.16.115.1
ip route 172.16.134.0/24 172.16.112.1
!
vrf instance mgmt
!
ip routing
!
ip routing vrf mgmt
!
management api gnmi
transport grpc default
vrf mgmt
!
management api netconf
transport ssh default
vrf mgmt
!
management api http-commands
protocol http
protocol unix-socket
no shutdown
!
vrf mgmt
no shutdown
!
ip name-server vrf mgmt 8.8.8.8
!
ntp server vrf mgmt tempus1.gum.gov.pl iburst
!
ip route vrf mgmt 0.0.0.0/0 172.100.100.250
end
hostname {{ .ShortName }}
!
no aaa root
!
username admin privilege 15 secret admin
username cvpadmin privilege 15 role network-admin secret sha512 $6$IvmYcGkpLFv.DZXu$JKI11Ocs0gqsnm.jXGU.XRU3I.NasSQVVzywH0Vk1HLfLFamFL6nwKjcDPzpqgALj13CDBUFIY7HL2OYvRhOa1
!
service routing protocols model multi-agent
!
interface Management0
vrf mgmt
{{ if .MgmtIPv4Address }}ip address {{ .MgmtIPv4Address }}/{{.MgmtIPv4PrefixLength}}{{end}}
{{ if .MgmtIPv6Address }}ipv6 address {{ .MgmtIPv6Address }}/{{.MgmtIPv6PrefixLength}}{{end}}
no lldp transmit
no lldp receive
!
interface Port-Channel1
no switchport
ip address 172.16.112.202/24
!
interface Port-Channel2
no switchport
ip address 172.16.116.100/24
!
interface Ethernet1
channel-group 1 mode active
!
interface Ethernet2
channel-group 1 mode active
!
interface Ethernet3
channel-group 2 mode active
!
interface Ethernet4
channel-group 2 mode active
!
!
ip route 172.16.115.0/24 172.16.116.1
ip route 172.16.112.0/24 172.16.134.1
!
vrf instance mgmt
!
ip routing
!
ip routing vrf mgmt
!
management api gnmi
transport grpc default
vrf mgmt
!
management api netconf
transport ssh default
vrf mgmt
!
management api http-commands
protocol http
protocol unix-socket
no shutdown
!
vrf mgmt
no shutdown
!
ip name-server vrf mgmt 8.8.8.8
!
ntp server vrf mgmt tempus1.gum.gov.pl iburst
!
ip route vrf mgmt 0.0.0.0/0 172.100.100.250
end
hostname {{ .ShortName }}
!
no aaa root
!
username admin privilege 15 secret admin
username cvpadmin privilege 15 role network-admin secret sha512 $6$IvmYcGkpLFv.DZXu$JKI11Ocs0gqsnm.jXGU.XRU3I.NasSQVVzywH0Vk1HLfLFamFL6nwKjcDPzpqgALj13CDBUFIY7HL2OYvRhOa1
!
service routing protocols model multi-agent
!
interface Management0
vrf mgmt
{{ if .MgmtIPv4Address }}ip address {{ .MgmtIPv4Address }}/{{.MgmtIPv4PrefixLength}}{{end}}
{{ if .MgmtIPv6Address }}ipv6 address {{ .MgmtIPv6Address }}/{{.MgmtIPv6PrefixLength}}{{end}}
no lldp transmit
no lldp receive
!
no spanning-tree vlan-id 4094
!
vlan 12
name CLIENT
!
vlan 4094
trunk group MLAGPEER
!
interface Port-Channel33
description MLAG - HOST1
switchport mode access
switchport access vlan 12
mlag 33
!
interface Port-Channel56
description MLAG PEER LINK - LEAF2
switchport mode trunk
switchport trunk group MLAGPEER
!
interface Port-Channel12
description MLAG - SPINE1 & 2
switchport mode trunk
mlag 12
!
interface Ethernet1
description SPINE1
switchport mode trunk
channel-group 12 mode active
!
interface Ethernet2
description SPINE2
switchport mode trunk
channel-group 12 mode active
!
interface Ethernet3
description HOST1
channel-group 33 mode active
!
interface Ethernet4
shutdown
!
interface Ethernet5
description MLAG PEER LINK - LEAF2
switchport mode trunk
channel-group 56 mode active
!
interface Ethernet6
description MLAG PEER LINK - LEAF2
switchport mode trunk
channel-group 56 mode active
!
interface Vlan4094
description MLAG PEER LINK
ip address 172.16.12.1/30
!
mlag configuration
domain-id MLAG12
local-interface Vlan4094
peer-address 172.16.12.2
peer-link Port-Channel56
!
vrf instance mgmt
!
ip routing
!
ip routing vrf mgmt
!
management api gnmi
transport grpc default
vrf mgmt
!
management api netconf
transport ssh default
vrf mgmt
!
management api http-commands
protocol http
protocol unix-socket
no shutdown
!
vrf mgmt
no shutdown
!
ip name-server vrf mgmt 8.8.8.8
!
ntp server vrf mgmt tempus1.gum.gov.pl iburst
!
ip route vrf mgmt 0.0.0.0/0 172.100.100.250
end
hostname {{ .ShortName }}
!
no aaa root
!
username admin privilege 15 secret admin
username cvpadmin privilege 15 role network-admin secret sha512 $6$IvmYcGkpLFv.DZXu$JKI11Ocs0gqsnm.jXGU.XRU3I.NasSQVVzywH0Vk1HLfLFamFL6nwKjcDPzpqgALj13CDBUFIY7HL2OYvRhOa1
!
service routing protocols model multi-agent
!
interface Management0
vrf mgmt
{{ if .MgmtIPv4Address }}ip address {{ .MgmtIPv4Address }}/{{.MgmtIPv4PrefixLength}}{{end}}
{{ if .MgmtIPv6Address }}ipv6 address {{ .MgmtIPv6Address }}/{{.MgmtIPv6PrefixLength}}{{end}}
no lldp transmit
no lldp receive
!
no spanning-tree vlan-id 4094
!
vlan 12
name CLIENT
!
vlan 4094
trunk group MLAGPEER
!
interface Port-Channel33
description MLAG - HOST1
switchport mode access
switchport access vlan 12
mlag 33
!
interface Port-Channel56
description MLAG PEER LINK - LEAF1
switchport mode trunk
switchport trunk group MLAGPEER
!
interface Port-Channel12
description MLAG - SPINE1 & 2
switchport mode trunk
mlag 12
!
interface Ethernet1
description SPINE1
switchport mode trunk
channel-group 12 mode active
!
interface Ethernet2
description SPINE2
switchport mode trunk
channel-group 12 mode active
!
interface Ethernet3
description HOST1
channel-group 33 mode active
!
interface Ethernet4
shutdown
!
interface Ethernet5
description MLAG PEER LINK - LEAF1
switchport mode trunk
channel-group 56 mode active
!
interface Ethernet6
description MLAG PEER LINK - LEAF1
switchport mode trunk
channel-group 56 mode active
!
interface Vlan4094
description MLAG PEER LINK
ip address 172.16.12.2/30
!
mlag configuration
domain-id MLAG12
local-interface Vlan4094
peer-address 172.16.12.1
peer-link Port-Channel56
!
vrf instance mgmt
!
ip routing
!
ip routing vrf mgmt
!
management api gnmi
transport grpc default
vrf mgmt
!
management api netconf
transport ssh default
vrf mgmt
!
management api http-commands
protocol http
protocol unix-socket
no shutdown
!
vrf mgmt
no shutdown
!
ip name-server vrf mgmt 8.8.8.8
!
ntp server vrf mgmt tempus1.gum.gov.pl iburst
!
ip route vrf mgmt 0.0.0.0/0 172.100.100.250
end
hostname {{ .ShortName }}
!
no aaa root
!
username admin privilege 15 secret admin
username cvpadmin privilege 15 role network-admin secret sha512 $6$IvmYcGkpLFv.DZXu$JKI11Ocs0gqsnm.jXGU.XRU3I.NasSQVVzywH0Vk1HLfLFamFL6nwKjcDPzpqgALj13CDBUFIY7HL2OYvRhOa1
!
service routing protocols model multi-agent
!
interface Management0
vrf mgmt
{{ if .MgmtIPv4Address }}ip address {{ .MgmtIPv4Address }}/{{.MgmtIPv4PrefixLength}}{{end}}
{{ if .MgmtIPv6Address }}ipv6 address {{ .MgmtIPv6Address }}/{{.MgmtIPv6PrefixLength}}{{end}}
no lldp transmit
no lldp receive
!
no spanning-tree vlan-id 4094
!
vlan 12
name CLIENT
!
vlan 4094
trunk group MLAGPEER
!
interface Port-Channel44
description MLAG - HOST2
switchport mode access
switchport access vlan 12
mlag 44
!
interface Port-Channel10
description MLAG PEER LINK - LEAF4
switchport mode trunk
switchport trunk group MLAGPEER
!
interface Port-Channel34
description MLAG - SPINE1 & 2
switchport mode trunk
mlag 34
!
interface Ethernet1
description SPINE1
switchport mode trunk
channel-group 34 mode active
!
interface Ethernet2
description SPINE2
switchport mode trunk
channel-group 34 mode active
!
interface Ethernet3
shutdown
!
interface Ethernet4
description HOST2
channel-group 44 mode active
!
interface Ethernet5
description MLAG PEER LINK - LEAF4
switchport mode trunk
channel-group 10 mode active
!
interface Ethernet6
description MLAG PEER LINK - LEAF4
switchport mode trunk
channel-group 10 mode active
!
interface Vlan4094
description MLAG PEER LINK
ip address 172.16.34.1/30
!
mlag configuration
domain-id MLAG34
local-interface Vlan4094
peer-address 172.16.34.2
peer-link Port-Channel56
!
vrf instance mgmt
!
ip routing
!
ip routing vrf mgmt
!
management api gnmi
transport grpc default
vrf mgmt
!
management api netconf
transport ssh default
vrf mgmt
!
management api http-commands
protocol http
protocol unix-socket
no shutdown
!
vrf mgmt
no shutdown
!
ip name-server vrf mgmt 8.8.8.8
!
ntp server vrf mgmt tempus1.gum.gov.pl iburst
!
ip route vrf mgmt 0.0.0.0/0 172.100.100.250
end
hostname {{ .ShortName }}
!
no aaa root
!
username admin privilege 15 secret admin
username cvpadmin privilege 15 role network-admin secret sha512 $6$IvmYcGkpLFv.DZXu$JKI11Ocs0gqsnm.jXGU.XRU3I.NasSQVVzywH0Vk1HLfLFamFL6nwKjcDPzpqgALj13CDBUFIY7HL2OYvRhOa1
!
service routing protocols model multi-agent
!
interface Management0
vrf mgmt
{{ if .MgmtIPv4Address }}ip address {{ .MgmtIPv4Address }}/{{.MgmtIPv4PrefixLength}}{{end}}
{{ if .MgmtIPv6Address }}ipv6 address {{ .MgmtIPv6Address }}/{{.MgmtIPv6PrefixLength}}{{end}}
no lldp transmit
no lldp receive
!
vrf instance mgmt
!
ip routing
!
ip routing vrf mgmt
!
management api gnmi
transport grpc default
vrf mgmt
!
management api netconf
transport ssh default
vrf mgmt
!
management api http-commands
protocol http
protocol unix-socket
no shutdown
!
vrf mgmt
no shutdown
!
ip name-server vrf mgmt 8.8.8.8
!
ntp server vrf mgmt tempus1.gum.gov.pl iburst
!
ip route vrf mgmt 0.0.0.0/0 172.100.100.250
end
hostname {{ .ShortName }}
!
no aaa root
!
username admin privilege 15 secret admin
username cvpadmin privilege 15 role network-admin secret sha512 $6$IvmYcGkpLFv.DZXu$JKI11Ocs0gqsnm.jXGU.XRU3I.NasSQVVzywH0Vk1HLfLFamFL6nwKjcDPzpqgALj13CDBUFIY7HL2OYvRhOa1
!
service routing protocols model multi-agent
!
interface Management0
vrf mgmt
{{ if .MgmtIPv4Address }}ip address {{ .MgmtIPv4Address }}/{{.MgmtIPv4PrefixLength}}{{end}}
{{ if .MgmtIPv6Address }}ipv6 address {{ .MgmtIPv6Address }}/{{.MgmtIPv6PrefixLength}}{{end}}
no lldp transmit
no lldp receive
!
no spanning-tree vlan-id 4094
!
vlan 4094
trunk group MLAGPEER
!
vlan 12
name CLIENT
!
interface Port-Channel56
description MLAG PEER LINK - SPINE2
switchport mode trunk
switchport trunk group MLAGPEER
!
interface Port-Channel12
description MLAG - LEAF1 & 2
switchport mode trunk
mlag 12
!
interface Port-Channel34
description MLAG - LEAF3 & 4
switchport mode trunk
mlag 34
!
interface Ethernet1
description LEAF1
switchport mode trunk
channel-group 12 mode active
!
interface Ethernet2
description LEAF2
switchport mode trunk
channel-group 12 mode active
!
interface Ethernet3
description LEAF3
switchport mode trunk
channel-group 34 mode active
!
interface Ethernet4
description LEAF4
switchport mode trunk
channel-group 34 mode active
!
interface Ethernet5
description SPINE2
switchport mode trunk
channel-group 56 mode active
!
interface Ethernet6
description SPINE2
switchport mode trunk
channel-group 56 mode active
!
interface Vlan12
ip address 172.16.112.2/24
ip virtual-router address 172.16.112.1
!
ip virtual-router mac-address 00:1c:73:AA:AA:A1
!
interface Vlan4094
description MLAG PEER LINK
ip address 172.16.11.1/30
!
mlag configuration
domain-id MLAG01
local-interface Vlan4094
peer-address 172.16.11.2
peer-link Port-Channel56
!
vrf instance mgmt
!
ip routing
!
ip routing vrf mgmt
!
management api gnmi
transport grpc default
vrf mgmt
!
management api netconf
transport ssh default
vrf mgmt
!
management api http-commands
protocol http
protocol unix-socket
no shutdown
!
vrf mgmt
no shutdown
!
ip name-server vrf mgmt 8.8.8.8
!
ntp server vrf mgmt tempus1.gum.gov.pl iburst
!
ip route vrf mgmt 0.0.0.0/0 172.100.100.250
end
hostname {{ .ShortName }}
!
no aaa root
!
username admin privilege 15 secret admin
username cvpadmin privilege 15 role network-admin secret sha512 $6$IvmYcGkpLFv.DZXu$JKI11Ocs0gqsnm.jXGU.XRU3I.NasSQVVzywH0Vk1HLfLFamFL6nwKjcDPzpqgALj13CDBUFIY7HL2OYvRhOa1
!
service routing protocols model multi-agent
!
interface Management0
vrf mgmt
{{ if .MgmtIPv4Address }}ip address {{ .MgmtIPv4Address }}/{{.MgmtIPv4PrefixLength}}{{end}}
{{ if .MgmtIPv6Address }}ipv6 address {{ .MgmtIPv6Address }}/{{.MgmtIPv6PrefixLength}}{{end}}
no lldp transmit
no lldp receive
!
no spanning-tree vlan-id 4094
!
vlan 12
name CLIENT
!
vlan 4094
trunk group MLAGPEER
!
interface Port-Channel56
description MLAG PEER LINK - SPINE1
switchport mode trunk
switchport trunk group MLAGPEER
!
interface Port-Channel12
description MLAG - LEAF1 & 2
switchport mode trunk
mlag 12
!
interface Port-Channel34
description MLAG - LEAF3 & 4
switchport mode trunk
mlag 34
!
interface Ethernet1
description LEAF1
switchport mode trunk
channel-group 12 mode active
!
interface Ethernet2
description LEAF2
switchport mode trunk
channel-group 12 mode active
!
interface Ethernet3
description LEAF3
switchport mode trunk
channel-group 34 mode active
!
interface Ethernet4
description LEAF4
switchport mode trunk
channel-group 34 mode active
!
interface Ethernet5
description SPINE1
switchport mode trunk
channel-group 56 mode active
!
interface Ethernet6
description SPINE2
switchport mode trunk
channel-group 56 mode active
!
interface Vlan12
ip address 172.16.112.3/24
ip virtual-router address 172.16.112.1
!
ip virtual-router mac-address 00:1c:73:AA:AA:A1
!
interface Vlan4094
description MLAG PEER LINK
ip address 172.16.11.2/30
!
mlag configuration
domain-id MLAG01
local-interface Vlan4094
peer-address 172.16.11.1
peer-link Port-Channel56
!
vrf instance mgmt
!
ip routing
!
ip routing vrf mgmt
!
management api gnmi
transport grpc default
vrf mgmt
!
management api netconf
transport ssh default
vrf mgmt
!
management api http-commands
protocol http
protocol unix-socket
no shutdown
!
vrf mgmt
no shutdown
!
ip name-server vrf mgmt 8.8.8.8
!
ntp server vrf mgmt tempus1.gum.gov.pl iburst
!
ip route vrf mgmt 0.0.0.0/0 172.100.100.250
end
Schemat topologii logicznej MLAG / Port-channel
Schemat ukazuje organziację i nazewnictwo skonfigurowanych i brakujących konfiguracji portów typu Port-Channel wchodzących w skład poszczególnych MultiChassis LAG'ów.
Krok po Kroku
Skonfiguruj MLAG na LEAF-4 według ponizszych wskazówek
1. Weryfikacja stanu początkowego
Zweryfikuj początkowy stan urządzeń. Porównaj konfigurację MLAG i Port-Channel na LEAF1 i 2 oraz drugiej parze LEAF-3 i 4.
Wykorzystaj komendy:
show mlag
show mlag detail
show mlag interfaces
show port-channel
Tip
Zobacz jakie opcje oferuje komenda show port-channel:
LEAF-4#show port-channel ?
active-ports Display info on ports that are active members of the LAG
all-ports Display info on all ports configured for LAG, even those not currently active
brief Display all port-channel status briefly
dense Display summary of port-channel status
detailed Display detailed port-channel status
limits Display limits on port-channel membership
load-balance Display traffic distribution of port-channel members
$ list end
<1-999999> Channel Group ID(s)
> Redirect output to URL
>> Append redirected output to URL
| Command output pipe filters
2. Port-channel Peer Link pomiędzy Leaf-3 i Leaf-4 (dataplane)
Skonfigurguj Port-channel56 na LEAF-4 do komunikacji pomiędzy Leaf-3 & 4:
dodawanie portów fizycznych et5 i et6 do interfejsu logicznego Po56:
Note
channel-group to grupa interfejsów na pojedynczym przełączniku Arista. Interejsy dopisane do channel-group zostają powiązana z interfejsem port-channel natychmiast po jej utworzeniu. Polecenie grupy kanałów niejawnie tworzy pasujący kanał portu o tym samym identyfikatorze, który w tym przypadku wynosi 56. Polecenie łącza trunk w trybie switchport zezwala na wszystkie sieci VLAN na kanale portu 56.
3. Weryfikacja działania Peer-Link
show interfaces status
show lldp neighbors
show interfaces trunk
show port-channel 56 detailed
Tip
Każdemu przełącznikowi przypisywany jest globalnie unikalny identyfikator sysID
przez połączenie 16-bitowego identyfikatora: priority system z 48-bitowym adresem MAC jednego z portów fizycznych przełącznika. Identyfikator sysID
jest używany przez urządzenia podczas tworzenia interfejsu agregregowanego w celu sprawdzenia, czy wszystkie łącza pochodzą z tego samego przełącznika.
4. Konfiguracja MLAG VLAN (Layer 2 and Layer 3).
W naszym przykładzie konfigurujemy trunk grupę MLAGPEER
w vlanie 4094.
Dodatkowo wyłączamy protokół spannig-tree protocol (STP) dla VLAN4094
i tym samym łącza peer-link (Po56), aby zapobiec potencjalnym zakłóceniom pochodzącym z niestabilności STP. Ponieważ obecność VLAN 4094
została ograniczona tylko do peerlinku (Po56) i trunk grupę MLAGPEER, szansa na wystąpienie pętli jest praktycznie wyeliminowana. Aby zapobiec pętlom, NIE dodawaj tej trunk grupy (MLAGPEER)
do żadnych innych interfejsów.
Note
Abstrakt trunk-group to obiekt - zestaw, na który składają się interfejsy typu trunk'a i listy sieci VLAN. Ruch w danym VLANie należącym do jednej lub więcej trunk group jest przenoszony tylko na portach, które są członkami grupy i do których należy dany VLAN. Inaczej mówiąc VLANy skonfigurowane w ramach trunk group są „pruned off” ze wszystkich portów, które nie są skojarzone z tą trunk-group.
configure
vlan 4094
trunk group MLAGPEER
interface port-channel 56
switchport trunk group MLAGPEER
no spanning-tree vlan-id 4094
Dodatkowo na potrzeby warstwy Control-Plane konfigurujemy adresację IP dla interfejsy SVI (SubInterface VLAN)
Przetestuj odpowiedz z LEAF-3
Warning
Adrescja P2P 172.16.34.0/30
moze być dowolną adresacją unicast, która nie konfliktuje z pozostałą adresacją na urządzeniu. Adresacja peerlink ma znaczenie lokalne, dla kazdej pary MLAG moze to byc dowolna adresacja IP unicast.
Interfejs SVI warstwy L3 dla VLAN4094
zapewnia wymianę komunikacji warstwy kontrolnej MLAG pomiędzy parą przełączników. Peer-link przenosi takze ruch typu data (data-plane) w przypadku awarii, któregość z uplinków do przełączników SPINE.
5. Zdefiniuj domenę MLAG
Natomiast identyfikator domain-id MLAG34 determinuje jednoznacznie domenę - parę przełączników MLAG. Domain-id jest parametrem case-sensitive i musi być dokładnie taki sam na obu urządzeniach.
configure
mlag
domain-id MLAG34
local-interface vlan 4094
peer-address 172.16.34.1
peer-link port-channel 56
6. Skonfiguruj interfejsy Port-channel i interfejsy fizyczne uplink do SPINE-1 i 2
Konfigurujemy zatem interfjes Po34. Zwróc uwagę, i do konfiguracji interfejsu Port-channel koniecznie musimy dodać komendę mlag 34 identyfikującą rozproszony interfejs zagregowany MLAG.
configure
interface port-channel 34
description MLAG - SPINE1 & 2
switchport mode trunk
mlag 34
interface ethernet 1
description SPINE1
channel-group 34 mode active
interface ethernet 2
description SPINE2
channel-group 34 mode active
Note
Poleceniem mlag 34
przypisujemy MLAG ID do interfejsu port-channel 34. Przełączniki (MLAG Peers) sformują interfejs logiczny, rozproszony, zagregowany Port-channel - MultiChassis LAG (MLAG)) posiadających oczywiście ten sam domain-id, gdy wskazemy ten sam identyfikator MLAG ID do kazdego interfejsu port-channel. MLAG ID ma zasięg globalny per konfiguracja przełącznika, dla kazdego intefejsu MLAG musi być unikalny.
7. Skonfiguruj interfejs Port-channel i interfejsy fizyczne uplink do CLIENT-2
Dla przykładu identygikator MLAG ID przyjmuje tutaj wartość 4. konfigurujemy Port-channel 44 w tyrbie access (port dostępowy) o VLAN ID 12.
Korzystając z dostarczonego diagramu lub weryfikując, gdzie fizycznie mamy podłączonego CLIENT'a-2:
LEAF-4>show lldp neighbors
Last table change time : 13:29:37 ago
Number of table inserts : 13
Number of table deletes : 1
Number of table drops : 0
Number of table age-outs : 1
Port Neighbor Device ID Neighbor Port ID TTL
---------- ------------------------ ---------------------- ---
Et1 SPINE-1 Ethernet4 120
Et2 SPINE-2 Ethernet4 120
Et4 CLIENT-2 Ethernet2 120
Et5 LEAF-3 Ethernet5 120
Et6 LEAF-3 Ethernet6 120
i finalnie konfigurujemy port et4:
8. Weryfikujemy konfigurację LEAF-4
Weryfikujemy wprowadzoną konfigurację uzywając ponizszych komend.
show mlag
show mlag detail
show mlag interfaces
Weryfikujemy połączenia
show interfaces status
show lldp neighbors
show interface trunk
show port-channel 34 detailed
<- uplink do SPINE-1 i 2show port-channel 44 detailed
<- downlink do CLIENT-2show port-channel 56 detailed
<- interlink PeerLink pomiędzy LEAF3 i 4
finalnie spradzamy łaczność pomiędzy CLIENT-1 do CLIENT-2 polecniem ping bądź ssh:
CLIENT-1>ping ip 172.16.112.202
PING 172.16.112.202 (172.16.112.202) 72(100) bytes of data.
80 bytes from 172.16.112.202: icmp_seq=1 ttl=64 time=128 ms
80 bytes from 172.16.112.202: icmp_seq=2 ttl=64 time=131 ms
80 bytes from 172.16.112.202: icmp_seq=3 ttl=64 time=161 ms
80 bytes from 172.16.112.202: icmp_seq=4 ttl=64 time=156 ms
80 bytes from 172.16.112.202: icmp_seq=5 ttl=64 time=177 ms
--- 172.16.112.202 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 42ms
rtt min/avg/max/mdev = 128.001/151.127/177.659/18.701 ms, pipe 5, ipg/ewma 10.734/140.866 ms
CLIENT-1>
CLIENT-1>ssh -l admin 172.16.112.202
Warning: Permanently added '172.16.112.202' (ECDSA) to the list of known hosts.
Password:
CLIENT-2>
LAB UKOŃCZONY!
Finalnie logiczna infrastruktura prezentuje się jak na rysunku: