Objectifs de certification

CCNA R&S 200-125

  • 3.9 Configurer, vérifier et dépanner OSPFv2 pour IPv4 en single area et en multi-area sauf authentification, filtrage, summarization manuelle, redistribution, stub, virtual-link et les LSAs

  • 3.10 Configurer, vérifier et dépanner OSPFv3 pour IPv6 en single area et en multi-area sauf authentification, filtrage, summarization manuelle, redistribution, stub, virtual-link et les LSAs

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 Multi-Area

1. Introduction

Voici la documentation et la solution de la topologie d’exemple utilisée dans l’article Configuration d’OSPFv2 et OSPFv3 en Cisco IOS

2. Topologie

Topologie lab Routage OSPF Multi-Area

3. Processus OSPFv2 et OSPFv3

  • Un processus OSPFv2 pour IPv4
  • et un processus OSPFv3 pour IPv6

Deux zones pour chacun des processus :

  • Une zone de backbone : 0
  • Une zone 1

Rôles OSPF :

  • Backbone Routers (BR) : R1 et R2
  • Area Border Router (ABR) : R1
  • Autonomous System Border Router (ASBR) : R3

4. Interfaces

Chaque interface du routeur dispose d’une adresse :

  • IPv4 privée
  • IPv6 link-local identique sur chacune
  • IPv6 globale (adresse de documentation)

Une interface Loopback 0 avec une adresse unique 1.1.1.1/32 (R1), 2.2.2.2/32 (R2) et 3.3.3.3/32 (R3) permet de déterminer ID OSPFv2. Elle ne participe pas au routage.

5. Routage IPv4

Cinq réseaux participent au routage IPv4 au sein d’OSPFv2 :

  • 192.168.96.0/24 (area 1)
  • 192.168.127.0/30 (area 1)
  • 192.168.72.0/24 (backbone area 0)
  • 192.168.80.0/24 (backbone area 0)
  • 192.168.95.0/30 (backbone area 0)

Une route statique par défaut est redistribuée dans OSPFv2 à partir de l’ASBR (R3). Soit six réseaux IPv4 à connaître, Sept états de liens (Link-State, LSA).

6. Routage IPv6

Trois réseaux participent au routage IPv6 au sein d’OSPFv3 :

  • 2001:DB8:1AB1::/64 (backbone area 0)
  • 2001:DB8:1AB2::/64 (backbone area 0)
  • 2001:DB8:1AC3::/64 (area 1)

Les interfaces entre les routeurs n’ont pas besoin d’être globalement joignable. Soit quatre réseaux IPv6 à connaître

7. Configuration de R1

hostname R1
!
ipv6 unicast-routing
!
interface GigabitEthernet0/0
 ip address 192.168.72.1 255.255.255.0
 ipv6 address FE80::1 link-local
 ipv6 address 2001:DB8:1AB1::1/64
 ipv6 ospf 1 area 0
 no shutdown
!
interface GigabitEthernet0/2
 ip address 192.168.95.1 255.255.255.252
 ipv6 address FE80::1 link-local
 ipv6 ospf 1 area 0
 no shutdown
!
interface GigabitEthernet0/3
 ip address 192.168.127.1 255.255.255.252
 ipv6 address FE80::1 link-local
 ipv6 ospf 1 area 1
 no shutdown
!
router ospf 1
 router-id 1.1.1.1
 passive-interface GigabitEthernet0/0
 network 192.168.72.1 0.0.0.0 area 0
 network 192.168.95.1 0.0.0.0 area 0
 network 192.168.127.1 0.0.0.0 area 1
 auto-cost reference-bandwidth 10000
!
ipv6 router ospf 1
 router-id 1.1.1.1
 passive-interface GigabitEthernet0/0
 auto-cost reference-bandwidth 10000
!
ip dhcp pool LAN_R1
 network 192.168.72.0 255.255.255.0
 default-router 192.168.72.1
 dns-server 192.168.72.1
!
end

8. Configuration de R2

hostname R2
!
ipv6 unicast-routing
!
interface GigabitEthernet0/0
 ip address 192.168.80.1 255.255.255.0
 ipv6 address FE80::2 link-local
 ipv6 address 2001:DB8:1AB2::1/64
 ipv6 ospf 1 area 0
 no shutdown
