sisr5 - tp1 : le protocole spanning tree & les vlan … · lamdaouar blanc beaujean tp1 - sisr5...
Post on 13-Sep-2018
223 Views
Preview:
TRANSCRIPT
Lamdaouar 15/09/2015Beaujean SISR5 - TP1Blanc
SISR5 - TP1 : Le protocole spanning tree & les VLAN répartis
1/Introduction2/Configuration switch
A/Mise en place d’un mot de passeB/ Mise en place d’une adresse Ip pour un vlanC/Spanning tree
1/Changements de statuts(switch racine ou non-racine)3/Mise en place Vlan, Agrégation 802.1q et VTP
A/Création des vlanB/Mise en place du VTPC/Encapsulation
4/Conclusion
Lamdaouar Blanc Beaujean TP1 - SISR5
1/IntroductionDans notre tp nous allons voir le spanning-tree(protocole permettent d'éviter une boucle (tempête de brodcast)). Puis nous allons voir si nous pouvons transférer les configuration d’un switch vers un autre grâce au protocole VTP.Voici le schéma du réseau:
2/Configuration switch
A/Mise en place d’un mot de passe
Grâce aux syntaxes suivantes nous mettons un mot de passe au switch pour se connecter en console(con) ou à distance(vty)
Switch_A(config)#line con 0
Switch_A(config-line)#password cisco
Switch_A(config-line)#login
Switch_A(config-line)#
*Mar 1 00:10:04.785: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, p
Switch_A(config-line)#line vty 0 15
1/22
Lamdaouar Blanc Beaujean TP1 - SISR5
Switch_A(config-line)#password cisco
Switch_A(config-line)#login
Switch_A(config-line)#exit
Switch_A(config)#exit
Switch_A#exit
Dans un second temps on va se connecter puis mettre un mot de passe au mode enable, grace à la commande enable secret (suivis du mot de passe voulut)
Switch_A#enable
Switch_A#config t
Switch_A(config)#enable secret class
Switch_A(config)#exit
On fait de même sur le switch B.
Switch_B#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch_B(config)#line con 0
Switch_B(config-line)#password cisco
Switch_B(config-line)#login
Switch_B(config-line)#exit
Switch_B(config)#line vty 0 15
Switch_B(config-line)#password cisco
Switch_B(config-line)#login
Switch_B(config-line)#exit
Switch_B(config)#
Switch_B#
2/22
Lamdaouar Blanc Beaujean TP1 - SISR5
Switch_B#con
Switch_B#config
Switch_B#configure terminal
Switch_B(config)#enable secret class
Switch_B(config)#exit
Nous allons tester la configuration que nous avons mise en place précédemment.
Switch_A con0 is now available
User Access Verification
Password:
Switch_A>enable
Password:
Switch_A#
On remarque que notre configuration est optimale et fonctionnelle . Au passage à la première ligne on remarque que la console est disponible maintenant puis on nous dit qu'il doit vérifier l’accès utilisateur.
B/ Mise en place d’une adresse Ip pour un vlanNous allons configurer le vlan 1, on va lui mettre une adresse IP et une passerelle par défaut(default-gateway) grâce à la commande IP adresse (suivit de l'adresse IP et du masque) puis de no shutdown(pour l'activer).Pour mettre l'ip gateway on tape ip default-gateway(suivit de l'adresse de la passerelle)
Switch_A#config t
Switch_A(config)#interface vlan 1
3/22
Lamdaouar Blanc Beaujean TP1 - SISR5
Switch_A(config-if)#ip address 192.168.1.2 255.255.255.0
Switch_A(config-if)#no shutdown
Switch_A(config-if)#exit
Switch_A(config)#ip default-gateway 192.168.1.1
Switch_A(config)#exit
On fait de même pour le switch B
Switch_B(config)#interface VLAN 1 Switch_B(config-if)#ip address 192.168.1.3 255.255.255.0 Switch_B(config-if)#no shutdown Switch_B(config-if)#exit Switch_B(config)#ip defaul Switch_B(config)#ip default-gateway 192.168.1.1 Switch_B(config)#exit Switch_B#
C/Spanning treeL’adresse mac du switch A est plus petite que celle du switch B(elle commence par 001b tandis que celle du switch B commence par 001c)SWITCH A: 001b.0c12.1d80 SWITCH B:001c.5760.46c0
4/22
Lamdaouar Blanc Beaujean TP1 - SISR5
Pour voir quel switch est spanning tree, il suffit de taper #show spanning-tree.
Switch_A#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 001b.0c12.1d80
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 001b.0c12.1d80
5/22
Lamdaouar Blanc Beaujean TP1 - SISR5
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/4 Desg FWD 19 128.4 P2p
Fa0/7 Desg FWD 19 128.7 P2p
Nous savons que le switch_A est racine par conséquent celui-ci n’a aucun ports bloqués.Tandis que sur le switch_B qui est non-racine nous pouvons observer qu’il n’y a que le port 4qui est bloqué.
Nous avons observé par la suite que le swicht A a une priorité de commutateur racine de 32769, et que les ports assurant la transmission sur commutateur racine sont les interfaces:fa0/1, fa0/4,fa0/7De même que nous avons remarqué qu’il n’y avait aucun ports qui assuraient le blocage sur le commutateur racine.Sur le switch B non-racine,(voir screen si-dessus)la priorité du commutateur est de 32768, leport assurant la transmission sur le commutateur non-racine est le fa0/1. Le port assurant le blocage sur ce commutateur est fa0/4, et le voyant de liaison est orange.
6/22
Lamdaouar Blanc Beaujean TP1 - SISR5
1/Changements de statuts(switch racine ou non-racine)Nous changeons le statut du switch B(on remet le b en racine)
Switch_B(config)#spanning-tree vlan 1 priority 4096 Switch_B(config)#exit Switch_B# *Mar 4 21:43:44.205: %SYS-5-CONFIG_I: Configured from console by console Switch_B#show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 4097 Address 001c.576a.4680 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 4097 (priority 4096 sys-id-ext 1) Address 001c.576a.4680 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 15 sec Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- --------------------------------Fa0/1 Desg FWD 19 128.1 P2p Fa0/4 Desg FWD 19 128.4 P2p
Une fois que nous avons changés le statut entre les switchs.
Switch_A#show spanning-tree
VLAN0001
7/22
Lamdaouar Blanc Beaujean TP1 - SISR5
Spanning tree enabled protocol ieee
Root ID Priority 4097
Address 001c.576a.4680
Cost 19
Port 1 (FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 001b.0c12.1d80
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/1 Root FWD 19 128.1 P2p
Fa0/4 Altn BLK 19 128.4 P2p
Fa0/7 Desg FWD 19 128.7 P2p
On remarque que le switch_A est devenu non-racine donc le port 4 est bloquée.Tandis que le switch B n’a aucun port bloquée car il est devenu racine.
Switch_B(config)#spanning-tree vlan 1 priority 4096 Switch_B(config)#exit Switch_B# *Mar 4 21:43:44.205: %SYS-5-CONFIG_I: Configured from console by
8/22
Lamdaouar Blanc Beaujean TP1 - SISR5
console Switch_B#show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 4097 Address 001c.576a.4680 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 4097 (priority 4096 sys-id-ext 1) Address 001c.576a.4680 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 15 sec Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- --------------------------------Fa0/1 Desg FWD 19 128.1 P2p Fa0/4 Desg FWD 19 128.4 P2p
Voici le tableau quand le switch A est racine.
SWITCH_A N°de port SWITCH_B
forward 1 forward
forward 4 blocked
forward 7
Par la suite nous rechangeons le statut du switch A qui redevient racine.
Switch_A#show spanning-tree
VLAN0001
9/22
Lamdaouar Blanc Beaujean TP1 - SISR5
Spanning tree enabled protocol ieee
Root ID Priority 4097
Address 001b.0c12.1d80
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 4097 (priority 4096 sys-id-ext 1)
Address 001b.0c12.1d80
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/4 Desg FWD 19 128.4 P2p
Fa0/7 Desg FWD 19 128.7 P2p
Voici le tableau lorsque le switch B est racine .
SWITCH_A N°de port SWITCH_B
forward 1 forward
blocked 4 forward
forward 7
10/22
Lamdaouar Blanc Beaujean TP1 - SISR5
3/Mise en place Vlan, Agrégation 802.1q et VTP
A/Création des vlanOn remarque qu’il n’y a pas de VLAN sur le switch A
Switch_A#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gi0/1, Gi0/2
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
11/22
Lamdaouar Blanc Beaujean TP1 - SISR5
1 enet 100001 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
On renomme les vlan grace à la synthaxe avec le numéro du vlan name (nom du vlan) .
Switch_A(vlan)#vlan 10 name comptabilite
VLAN 10 added:
Name: comptabilite
Switch_A(vlan)#vlan 20 name marketing
VLAN 20 added:
Name: marketing
Switch_A(vlan)#vlan 30 name ingenierie
VLAN 30 added:
12/22
Lamdaouar Blanc Beaujean TP1 - SISR5
Name: ingenierie
Switch_A(vlan)#exit
APPLY completed.
Exiting....
Switch_A#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gi0/1, Gi0/2
10 comptabilite active
20 marketing active
30 ingenierie active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
13/22
Lamdaouar Blanc Beaujean TP1 - SISR5
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
20 enet 100020 1500 - - - - - 0 0
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
30 enet 100030 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
Remote SPAN VLANs
J’ai affecté les ports au vlan
Switch_A#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch_A(config)#interface range fast
14/22
Lamdaouar Blanc Beaujean TP1 - SISR5
Switch_A(config)#interface range fastEthernet 0/4-6
Switch_A(config-if-range)#swit
Switch_A(config-if-range)#switchport mode access
Switch_A(config-if-range)#switchport access vlan 10
Switch_A(config-if-range)#end
Switch_A#
*Mar 4 22:46:12.151: %SYS-5-CONFIG_I: Configured from console by console
Switch_A#interface range fastethernet 0/7-9
^
% Invalid input detected at '^' marker.
Switch_A#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch_A(config)#interface range fastEthernet 0/7-9
Switch_A(config-if-range)#switchport mode access
Switch_A(config-if-range)#switchport access vlan 20
Switch_A(config-if-range)#exiut
^
% Invalid input detected at '^' marker.
15/22
Lamdaouar Blanc Beaujean TP1 - SISR5
Switch_A(config-if-range)#exit
Switch_A(config)#interface range fastEthernet 0/10-12
Switch_A(config-if-range)#switchport mode access
Switch_A(config-if-range)#switchport access vlan 30
Switch_A(config-if-range)#exit
Je vérifie que les ports on bien été affecté au vlan, grâce a un: show vlan
Switch_A#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2, Fa0/3, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23, Fa0/24, Gi0/1, Gi0/2
10 comptabilite active Fa0/4, Fa0/5, Fa0/6
20 marketing active Fa0/7, Fa0/8, Fa0/9
30 ingenierie active Fa0/10, Fa0/11, Fa0/12
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
16/22
Lamdaouar Blanc Beaujean TP1 - SISR5
1005 trnet-default act/unsup
B/Mise en place du VTPNous allons mettre en place VTP server sur le switch A. on doit taper VTp domain server et dans un second temps vtp server. Le protocole vtp permet de diffuser les configurations d’un switch serveur vers un switch client.(SWITCH A serveur et SWITCH B qui est client)
Switch_A#vla database
Switch_A(vlan)#vtp domain cisco
Changing VTP domain name from NULL to cisco
Switch_A(vlan)#
*Mar 4 22:44:27.646: %SW_VLAN-6-VTP_DOMAIN_NAME_CHG: VTP domain name changed tr
Device mode already VTP SERVER.
Switch_A(vlan)#exit
APPLY completed.
Exiting....
Switch_A#
Après avoir fait ce protocole on remarque que les vlan sont bien transféré chez le SWITCH Bsauf que les ports n’y sont pas affecté.
Switch_B#show vlan
VLAN Name Status Ports
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
17/22
Lamdaouar Blanc Beaujean TP1 - SISR5
Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24, Gi0/1
Gi0/2
10 comptabilite active
20 marketing active
30 ingenierie active
1002 fddidefault act/unsup
1003 tokenringdefault act/unsup
1004 fddinetdefault act/unsup
1005 trnetdefault act/unsup
J’ai rendu trunk le port fastethernet 1 du switch A.
Switch_A(config)#interface fast
Switch_A(config)#interface fastEthernet 0/1
Switch_A(config-if)#switchport mode trunk
Switch_A#exit
Je trunk aussi le port fastethernet 1 du switch B
18/22
Lamdaouar Blanc Beaujean TP1 - SISR5
C/Encapsulation Lorsque on fait un show de l’interface fastethernet 0/1, on voit que l’encapsulation est de type dot1q.
Switch_A#show interface fastEthernet 0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
19/22
Lamdaouar Blanc Beaujean TP1 - SISR5
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
--More--
Pour conclure nous allons supprimer les vlan, en plaçant juste no devant le numero du vlan
Switch_A(vlan)#no vlan 10
Deleting VLAN 10...
Switch_A(vlan)#no vlan 20
Deleting VLAN 20...
Switch_A(vlan)#no vlan 30
Deleting VLAN 30...
Les ping on été un échec entre le fastethernet 0/12 du switch A et fastethernet 0/8 du switch B cela est normale car ce sont des vlan différents(vlan 30 et 20).Les ping on été un échec entre le fastethernet 0/12 du switch A et fastethernet 0/12 du switch B . Dans ce cas cela devrait marcher car certes il sont dans deux switch différents mais dans le même VLAN.
20/22
Lamdaouar Blanc Beaujean TP1 - SISR5
4/Conclusion
Nous avons appris à changer le switch racine. Puis à vérifier si le spanning tree est mis en place (grâce au: show spanning-tree). On a révisé tout ce qui est relatif au VLAN(création , affectation des ports et suppression). Puis l’on a vu la comment transférer la configuration d’un switch vers un autre switch.(grâce au protocole VTP)
21/22
top related