La Solution:
SWITCH 1 : Création des Vlan et Assignation des ports aux Vlans
Switch>ENable
Switch#CONF
T
Switch(config)#hosttname
S1
S1(config)#vlan
10
S1(config-vlan)#vlan
20
S1(config-vlan)#vlan
30
S1(config-vlan)#vlan
99
S1(config-vlan)#exit
S1(config)#interface
range fastEthernet 0/3-11
S1(config-if-range)#switchport
mode access
S1(config-if-range)#switchport
access vlan 10
S1(config-if-range)#interface
range fastEthernet 0/12-21
S1(config-if-range)#switchport
mode access
S1(config-if-range)#switchport
access vlan 20
S1(config-if-range)#exit
S1(config)#interface
range fastEthernet 0/1-2
S1(config-if-range)#switchport mode trunk
SWITCH 2 :
Switch>enable
Switch#conf
t
Switch(config)#vlan
10
Switch(config-vlan)#vlan
20
Switch(config-vlan)#vlan
30
Switch(config-vlan)#vlan
99
Switch(config-vlan)#exit
Switch(config)#interface
range fastEthernet 0/3-11
Switch(config-if-range)#switchport
mode access
Switch(config-if-range)#switchport
access vlan 20
Switch(config-if-range)#exit
Switch(config)#interface
range fastEthernet 0/12-21
Switch(config-if-range)#switchport
mode access
Switch(config-if-range)#switchport
access vlan 30
Switch(config-if-range)#exit
Switch(config)#interface range fastEthernet 0/1-2
Switch(config-if-range)#switchport
mode trunk
Switch(config-if-range)#exit
Switch(config)#interface fastEthernet 0/24
Switch(config-if)#switchport
mode trunk
Switch(config-if)#exit
SWITCH 3 :
Switch>enable
Switch#conf
t
Switch(config)#hostname
S3
S3(config)#vlan
10
S3(config-vlan)#vlan
20
S3(config-vlan)#vlan
30
S3(config-vlan)#vlan
99
S3(config-vlan)#exit
S3(config)#interface
range fastEthernet 0/3-11
S3(config-if-range)#switchport
mode access
S3(config-if-range)#switchport
access vlan 10
S3(config-if-range)#exit
S3(config)#interface
range fastEthernet 0/12-21
S3(config-if-range)#switchport
mode access
S3(config-if-range)#switchport
access vlan 30
S3(config-if-range)#exit
S3(config)#interface
range fastEthernet 0/1-2
S3(config-if-range)#switchport
mode trunk
S3(config-if-range)#exit
S3(config)#
R1 : Routage InterVlan et OSPF
Router>enable
Router#conf
t
Router(config)#hostname
R1
R1(config)#interface
gigabitEthernet 0/0
R1(config-if)#no
shutdown
R1(config)#interface
gigabitEthernet 0/0.10
R1(config-subif)#encapsulation
dot1Q 10
R1(config-subif)#ip
address 172.16.10.1 255.255.255.0
R1(config-subif)#no
shutdown
R1(config-subif)#exit
R1(config)#interface
gigabitEthernet 0/0.20
R1(config-subif)#encapsulation
dot1Q 20
R1(config-subif)#ip
address 172.16.20.1 255.255.255.0
R1(config-subif)#no
shutdown
R1(config-subif)#exit
R1(config)#interface
gigabitEthernet 0/0.30
R1(config-subif)#encapsulation
dot1Q 30
R1(config-subif)#ip
address 172.16.30.1 255.255.255.0
R1(config-subif)#no
shutdown
R1(config-subif)#exit
R1(config)#interface
gigabitEthernet 0/0.99
R1(config-subif)#encapsulation
dot1Q 99
R1(config-subif)#ip
address 172.16.99.1 255.255.255.0
R1(config-subif)#no
shutdown
R1(config)#interface
serial 0/0/0
R1(config-if)#ip
address 10.1.1.1 255.255.255.252
R1(config-if)#no
shutdown
R1(config)#router
ospf 10
R1(config-router)#router-id
1.1.1.1
R1(config-router)#network
172.16.20.0 0.0.0.255 area 0
R1(config-router)#network
172.16.30.0 0.0.0.255 area 0
R1(config-router)#network
172.16.10.0 0.0.0.255 area 0
R1(config-router)#network
172.16.99.0 0.0.0.255 area 0
R1(config-router)#network
10.1.1.0 0.0.0.3 area 0
R1(config-router)#
R2 : Configuration des @ IP
Router>enable
Router#conf
t
Router(config)#hostname
R2
R2(config)#interface
gigabitEthernet 0/0
R2(config-if)#ip
address 192.168.1.1 255.255.255.0
R2(config-if)#no
shutdown
R2(config-if)#exit
R2(config)#interface
serial 0/0/0
R2(config-if)#ip
address 10.1.1.2 255.255.255.252
R2(config-if)#no
shutdown
R2(config-if)#exit
R2(config)#interface
serial 0/0/1
R2(config-if)#ip
address 10.1.1.5 255.255.255.252
R2(config-if)#no
shutdown
R2(config-if)#exit
R2(config)#router ospf 10
R2(config-router)#router-id
2.2.2.2
R2(config-router)#network
192.168.1.0 0.0.0.255 area 0
R2(config-router)#network
10.1.1.0 0.0.0.3 area 0
R2(config-router)#network
10.1.1.4 0.0.0.3 area 0
R2(config-router)#exit
R3 :
Router>enable
Router#conf t
Router(config)#hostname R3
R3(config)#interface serial 0/0/0
R3(config-if)#ip address 10.1.1.6
255.255.255.252
R3(config-if)#no shutdown
R3(config)#interface
gigabitEthernet 0/0
R3(config-if)#ip address
192.168.2.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#router ospf 10
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network
192.168.2.0 0.0.0.255 area 0
R3(config-router)#network 10.1.1.4
0.0.0.3 area 0
R3(config-router)#exit
S2(config-if)#ip
address 172.16.99.2 255.255.255.0
S2(config-if)#no
shutdown
S2(config-if)#exit
S2(config)#ip default-gateway 172.16.99.1
S2(config)#username
ofppt password ista@2020
S2(config)#ip
domain-name ofppt.ma
S2(config)#crypto
key generate rsa
The name for
the keys will be: S2.ofppt.ma
Choose the
size of the key modulus in the range of 360 to 2048 for your
General
Purpose Keys. Choosing a key modulus greater than 512 may take
a few
minutes.
How many
bits in the modulus [512]: 1024
% Generating
1024 bit RSA keys, keys will be non-exportable...[OK]
S2(config)#ip
ssh version 2
S2(config)#line
vty 0 4
S2(config-line)#transport
input ssh
S2(config-line)#login
local
S2(config-line)#exit