!
interface GigabitEthernet0/1
 ip address 192.168.95.2 255.255.255.252
 ipv6 address FE80::2 link-local
 ipv6 ospf 1 area 0
 no shutdown
!
router ospf 1
 router-id 2.2.2.2
 passive-interface GigabitEthernet0/0
 network 192.168.80.1 0.0.0.0 area 0
 network 192.168.95.2 0.0.0.0 area 0
 auto-cost reference-bandwidth 10000
!
ipv6 router ospf 1
 router-id 2.2.2.2
 passive-interface GigabitEthernet0/0
 auto-cost reference-bandwidth 10000
!
ip dhcp pool LAN_R2
 network 192.168.80.0 255.255.255.0
 default-router 192.168.80.1
 dns-server 192.168.80.1
!
end

9. Configuration de R3

hostname R3
!
ipv6 unicast-routing
!
interface GigabitEthernet0/0
 ip address 192.168.104.1 255.255.255.0
 ipv6 address FE80::3 link-local
 ipv6 address 2001:DB8:1AC3::1/64
 ipv6 ospf 1 area 1
 no shutdown
!
interface GigabitEthernet0/1
 ip address 192.168.127.2 255.255.255.252
 ipv6 address FE80::3 link-local
 ipv6 ospf 1 area 1
 no shutdown
!
router ospf 1
 router-id 3.3.3.3
 passive-interface GigabitEthernet0/0
 network 192.168.104.1 0.0.0.0 area 1
 network 192.168.127.2 0.0.0.0 area 1
 auto-cost reference-bandwidth 10000
!
ipv6 router ospf 1
 router-id 3.3.3.3
 passive-interface GigabitEthernet0/0
 auto-cost reference-bandwidth 10000
!
ip dhcp pool LAN_R3
 network 192.168.104.0 255.255.255.0
 default-router 192.168.104.1
 dns-server 192.168.104.1
!
end

10. Configuration du routage

Par exemple sur R1 :

R1#show ip protocols | begin ospf
Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 1.1.1.1
  It is an area border router
  Number of areas in this router is 2. 2 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    192.168.72.1 0.0.0.0 area 0
    192.168.95.1 0.0.0.0 area 0
    192.168.127.1 0.0.0.0 area 1
  Passive Interface(s):
    GigabitEthernet0/0
  Routing Information Sources:
    Gateway         Distance      Last Update
    3.3.3.3              110      00:11:43
    2.2.2.2              110      00:11:53
  Distance: (default is 110)
R1#show ipv6 protocols | begin ospf
IPv6 Routing Protocol is "ospf 1"
  Router ID 1.1.1.1
  Area border router
  Number of areas: 2 normal, 0 stub, 0 nssa
  Interfaces (Area 0):
    GigabitEthernet0/2
    GigabitEthernet0/0
  Interfaces (Area 1):
    GigabitEthernet0/3
  Redistribution:
    None

11. Etats de lien

Etats de lien sur R2 (7 LS)

R2#sh ip ospf database database-summary | begin Process 1
Process 1 database summary
  LSA Type      Count    Delete   Maxage
  Router        2        0        0
  Network       1        0        0
  Summary Net   2        0        0
  Summary ASBR  1        0        0
  Type-7 Ext    0        0        0
  Opaque Link   0        0        0
  Opaque Area   0        0        0
  Type-5 Ext    1        0        0
      Prefixes redistributed in Type-5  0
  Opaque AS     0        0        0
  Non-self      6
  Total         7        0        0

Etats de lien sur R3 (7 LS)

R3#sh ip ospf database database-summary | begin Process 1
Process 1 database summary
  LSA Type      Count    Delete   Maxage
  Router        2        0        0
  Network       1        0        0
  Summary Net   3        0        0
  Summary ASBR  0        0        0
  Type-7 Ext    0        0        0
  Opaque Link   0        0        0
  Opaque Area   0        0        0
  Type-5 Ext    1        0        0
      Prefixes redistributed in Type-5  0
  Opaque AS     0        0        0
  Non-self      4

12. Interfaces OSPF

Par exemple l’interface G0/3 de R1 :

R1#show ip ospf interface G0/3
GigabitEthernet0/3 is up, line protocol is up
  Internet Address 192.168.127.1/30, Area 1, Attached via Network Statement
  Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 10
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           10        no          no            Base
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 3.3.3.3, Interface address 192.168.127.2
  Backup Designated router (ID) 1.1.1.1, Interface address 192.168.127.1
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:08
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/1/3, flood queue length 0
  Next 0x0(0)/0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 3.3.3.3  (Designated Router)
  Suppress hello for 0 neighbor(s)
