diff --git a/docs/procedure-reseau.md b/docs/procedure-reseau.md index 8380ea39e43f991cf1de5493f44a29accf3718c9..1abf7e97c8ee5ba94861ed1bbba4bf4b49104376 100644 --- a/docs/procedure-reseau.md +++ b/docs/procedure-reseau.md @@ -1,139 +1,135 @@ + # Procédure ## Architecture : -Switch 1 ( interface fa0/48) à Routeur 1 (interface gig0/0) +Switch 1 (interface fa0/48) à Routeur 1 (interface gig0/0) -Switch 2 ( interface fa0/48) à Routeur 2 (interface gig0/0) +Switch 2 (interface fa0/48) à Routeur 2 (interface gig0/0) Routeur 1 (interface gig0/1) à Routeur 2 (interface gig0/1) ## Switch : - Switching (Version : Switch 2960) : Nommer switch - - #conf t - (config)#hostname S1 + + Switch>enable + Switch#conf t + Switch#(config)#hostname S1 S1(config)#exit S1# -Sécurisé avec mot de passe sur switch : +Sécuriser avec mot de passe sur switch : - #conf t - (config)#enable password "mot de passe" - (config)#exit + S1#conf t + S1(config)#enable password "mot de passe" + S1(config)#exit Création des VLANs: - #conf t - (config)#vlan 2 - (config-vlan)#name Admin - (config-vlan)#exit + S1#conf t + S1(config)#vlan 2 + S1(config-vlan)#name Admin + S1(config-vlan)#exit - #conf t - (config)#vlan 3 - (config-vlan)#name Comptabilite - (config-vlan)#exit + S1#conf t + S1(config)#vlan 3 + S1(config-vlan)#name Comptabilite + S1(config-vlan)#exit - #conf t - (config)#vlan 4 - (config-vlan)#name Production - (config-vlan)#exit + S1#conf t + S1(config)#vlan 4 + S1(config-vlan)#name Production + S1(config-vlan)#exit Adressage VLANs : - #conf t - (config)#interface vlan 2 - (config-if)#ip address 192.168.40.3 255.255.255.0 - (config-if)#exit + S1#conf t + S1(config)#interface vlan 2 + S1(config-if)#ip address 192.168.40.3 255.255.255.0 // attribuer une adresse IP au VLAN 2 afin de connaitre le réseau auquel il appartient : 192.168.40.0/24 + S1(config-if)#exit - #conf t - (config)#interface vlan 3 - (config-if)#ip address 192.168.50.3 255.255.255.0 - (config-if)#exit + S1(config)#interface vlan 3 + S1(config-if)#ip address 192.168.50.3 255.255.255.0 // attribuer une adresse IP au VLAN 3 afin de connaitre le réseau auquel il appartient : 192.168.50.0/24 + S1(config-if)#exit - #conf t - (config)#interface vlan 4 - (config-if)#ip address 192.168.60.3 255.255.255.0 - (config-if)#exit + S1(config)#interface vlan 4 + S1(config-if)#ip address 192.168.60.3 255.255.255.0 // attribuer une adresse IP au VLAN 4 afin de connaitre le réseau auquel il appartient : 192.168.60.0/24 + S1(config-if)#exit Organisation interface vlan 2 : - #conf t - (config)#vlan 2 - (config-vlan)#interface fa 0/25 - (config-if-range)#switchport acces vlan 2 - (config)#exit + S1#conf t + S1(config)#vlan 2 + S1(config-vlan)#interface range fa0/25 - 26 + S1(config-if-range)#switchport access vlan 2 + S1(config)#exit Organisation interface vlan 3 : - #conf t - (config)#vlan 3 - (config-vlan)#interface range fa 0/1 - 12 - (config-if-range)#switchport access vlan 3 - (config)#exit + S1#conf t + S1(config)#vlan 3 + S1(config-vlan)#interface range fa 0/1 - 12 + S1(config-if-range)#switchport access vlan 3 + S1(config)#exit Organisation interface vlan 4 : - #conf t - (config)#vlan 4 - (config-vlan)#interface range fa 0/13 - 24 - (config-if-range)#switchport access vlan 4 - (config)#exit + S1#conf t + S1(config)#vlan 4 + S1(config-vlan)#interface range fa 0/13 - 24 + S1(config-if-range)#switchport access vlan 4 + S1(config)#exit Configuration trunk inter-vlan : - #conf t - (config)#interface fa 0/48 1 (Interface GE 0/0) à Routeur - (config-if)#switchport mode trunk - (config-if)#no shutdown - (config-if)#exit + S1#conf t + S1(config)#interface fa 0/48 1 (Interface GE 0/0) à Routeur + S1(config-if)#switchport mode trunk + S1(config-if)#no shutdown + S1(config-if)#exit ## Routeur : Creation sous-interface VLAN 2 (ROUTEUR) - >enable - #conf t - (config)#interface gig 0/0.3 - (config-if)#encapsulation dot1Q 2 - (config-subif)#ip address 192.168.40.254 255.255.255.0 - (config-subif)#ip helper-address 192.168.40.150 - (config-subif)#no shutdown - (config-subif)#exit + S1#conf t + S1(config)#interface gig 0/0.3 + S1(config-if)#encapsulation dot1Q 2 + S1(config-subif)#ip address 192.168.40.254 255.255.255.0 + S1(config-subif)#ip helper-address 192.168.40.150 + S1(config-subif)#no shutdown + S1(config-subif)#exit Création sous-interface VLAN 3 (ROUTEUR) - #conf t - (config)#interface gig 0/0.1 - (config-if)#encapsulation dot1Q 3 - (config-subif)#ip address 192.168.50.254 255.255.255.0 - (config-subif)#ip helper-address 192.168.40.150 - (config-subif)#no shutdown - (config-subif)#exit + S1(config)#interface gig 0/0.1 + S1(config-if)#encapsulation dot1Q 3 + S1(config-subif)#ip address 192.168.50.254 255.255.255.0 + S1(config-subif)#ip helper-address 192.168.40.150 + S1(config-subif)#no shutdown + S1(config-subif)#exit Création sous-interface VLAN 4 (ROUTEUR) - #conf t - (config)#interface gig 0/0.2 - (config-if)#encapsulation dot1Q 4 - (config-subif)#ip address 192.168.60.254 255.255.255.0 - (config-subif)#ip helper-address 192.168.40.150 - (config-subif)#no shutdown - (config-subif)#exit + S1(config)#interface gig 0/0.2 + S1(config-if)#encapsulation dot1Q 4 + S1(config-subif)#ip address 192.168.60.254 255.255.255.0 + S1(config-subif)#ip helper-address 192.168.40.150 + S1(config-subif)#no shutdown + S1(config-subif)#exit Activation interface gig0/0 - (config)#interface gig0/0 - (config-subif)#ip helper-address 192.168.40.150 - (config-subif)no shutdown + S1(config)#interface gig0/0 + S1(config-subif)#ip helper-address 192.168.40.150 + S1(config-subif)no shutdown Test : @@ -142,31 +138,65 @@ Test : ## Configuration table de routage // procédure à faire sur le routeur 1 - #conf t - (config)#router rip - (config-router)#version 2 - (config-router)#network 10.0.0.0 - (config-router)#network 192.168.40.0 - (config-router)#network 192.168.50.0 - (config-router)#network 192.168.60.0 - (config-router)#exit + S1#conf t + S1(config)#router rip + S1(config-router)#version 2 + S1(config-router)#network 10.0.0.0 + S1(config-router)#network 192.168.40.0 + S1(config-router)#network 192.168.50.0 + S1(config-router)#network 192.168.60.0 + S1(config-router)#exit - (config)#interface gig0/1 - (config-if)#ip address 10.0.0.1 255.0.0.0 - (config-if)#no shutdown +### Activation de l'interface gig0/1 -## Configuration table de routage // procédure à faire sur le routeur 2 (deuxième groupe) + S1(config)#interface gig0/1 + S1(config-if)#ip address 10.0.0.1 255.0.0.0 + S1(config-if)#no shutdown - #conf t - (config)#router rip - (config-router)#version 2 - (config-router)#network 10.0.0.0 - (config-router)#network 192.168.10.0 - (config-router)#network 192.168.20.0 - (config-router)#network 192.168.30.0 - (config-router)#exit - - (config)#interface gig0/1 - (config-if)#ip address 10.0.0.2 255.0.0.0 - (config-if)#no shutdown +## Configuration table de routage // procédure à faire sur le routeur 2 (deuxième groupe) + S2#conf t + S2(config)#router rip + S2(config-router)#version 2 + S2(config-router)#network 10.0.0.0 + S2(config-router)#network 192.168.10.0 + S2(config-router)#network 192.168.20.0 + S2(config-router)#network 192.168.30.0 + S2(config-router)#exit + +### Activation de l'interface gig0/1 + + S2(config)#interface gig0/1 + S2(config-if)#ip address 10.0.0.2 255.0.0.0 + S2(config-if)#no shutdown + +## NAT + + Sur routeur : + + S1#conf t + S1(config)#ip nat inside source static 192.168.10.254 10.0.0.1 + +### A faire sur chaque sous-interface Vlan: + + S1#conf t + S1(config)#interface gig0/0.1 + S1(config-if)#ip nat inside + S1#(config-if)#exit + + S1#conf t + S1(config)#interface gig0/0.2 + S1(config-if)#ip nat inside + S1#(config-if)#exit + + S1#conf t + S1(config)#interface gig0/0.3 + S1(config-if)#ip nat inside + S1#(config-if)#exit + +### A faire sur l'interface extérieur routeur : + + S1#conf t + S1(config)#interface GigaEthernet 0/1 + S1(config-if)#ip nat ouside + S1(config-if)#exit \ No newline at end of file