Upload
radouane
View
220
Download
0
Embed Size (px)
Citation preview
8/14/2019 la configuration par dfaut du commutateur
1/3
WWW.RESEAUMAROC.COM
Cours/formation /Video en informatique:Rseaux,Linux,Cisco,2003 Server,securit,Contact : [email protected] : 00212669324964
la configuration par dfaut du commutateur
ALSwitch#ALSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.ALSwitch(config)#line con 0ALSwitch(config-line)#password ciscoALSwitch(config-line)#loginALSwitch(config-line)#line vty 0 15ALSwitch(config-line)#password ciscoALSwitch(config-line)#loginALSwitch(config-line)#exitALSwitch(config)#enable password cisco
ALSwitch(config)#enable secret classALSwitch(config)#interface vlan 1ALSwitch(config-if)#ip address 192.168.1.2 255.255.255.0ALSwitch(config-if)#exitALSwitch(config)#ip default-gateway 192.168.1.1ALSwitch(config)#exit
ALSwitch#show interfaces vlan 1
ALSwitch#show mac-address-table
Supprimez la table dadresses MAC
ALSwitch#clear mac-address-table dynamic
ALSwitch#clear mac-address-table
Configurez une adresse MAC statique
ALSwitch(config)#mac-address-table static 00e0.2917.1884 interfacefastethernet 0/4 vlan 1
2900:ALSwitch(config)#mac-address-table static 00e0.2917.1884 fastethernet0/4 vlan 1
1900:ALSwitch(config)#mac-address-table permanent 00e0.2917.1884 ethernet0/4
Listez les options de scurit des ports
1900:ALSwitch(config)#interface ethernet 0/4ALSwitch(config-if)#port secure ?max-mac-count Maximum number of addresses allowed on the port2950:ALSwitch(config-if)#switchport port-security ?aging Port-security aging commandsmac-address Secure mac addressmaximum Max secure addrsviolation Security Violation Mode
8/14/2019 la configuration par dfaut du commutateur
2/3
WWW.RESEAUMAROC.COM
Cours/formation /Video en informatique:Rseaux,Linux,Cisco,2003 Server,securit,Contact : [email protected] : 00212669324964
ALSwitch(config-if)#switchport mode access (no)ALSwitch(config-if)#switchport port-security (no)ALSwitch(config-if)#switchport port-security mac-address sticky (no)
Limitez le nombre dhtes par port
1900:ALSwitch(config)#interface Ethernet 0/4ALSwitch(config-if)#port secure max-mac-count 1
2950:ALSwitch(config-if)#switchport port-security maximum 1
Examinez la table de spanning tree sur chaque commutateur
Switch_A#show spanning-tree brief
Raffecter le pont racine
Dfinissez la priorit du commutateur qui nest pas la racine de 4096.Si vous utilisez la version 12.0, entrez les lments suivants :Switch_B(config)#spanning-tree priority 1Switch_B(config)#exit
Si vous utilisez la version 12,1, entrez les lments suivants :Switch_B(config)#spanning-tree vlan 1 priority 4096Switch_B(config)#exit
Crez et nommez deux VLAN
Switch_A#vlan databaseSwitch_A(vlan)#vlan 2 name VLAN2Switch_A(vlan)#vlan 3 name VLAN3 (no vlan 3)Switch_A(vlan)#exit
Affichez les informations dinterface VLAN
Switch_A#show vlan
Affectez des ports VLAN 2
Switch_A#configure terminalSwitch_A(config)#interface fastethernet 0/2Switch_A(config-if)#switchport mode accessSwitch_A(config-if)#switchport access vlan 2 (no)Switch_A(config-if)#end
Crez lagrgation ISL
Switch_A(config)#interface fastethernet 0/1Switch_A(config-if)#switchport mode trunk
Switch_A(config-if)#switchport trunk encapsulation islSwitch_A(config-if)#endSwitch_B(config)#interface fastethernet 0/1
8/14/2019 la configuration par dfaut du commutateur
3/3
WWW.RESEAUMAROC.COM
Cours/formation /Video en informatique:Rseaux,Linux,Cisco,2003 Server,securit,Contact : [email protected] : 00212669324964
Switch_B(config-if)#switchport mode trunkSwitch_B(config-if)#switchport trunk encapsulation islSwitch_B(config-if)#end
Vrifiez lagrgation ISL
Show interface fastethernet 0/1 switchport
Crez lagrgation
Switch_A(config)#interface fastethernet 0/1Switch_A(config-if)#switchport mode trunkSwitch_A(config-if)#end
Switch_B(config)#interface fastethernet 0/1Switch_B(config-if)#switchport mode trunkSwitch_B(config-if)#end2900:Switch_A(config)#interface fastethernet0/1Switch_A(config-if)#switchport mode trunkSwitch_A(config-if)#switchport trunk encapsulation dot1qSwitch_A(config-if)#endSwitch_B(config)#interface fastethernet0/1Switch_B(config-if)#switchport mode trunkSwitch_B(config-if)#switchport trunk encapsulation dot1qSwitch_B(config-if)#end
Configure VTP
Switch_A#vlan databaseSwitch_A(vlan)#vtp serverSwitch_A(vlan)#vtp domain group1Switch_A(vlan)#exit
Configurez le client VTP
Switch_B#vlan databaseSwitch_B(vlan)#vtp clientSwitch_B(vlan)#vtp domain group1Switch_B(vlan)#exit
Configuration du routage entre des LAN virtuels (VLAN)Configurez le routeurRouter_A(config)#interface fastethernet 0/0Router_A(config-if)#no shutdownRouter_A(config-if)#interface fastethernet 0/0.1Router_A(config-subif)#encapsulation dot1q 1Router_A(config-subif)#ip address 192.168.1.1 255.255.255.0Router_A(config-if)#interface fastethernet 0/0.2Router_A(config-subif)#encapsulation dot1q 10Router_A(config-subif)#ip address 192.168.5.1 255.255.255.0Router_A(config-if)#interface fastethernet 0/0.3
Router_A(config-subif)#encapsulation dot1q 20Router_A(config-subif)#ip address 192.168.7.1 255.255.255.0Router_A(config-subif)#end