R1#show ipv6 ospf interface G0/3
GigabitEthernet0/3 is up, line protocol is up
  Link Local Address FE80::1, Interface ID 5
  Area 1, Process ID 1, Instance ID 0, Router ID 1.1.1.1
  Network Type BROADCAST, Cost: 10
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 3.3.3.3, local address FE80::3
  Backup Designated router (ID) 1.1.1.1, local address FE80::1
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:08
  Graceful restart helper support enabled
  Index 1/1/3, flood queue length 0
  Next 0x0(0)/0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 3.3.3.3  (Designated Router)
  Suppress hello for 0 neighbor(s)

13. Voisinage OSPF

Tables de voisinage OSPF sur R1 :

R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DR         00:00:38    192.168.95.2    GigabitEthernet0/2
3.3.3.3           1   FULL/DR         00:00:38    192.168.127.2   GigabitEthernet0/3
R1#show ipv6 ospf neighbor

            OSPFv3 Router with ID (1.1.1.1) (Process ID 1)

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
2.2.2.2           1   FULL/DR         00:00:31    3               GigabitEthernet0/2
3.3.3.3           1   FULL/DR         00:00:33    3               GigabitEthernet0/3

Tables de voisinage OSPF sur R2 :

R2#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   FULL/BDR        00:00:39    192.168.95.1    GigabitEthernet0/1
R2#show ipv6 ospf neighbor

            OSPFv3 Router with ID (2.2.2.2) (Process ID 1)

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
1.1.1.1           1   FULL/BDR        00:00:30    4               GigabitEthernet0/1

Tables de voisinage OSPF sur R3 :

