Objectifs de certification
CCNA 200-301
3.4 Configurer et vérifier single area OSPFv2
- 3.4.a Neighbor adjacencies
- 3.4.b Point-to-point
- 3.4.c Broadcast (DR/BDR selection)
- 3.4.d Router ID
Lab Routage OSPF simple
On trouvera ici un exercice de laboratoire sur la configuration d’OSPF dans une topologie simple.
1. Topologie
2. Adressage et Routage IPv4
- LAN de R1 (g0/0) : 192.168.1.0/24 (192.168.1.254)
- Liaison R1 (g0/1) - R2 (g0/1) : 192.168.2.0/24 (192.168.2.1-2)
- LAN de R2 (g0/0) : 192.168.3.0/24 (192.168.3.254)
- Passerelle vers l’Internet (R2 s0/0/0) : 195.238.2.21/30 redistribuée dans OSPFv2
- Routage OSPFv2 PID 1, R1 RID : 1.1.1.1 et R2 RID : 2.2.2.2
3. Adressage et Routage IPv6
- LAN de R1 (g0/0) : 2001:db8:1ab:1::/64
- Liaison R1 (g0/1) - R2 (g0/1) : fe80::1 - fe80::2
- LAN de R2 (g0/0) : 2001:db8:1ab:3::/64
- Link-local R1 (g0/0 et g0/1) : fe80::1/64
- Link-local R2 (g0/0 et g0/1) : fe80::2/64
- Routage OSPFv3 PID 1, R1 RID : 1.1.1.1 et R2 RID : 2.2.2.2
4. Services
- R1 : Service DHCP pour les LANs
- R2 : NAT overload et DHCP Relay
- Par défaut, l’autoconfiguration automatique sans état (SLAAC) est activée sur les routeurs
5. Routeur R1
5.1. Nom et service SSH
hostname R1
ip domain-name entreprise.lan
enable secret cisco
username cisco secret cisco
ip ssh version 2
line vty 0 4
login local
transport input ssh
crypto key generate rsa
5.2. Interfaces et routage IPv4
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet0/0
description LAN
ip address 192.168.1.254 255.255.255.0
no shutdown
!
interface GigabitEthernet0/1
description WAN
ip address 192.168.2.1 255.255.255.0
no shutdown
!
router ospf 1
passive-interface GigabitEthernet0/0
network 192.168.1.254 0.0.0.0 area 0
network 192.168.2.1 0.0.0.0 area 0
passive-interface GigabitEthernet0/0
5.3. Interfaces et routage IPv6
ipv6 unicast-routing
!
interface GigabitEthernet0/0
description LAN
ipv6 address FE80::1 link-local
ipv6 address 2001:DB8:1AB:1::1/64
ipv6 ospf 1 area 0
!
interface GigabitEthernet0/1
description WAN
ipv6 address FE80::1 link-local
ipv6 ospf 1 area 0
!
ipv6 router ospf 1
router-id 1.1.1.1
passive-interface GigabitEthernet0/0
5.4. Service DHCP
ip dhcp pool LAN1
network 192.168.1.0 255.255.255.0
default-router 192.168.1.254
dns-server 192.168.1.254
ip dhcp pool LAN_R2
network 192.168.3.0 255.255.255.0
default-router 192.168.3.254
dns-server 192.168.3.254
6. Routeur R2
6.1. Nom et service SSH
hostname R2
ip domain-name entreprise.lan
enable secret cisco
username cisco secret cisco
ip ssh version 2
line vty 0 4
login local
transport input ssh
crypto key generate rsa
6.2. Interfaces et routage IPv4
interface GigabitEthernet0/0
ip address 192.168.3.254 255.255.255.0
ip helper-address 192.168.1.254
ip nat inside
no shutdown
!
interface GigabitEthernet0/1
ip address 192.168.2.2 255.255.255.0
ip nat inside
no shutdown
!
interface Serial0/0/0
ip address 195.238.2.21 255.255.255.252
ip nat outside
no shutdown
!
router ospf 1
router-id 2.2.2.2
passive-interface GigabitEthernet0/0
network 192.168.0.0 0.0.255.255 area 0
default-information originate
!
ip nat inside source list 1 interface Serial0/0/0 overload
ip route 0.0.0.0 0.0.0.0 195.238.2.22
!
access-list 1 permit 192.168.0.0 0.0.255.255
6.3. Interfaces et routage IPv6
ipv6 unicast-routing
!
interface GigabitEthernet0/0
ipv6 address FE80::2 link-local
ipv6 address 2001:DB8:1AB:3::1/64
ipv6 ospf 1 area 0
!
interface GigabitEthernet0/1
ipv6 address FE80::2 link-local
ipv6 address 2001:DB8:1AB:2::2/64
ipv6 ospf 1 area 0
!
ipv6 router ospf 1
router-id 2.2.2.2
passive-interface GigabitEthernet0/0
7. Diagnostic
- Vérifier la connectivité d’un site à l’autre en IPv4 et en IPv6
Vérifier la connectivité globale en IPv4
- Vérification de l’image chargée, de la configuration matérielle (Flash, RAM, Registre de configuration)
show version
- Vérification de la configuration courante
shown running-config
- Vérification rapide des interfaces
show ip interface brief
show ipv6 interface brief
- Paramètres L2 (adresse MAC, encapsulation, clock rate, taux d’erreurs, Queues QoS, …)
show interface g0/0
show interface s0/0/0
show controllers interface s0/0/0
- Paramètres L3
show ip interface g0/0
show ipv6 interface g0/0
- Routage IPv4/IPv6
show ip route
show ipv6 route
show ip protocols
show ipv6 protocols
show ip ospf interface g0/0
show ip ospf neighbors
debug ip ospf adj
- Service DHCP, NAT, ACLs
show ip dhcp binding
show ip nat translations
show access-list