274 lines
6.9 KiB
Markdown
274 lines
6.9 KiB
Markdown
#
|
||
|
||
## Exercice 1
|
||
|
||
```
|
||
SW1#
|
||
SW1#configure terminal
|
||
SW1(config)#vlan 10
|
||
SW1(config-vlan)#name VLAN0010
|
||
SW1(config-vlan)#interface Fa0/1
|
||
SW1(config-if)#switchport mode access
|
||
SW1(config-if)#switchport access vlan 10
|
||
SW1(config-if)#no shutdown
|
||
SW1(config-if)#end
|
||
SW1#write memory
|
||
```
|
||
|
||
```
|
||
SW1#
|
||
SW1#configure terminal
|
||
SW1(config)#interface Fa0/3
|
||
SW1(config-if)#switchport mode trunk
|
||
SW1(config-if)#switchport trunk native vlan 10
|
||
SW1(config-if)#switchport nonegotiate
|
||
SW1(config-if)#end
|
||
SW1#write memory
|
||
```
|
||
|
||
```
|
||
SW1#
|
||
SW1#configure terminal
|
||
SW1(config)#interface Fa0/3
|
||
SW1(config-if)#switchport mode trunk
|
||
SW1(config-if)#switchport trunk native vlan 1
|
||
SW1(config-if)#switchport trunk allowed vlan 1,10,20
|
||
SW1(config-if)#end
|
||
SW1#write memory
|
||
```
|
||
|
||
## Cours
|
||
|
||
### Port-Channelling
|
||
|
||
Agrégation de liens entre plusieurs switchs : augmenter la bande passante à l'infini.
|
||
|
||
- Câble virtuel : nommé LAG (*Link Agregation Group*)
|
||
Une fois créé, le LAG doit être administré comme une interface physique.
|
||
|
||
#### Les standards
|
||
|
||
- Le Port-Channel : standard ouvert de l'IEEE
|
||
- Etherchannel : protocole propriétaire de Cisco
|
||
|
||
De 2 à 8 interfaces physiques max par LAG. Uniquement de même type et de débit. Avec un seul destinataire.
|
||
Maximum 6 LAGs par Switch. (donc 6 LAGs x 8 ports, ça fait un switch de 48 ports).
|
||
|
||
Implémentations :
|
||
- Statiques : l'existence du LAG est décidée par l'admin
|
||
- Dynamiques : les appareils négocient entre eux l'établissement d'un LAG si besoin, via un protocole.
|
||
|
||
Les protocoles d'auto-établissement de LAG :
|
||
- PAgP : Propriétaire Cisco
|
||
- LACP : Standard IEEE 803.2ad
|
||
|
||
Il suffit pour activer de dire `desirable` en console :
|
||
- Desirable : *J'initie la négociation du LAG*
|
||
- Auto : *J'attends qu'on vienne négocier*
|
||
|
||
## Exercice 3
|
||
|
||
### Liaison entre SW1 et SW2
|
||
|
||
```
|
||
Switch1>enable
|
||
Switch1#configure terminal
|
||
Switch1(config)#interface range Fa0/1 - 3
|
||
Switch1(config-if-range)#channel-group 1 mode active
|
||
Switch1(config-if-range)#exit
|
||
Switch1(config)#interface port-channel 1
|
||
Switch1(config-if)#description LACP-SW1-SW2
|
||
Switch1(config-if)#switchport mode trunk
|
||
Switch1(config-if)#exit
|
||
```
|
||
|
||
```
|
||
Switch2>enable
|
||
Switch2#configure terminal
|
||
Switch2(config)#interface range Fa0/4 - 6
|
||
Switch2(config-if-range)#channel-group 1 mode active
|
||
Switch2(config-if-range)#exit
|
||
Switch2(config)#interface port-channel 1
|
||
Switch2(config-if)#description LACP-SW1-SW2
|
||
Switch2(config-if)#switchport mode trunk
|
||
Switch2(config-if)#exit
|
||
```
|
||
|
||
### Liaison entre SW2 et SW3
|
||
|
||
```
|
||
Switch2>enable
|
||
Switch2#configure terminal
|
||
Switch2(config)#interface range Fa0/1 - 3
|
||
Switch2(config-if-range)#channel-group 2 mode active
|
||
Switch2(config-if-range)#exit
|
||
Switch2(config)#interface port-channel 2
|
||
Switch2(config-if)#description LACP-SW2-SW3
|
||
Switch2(config-if)#switchport mode trunk
|
||
Switch2(config-if)#exit
|
||
```
|
||
|
||
```
|
||
Switch3>enable
|
||
Switch3#configure terminal
|
||
Switch3(config)#interface range Fa0/4 - 6
|
||
Switch3(config-if-range)#channel-group 2 mode active
|
||
Switch3(config-if-range)#exit
|
||
Switch3(config)#interface port-channel 2
|
||
Switch3(config-if)#description LACP-SW2-SW3
|
||
Switch3(config-if)#switchport mode trunk
|
||
Switch3(config-if)#exit
|
||
```
|
||
|
||
### Liaison entre SW3 et SW1
|
||
|
||
```
|
||
Switch3>enable
|
||
Switch3#configure terminal
|
||
Switch3(config)#interface range Fa0/1 - 3
|
||
Switch3(config-if-range)#channel-group 3 mode active
|
||
Switch3(config-if-range)#exit
|
||
Switch3(config)#interface port-channel 3
|
||
Switch3(config-if)#description LACP-SW3-SW1
|
||
Switch3(config-if)#switchport mode trunk
|
||
Switch3(config-if)#exit
|
||
```
|
||
|
||
```
|
||
Switch1>enable
|
||
Switch1#configure terminal
|
||
Switch1(config)#interface range Fa0/4 - 6
|
||
Switch1(config-if-range)#channel-group 3 mode active
|
||
Switch1(config-if-range)#exit
|
||
Switch1(config)#interface port-channel 3
|
||
Switch1(config-if)#description LACP-SW3-SW1
|
||
Switch1(config-if)#switchport mode trunk
|
||
Switch1(config-if)#exit
|
||
```
|
||
|
||
## Exercice 4
|
||
|
||
**TP : Mise en œuvre du protocole HSRP dans un réseau redondant**
|
||
|
||
*Objectif*
|
||
Mettre en place une **redondance de passerelle** à l’aide du protocole **HSRP (Hot Standby Router Protocol)**, afin d’assurer la **continuité de service** en cas de défaillance d’un routeur.
|
||
|
||
---
|
||
|
||
**Réseau partagé** : 192.168.1.0/24
|
||
**Passerelle virtuelle HSRP** : 192.168.1.1
|
||
|
||
### 1 & 2
|
||
|
||
```
|
||
Router1>enable
|
||
Router1#configure terminal
|
||
Router1(config)#interface Gig0/0/0
|
||
Router1(config-if)#ip address 192.168.1.200 255.255.255.0
|
||
Router1(config-if)#standby 1 ip 192.168.1.1
|
||
Router1(config-if)#standby 1 priority 150
|
||
Router1(config-if)#standby 1 preempt
|
||
Router1(config-if)#no shutdown
|
||
```
|
||
|
||
```
|
||
Router2>enable
|
||
Router2#configure terminal
|
||
Router2(config)#interface Gig0/0/0
|
||
Router2(config-if)#ip address 192.168.1.201 255.255.255.0
|
||
Router2(config-if)#standby 1 ip 192.168.1.1
|
||
Router2(config-if)#standby 1 priority 100
|
||
Router2(config-if)#standby 1 preempt
|
||
Router2(config-if)#no shutdown
|
||
```
|
||
|
||
### 3
|
||
|
||
```
|
||
Router1#show standby brief
|
||
P indicates configured to preempt.
|
||
|
|
||
Interface Grp Pri P State Active Standby Virtual IP
|
||
Gig0/0/0 1 150 P Active local 192.168.1.201 192.168.1.1
|
||
```
|
||
|
||
```
|
||
Router2#show standby brief
|
||
P indicates configured to preempt.
|
||
|
|
||
Interface Grp Pri P State Active Standby Virtual IP
|
||
Gig0/0/0 1 100 P Standby 192.168.1.200 local 192.168.1.1
|
||
```
|
||
|
||
### 4
|
||
|
||
### 5
|
||
|
||
1. HSRP est fermé par Cisco, VRRP est ouvert.
|
||
2.
|
||
3. L'adresse IP la plus haute remporterait le rôle Actif.
|
||
4. HSRP est une passerelle virtuelle avec du matériel en série pour éviter les SPOF. L'agrégation de liens est autre chose
|
||
|
||
## Exercice 5
|
||
|
||
### Liaison entre SW1 et SW2
|
||
|
||
```
|
||
SW1>enable
|
||
SW1#configure terminal
|
||
SW1(config)#interface range Fa0/3 - 4
|
||
SW1(config-if-range)#channel-group 1 mode active
|
||
SW1(config-if-range)#exit
|
||
SW1(config)#interface port-channel 1
|
||
SW1(config-if)#description LACP-SW1-SW2
|
||
SW1(config-if)#switchport mode trunk
|
||
SW1(config-if)#exit
|
||
```
|
||
|
||
```
|
||
SW2>enable
|
||
SW2#configure terminal
|
||
SW2(config)#interface range Fa0/3 - 4
|
||
SW2(config-if-range)#channel-group 1 mode active
|
||
SW2(config-if-range)#exit
|
||
SW2(config)#interface port-channel 1
|
||
SW2(config-if)#description LACP-SW1-SW2
|
||
SW2(config-if)#switchport mode trunk
|
||
SW2(config-if)#exit
|
||
```
|
||
|
||
### HSRP entre MLSW1 et MLSW2
|
||
|
||
```
|
||
MLSW1>enable
|
||
MLSW1#configure terminal
|
||
MLSW1(config)#interface vlan 10
|
||
MLSW1(config-if)#ip address 89.76.0.200 255.255.255.0
|
||
MLSW1(config-if)#standby 1 ip 89.76.0.1
|
||
MLSW1(config-if)#standby 1 priority 150
|
||
MLSW1(config-if)#standby 1 preempt
|
||
MLSW1(config-if)#no shutdown
|
||
```
|
||
|
||
```
|
||
MLSW2>enable
|
||
MLSW2#configure terminal
|
||
MLSW2(config)#interface vlan 10
|
||
MLSW2(config-if)#ip address 89.76.0.201 255.255.255.0
|
||
MLSW2(config-if)#standby 1 ip 89.76.0.1
|
||
MLSW2(config-if)#standby 1 priority 100
|
||
MLSW2(config-if)#standby 1 preempt
|
||
MLSW2(config-if)#no shutdown
|
||
```
|
||
|
||
```
|
||
Router0>enable
|
||
Router0#configure terminal
|
||
Router0(config)#ip routing
|
||
Router0(config)#interface Gig0/0/0
|
||
Router0(config-if)#ip address 89.76.0.254 255.255.255.0
|
||
Router0(config-if)#exit
|
||
Router0(config)#interface Gig0/0/1
|
||
Router0(config-if)#ip address 89.76.0.254 255.255.255.0
|
||
Router0(config-if)#exit
|
||
``` |