R3#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   FULL/BDR        00:00:39    192.168.127.1   GigabitEthernet0/1
R3#show ipv6 ospf neighbor

            OSPFv3 Router with ID (3.3.3.3) (Process ID 1)

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
1.1.1.1           1   FULL/BDR        00:00:31    5               GigabitEthernet0/1```

14. Tables de routage

Table de routage IPv4 de R1 :

R1#show ip route | begin Gateway
Gateway of last resort is not set

      192.168.72.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.72.0/24 is directly connected, GigabitEthernet0/0
L        192.168.72.1/32 is directly connected, GigabitEthernet0/0
O     192.168.80.0/24 [110/20] via 192.168.95.2, 00:00:16, GigabitEthernet0/2
      192.168.95.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.95.0/30 is directly connected, GigabitEthernet0/2
L        192.168.95.1/32 is directly connected, GigabitEthernet0/2
O     192.168.104.0/24
           [110/20] via 192.168.127.2, 00:00:06, GigabitEthernet0/3
      192.168.127.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.127.0/30 is directly connected, GigabitEthernet0/3
L        192.168.127.1/32 is directly connected, GigabitEthernet0/3

Table de routage IPv4 de R2 :

R2#show ip route | begin Gateway
Gateway of last resort is not set

O     192.168.72.0/24 [110/20] via 192.168.95.1, 00:00:53, GigabitEthernet0/1
      192.168.80.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.80.0/24 is directly connected, GigabitEthernet0/0
L        192.168.80.1/32 is directly connected, GigabitEthernet0/0
      192.168.95.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.95.0/30 is directly connected, GigabitEthernet0/1
L        192.168.95.2/32 is directly connected, GigabitEthernet0/1
O IA  192.168.104.0/24 [110/30] via 192.168.95.1, 00:00:43, GigabitEthernet0/1
      192.168.127.0/30 is subnetted, 1 subnets
O IA     192.168.127.0 [110/20] via 192.168.95.1, 00:00:53, GigabitEthernet0/1

Table de routage IPv4 de R3 :

R3#show ip route | begin Gateway
Gateway of last resort is not set

O IA  192.168.72.0/24 [110/20] via 192.168.127.1, 00:01:27, GigabitEthernet0/1
O IA  192.168.80.0/24 [110/30] via 192.168.127.1, 00:01:27, GigabitEthernet0/1
      192.168.95.0/30 is subnetted, 1 subnets
O IA     192.168.95.0 [110/20] via 192.168.127.1, 00:01:27, GigabitEthernet0/1
      192.168.104.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.104.0/24 is directly connected, GigabitEthernet0/0
L        192.168.104.1/32 is directly connected, GigabitEthernet0/0
      192.168.127.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.127.0/30 is directly connected, GigabitEthernet0/1
L        192.168.127.2/32 is directly connected, GigabitEthernet0/1

Table de routage IPv6 de R1 :

R1#show ipv6 route ospf
IPv6 Routing Table - default - 5 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
       H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
       IS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMO
       ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect
       RL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
       OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eid
       lA - LISP away, a - Application
O   2001:DB8:1AB2::/64 [110/20]
     via FE80::2, GigabitEthernet0/2
O   2001:DB8:1AC3::/64 [110/20]
     via FE80::3, GigabitEthernet0/3

Table de routage IPv6 de R2 :

R2#show ipv6 route ospf
IPv6 Routing Table - default - 5 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
       H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
       IS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMO
       ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect
       RL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
       OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eid
       lA - LISP away, a - Application
O   2001:DB8:1AB1::/64 [110/20]
     via FE80::1, GigabitEthernet0/1
OI  2001:DB8:1AC3::/64 [110/30]
     via FE80::1, GigabitEthernet0/1

Table de routage IPv6 de R3 :

R3#show ipv6 route ospf
IPv6 Routing Table - default - 5 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
       H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
       IS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMO
       ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect
       RL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
       OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eid
       lA - LISP away, a - Application
OI  2001:DB8:1AB1::/64 [110/20]
     via FE80::1, GigabitEthernet0/1
OI  2001:DB8:1AB2::/64 [110/30]
     via FE80::1, GigabitEthernet0/1

15. Activation de la connexion Internet IPv4

Configuration NAT Overload avec propagation de la route par défaut dans OSPFv2 :

interface G0/3
 ip address dhcp
 no shutdown
access-list 1 permit 192.168.0.0 0.0.255.255
ip nat inside source list 1 interface G0/3 overload
interface G0/0
 ip nat inside
interface G0/1
 ip nat inside
interface G0/3
 ip nat outside
router ospf 1
 default-information originate

Table de routage de R3 :

R3#show ip route | begin Gateway
Gateway of last resort is 192.168.122.1 to network 0.0.0.0

S*    0.0.0.0/0 [254/0] via 192.168.122.1
O IA  192.168.72.0/24 [110/20] via 192.168.127.1, 00:26:08, GigabitEthernet0/1
O IA  192.168.80.0/24 [110/30] via 192.168.127.1, 00:26:08, GigabitEthernet0/1
      192.168.95.0/30 is subnetted, 1 subnets
O IA     192.168.95.0 [110/20] via 192.168.127.1, 00:26:08, GigabitEthernet0/1
      192.168.104.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.104.0/24 is directly connected, GigabitEthernet0/0
L        192.168.104.1/32 is directly connected, GigabitEthernet0/0
      192.168.122.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.122.0/24 is directly connected, GigabitEthernet0/3
L        192.168.122.75/32 is directly connected, GigabitEthernet0/3
      192.168.127.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.127.0/30 is directly connected, GigabitEthernet0/1
L        192.168.127.2/32 is directly connected, GigabitEthernet0/1

Table de routage de R1 dans laquelle on remarque la route O*E2 0.0.0.0/0 [110/1] par défaut propagée par OSPF :

R1#show ip route | begin Gateway
Gateway of last resort is 192.168.127.2 to network 0.0.0.0

O*E2  0.0.0.0/0 [110/1] via 192.168.127.2, 00:00:37, GigabitEthernet0/3
      192.168.72.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.72.0/24 is directly connected, GigabitEthernet0/0
L        192.168.72.1/32 is directly connected, GigabitEthernet0/0
O     192.168.80.0/24 [110/20] via 192.168.95.2, 00:28:39, GigabitEthernet0/2
      192.168.95.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.95.0/30 is directly connected, GigabitEthernet0/2
L        192.168.95.1/32 is directly connected, GigabitEthernet0/2
O     192.168.104.0/24
           [110/20] via 192.168.127.2, 00:28:29, GigabitEthernet0/3
      192.168.127.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.127.0/30 is directly connected, GigabitEthernet0/3
L        192.168.127.1/32 is directly connected, GigabitEthernet0/3

Laisser un commentaire