From b416404991461ed03eb27d6f8aba746f2ac574d7 Mon Sep 17 00:00:00 2001 From: jdubois Date: Tue, 24 Aug 2021 12:14:05 +0200 Subject: [PATCH] Modif VPC --- SwitchCisco.md | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/SwitchCisco.md b/SwitchCisco.md index 526e6e3b..e6cd4448 100644 --- a/SwitchCisco.md +++ b/SwitchCisco.md @@ -1710,11 +1710,11 @@ Cependant, dans le cas où le lien entre Serveur2 et SW01 est down, alors le paq Sur SW01 et SW02, prenons : -* Eth1/3 comme lien VPC peer-link -* Eth1/5 comme lien VPC keepalive -* Eth1/25 comme port membre VPC pour Serveur1 -* Eth1/27 comme port membre VPC pour Serveur2 -* Eth1/29 comme port orphelin pour Serveur3 +* Eth1/48 comme lien VPC keepalive +* Eth1/49 comme lien VPC peer-link +* Eth1/1 comme port membre VPC pour Serveur1 +* Eth1/2 comme port membre VPC pour Serveur2 +* Eth1/3 comme port orphelin pour Serveur3 Et on utilisera des Port-Channel ayant les mêmes numéros que les interfaces physiques auxquelles elle sont rattachées. @@ -1762,13 +1762,13 @@ La commande `peer-switch` permet aux 2 switchs d'apparaître comme un seul même On crée le VPC peer-link, sur SW01 et SW02 : ~~~ -Switch(config)# interface Ethernet1/3 +Switch(config)# interface Ethernet1/49 Switch(config-if)# description vPC Peerlink Switch(config-if)# switchport mode trunk Switch(config-if)# switchport trunk allowed vlan <1-4094> -Switch(config-if)# channel-group 3 mode active +Switch(config-if)# channel-group 49 mode active -Switch(config)# interface port-channel3 +Switch(config)# interface port-channel49 Switch(config-if)# description vPC Peerlink Switch(config-if)# vpc peer-link ~~~ @@ -1776,12 +1776,12 @@ Switch(config-if)# vpc peer-link On crée le VPC keepalive, sur SW01 et SW02 : ~~~ -Switch(config)# interface Ethernet1/5 +Switch(config)# interface Ethernet1/48 Switch(config-if)# description vPC Keepalive Switch(config-if)# no switchport -Switch(config-if)# channel-group 5 mode active +Switch(config-if)# channel-group 48 mode active -Switch(config)# interface port-channel5 +Switch(config)# interface port-channel48 Switch(config-if)# description vPC Keepalive Switch(config-if)# vrf member VPC_KEEPALIVE Switch(config-if)# no switchport @@ -1794,37 +1794,39 @@ Enfin, on configure les 2 ports membres VPC : Pour Serveur1, sur SW01 et SW02 : ~~~ -Switch(config)# interface Eth1/25 -Switch(config-if)# channel-group 25 mode active +Switch(config)# interface Eth1/1 +Switch(config-if)# channel-group 1 mode active -Switch(config)# interface port-channel25 -Switch(config-if)# vpc 25 +Switch(config)# interface port-channel1 +Switch(config-if)# vpc 1 Switch(config-if)# switchport access vlan <1-4094> ~~~ Pour Serveur2, sur SW01 et SW02 : ~~~ -Switch(config)# interface Eth1/27 -Switch(config-if)# channel-group 27 mode active +Switch(config)# interface Eth1/2 +Switch(config-if)# channel-group 2 mode active -Switch(config)# interface port-channel27 -Switch(config-if)# vpc 27 +Switch(config)# interface port-channel2 +Switch(config-if)# vpc 2 Switch(config-if)# switchport access vlan <1-4094> ~~~ La configuration des ports devra ensuite se faire sur les interfaces `port-channel` ; l'interface physique (ou les interfaces physiques, s'il y en a plusieurs) membre du port-channel héritera automatiquement de la configuration. +**Attention** : Lors du branchement si le VPC est déjà configuré, il faut brancher en premier le lien `peer-link`, et ensuite le lien `keepalive`, pour éviter que le VPC secondary ne coupe ses ports membres VPC le temps du branchement complet. + * Ports orphelins : -Dans notre cas, si le VPC peer-link est down, alors SW02 (qui est VPC secondary) coupera tous ses ports allant vers des membres VPC, soit Eth1/25 et Eth1/27. Serveur3 sera alors isolé et ne pourra communiquer qu'avec les autres éventuels ports orphelins. +Dans notre cas, si le VPC peer-link est down, alors SW02 (qui est VPC secondary) coupera tous ses ports allant vers des membres VPC, soit Eth1/1 et Eth1/2. Serveur3 sera alors isolé et ne pourra communiquer qu'avec les autres éventuels ports orphelins. Cependant si Serveur3 était configuré par exemple pour du bonding en mode active/backup ou en mode [ALB](HowtoDebian/Reseau#mode-alb) en étant branché à la fois sur SW01 et SW02, alors le failover ne se ferait pas pour Serveur3 et des problèmes de communications aurraient lieux. Dans ce cas, on souhaiterait que le lien entre Serveur3 et SW02 se coupe pour que la communication entre Serveur1, Serveur2 et Serveur3 fonctionne par SW01. Pour ça, sur le port où est branché Serveur3, il faut configurer la commande suivante : ~~~ -Switch(config)# interface Eth1/29 +Switch(config)# interface Eth1/3 Switch(config-if)# vpc orphan-port suspend ~~~