OSPF Lab 4 – OSPFv2 Multiarea Adjacency.

Objetivo: Crear un laboratorio para probar OSPFv2 Multiarea Adjacency feature.

Teniendo como base el siguiente escenario:

BR4 y BR5 son entidades pertenecientes a la red mostrada. BR4 tiene doble enlace con los routers de distribución WAN y el enlace activo por costo ospf es a través del WDR1:

Para compobar:

CoreX#sh ip route
…
      145.1.0.0/16 is variably subnetted, 10 subnets, 3 masks
C        145.1.1.0/30 is directly connected, Ethernet0/0
L        145.1.1.1/32 is directly connected, Ethernet0/0
C        145.1.1.4/30 is directly connected, Ethernet0/1
L        145.1.1.5/32 is directly connected, Ethernet0/1
O        145.1.1.8/30 [110/20] via 145.1.1.6, 01:21:32, Ethernet0/1
                      [110/20] via 145.1.1.2, 01:53:23, Ethernet0/0
O IA     145.1.4.0/30 [110/310] via 145.1.1.2, 01:30:46, Ethernet0/0
O IA     145.1.4.4/30 [110/410] via 145.1.1.6, 01:29:21, Ethernet0/1
O IA     145.1.5.0/30 [110/74] via 145.1.1.6, 01:25:16, Ethernet0/1
C        145.1.29.0/25 is directly connected, Ethernet0/2
L        145.1.29.1/32 is directly connected, Ethernet0/2
      145.4.0.0/25 is subnetted, 1 subnets
O IA     145.4.4.0 [110/320] via 145.1.1.2, 01:28:01, Ethernet0/0
      145.5.0.0/27 is subnetted, 1 subnets
O IA     145.5.5.0 [110/84] via 145.1.1.6, 01:24:33, Ethernet0/1

Sin embargo, el WDR utiliza una intraarea route para llegar a la lan de BR4 a pesar de la conocer una ruta interarea de menor costo (esto se debe a las reglas de ospf a la hora de preferir rutas intra a inter):

WDR2#sh ip route
…
      145.1.0.0/16 is variably subnetted, 13 subnets, 3 masks
O        145.1.1.0/30 [110/20] via 145.1.1.9, 00:00:10, Ethernet0/1
                      [110/20] via 145.1.1.5, 00:01:35, Ethernet0/0
C        145.1.1.4/30 is directly connected, Ethernet0/0
L        145.1.1.6/32 is directly connected, Ethernet0/0
C        145.1.1.8/30 is directly connected, Ethernet0/1
L        145.1.1.10/32 is directly connected, Ethernet0/1
O        145.1.4.0/30 [110/700] via 145.1.4.6, 00:01:35, Serial1/0
C        145.1.4.4/30 is directly connected, Serial1/0
L        145.1.4.5/32 is directly connected, Serial1/0
C        145.1.4.6/32 is directly connected, Serial1/0
C        145.1.5.0/30 is directly connected, Serial1/1
L        145.1.5.1/32 is directly connected, Serial1/1
C        145.1.5.2/32 is directly connected, Serial1/1
O        145.1.29.0/25 [110/20] via 145.1.1.5, 00:01:35, Ethernet0/0
      145.4.0.0/25 is subnetted, 1 subnets
O        145.4.4.0 [110/410] via 145.1.4.6, 00:01:35, Serial1/0
      145.5.0.0/27 is subnetted, 1 subnets
O        145.5.5.0 [110/74] via 145.1.5.2, 00:01:35, Serial1/1

Si un usuario de la lan de BR5 quisiera comunicarse con la lan de BR4, el tráfico pasa por WDR2 y va directamente por el enlace secundario de BR4:

BR5#traceroute 145.4.4.1 source ethernet 0/0
Type escape sequence to abort.
Tracing the route to 145.4.4.1
  1 145.1.5.1 8 msec 12 msec 8 msec
  2 145.1.4.6 20 msec *  20 msec

En este escenario, se requiere que todo el tráfico desde y hacia BR4 pase por el WDR1, lo cual no es satisfecho con la configuración actual.

Para lograr lo requerido hay diferentes variantes. La que vamos a usar es OSPFv2 Multiarea Adjacency.

From OSPF Configuration Guide:


Information About OSPFv2 Multiarea Adjacency

OSPFv2 Multiarea Adjacency Overview

The Open Shortest Path First (OSPF) protocol allows you to divide a network topology into separate areas. The interface on which OSPF is configured belongs to only one area at any given point of time. This causes suboptimal routing for certain topologies, due to intra-area route preference over the interarea routes.

Open Shortest Path First version 2 (OSPFv2) allows a single physical link to be shared by multiple areas. This creates an intra-area path in each of the corresponding areas sharing the same link. All areas have an interface on which OSPF is configured. One of these interfaces is designated as the primary interface and others as secondary interfaces.

The OSPFv2 Multiarea Adjacency feature allows you to configure a link on the primary interface to enable optimized routing in multiple areas. Each multiarea interface is announced as a point-to-point unnumbered link. The multiarea interface exists as a logical construct over an existing primary interface. The neighbor state on the primary interface is independent of the neighbor state of the multiarea interface. The multiarea interface establishes a neighbor relationship with the corresponding multiarea interface on the neighboring device. You can only configure multiarea adjacency on an interface that has two OSPF speakers. In case of native broadcast networks, the interface must be configured as an OSPF point-to-point type to enable the interface for multiarea adjacency.

Use the ip ospf multi-area command to configure multiarea adjacency on the primary OSPFv2 interface.



Después de añadir los comandos de configuración, el escenario se ajustó a los requerimientos:

*Aug  3 06:57:27.609: %OSPF-5-ADJCHG: Process 1600, Nbr 145.1.1.9 on OSPF_MA2 from LOADING to FULL, Loading Done
WDR2#sh ip route
…
      145.1.0.0/16 is variably subnetted, 13 subnets, 3 masks
O        145.1.1.0/30 [110/20] via 145.1.1.9, 00:00:50, Ethernet0/1
                      [110/20] via 145.1.1.5, 00:20:34, Ethernet0/0
C        145.1.1.4/30 is directly connected, Ethernet0/0
L        145.1.1.6/32 is directly connected, Ethernet0/0
C        145.1.1.8/30 is directly connected, Ethernet0/1
L        145.1.1.10/32 is directly connected, Ethernet0/1
O        145.1.4.0/30 [110/310] via 145.1.1.9, 00:00:50, Ethernet0/1
C        145.1.4.4/30 is directly connected, Serial1/0
L        145.1.4.5/32 is directly connected, Serial1/0
C        145.1.4.6/32 is directly connected, Serial1/0
C        145.1.5.0/30 is directly connected, Serial1/1
L        145.1.5.1/32 is directly connected, Serial1/1
C        145.1.5.2/32 is directly connected, Serial1/1
O        145.1.29.0/25 [110/20] via 145.1.1.5, 00:20:34, Ethernet0/0
      145.4.0.0/25 is subnetted, 1 subnets
O        145.4.4.0 [110/320] via 145.1.1.9, 00:00:50, Ethernet0/1 (ahora la ruta apunta al WDR1)
      145.5.0.0/27 is subnetted, 1 subnets
O        145.5.5.0 [110/74] via 145.1.5.2, 00:20:34, Serial1/1

BR5#traceroute 145.4.4.1 source ethernet 0/0
Type escape sequence to abort.
Tracing the route to 145.4.4.1
  1 145.1.5.1 12 msec 16 msec 8 msec
  2 145.1.1.9 12 msec 8 msec 12 msec
  3 145.1.4.2 20 msec *  20 msec

Ahora el camino seguido por el tráfico entre BR5 y BR4 es a través de WDR2 -> WDR1 y viceversa.

Para comprobar:

WDR1#sh ip ospf 1600 multi-area
OSPF_MA2 is up, line protocol is up
  Primary Interface Ethernet0/1, Area 4
  Interface ID 4
  MTU is 1500 bytes
  Neighbor Count is 1

WDR1#sh ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Et0/1        1600  0               145.1.1.9/30       10    P2P   1/1
Et0/0        1600  0               145.1.1.2/30       10    BDR   1/1
MA2          1600  4               Unnumbered Et0/1   10    P2P   1/1
Se1/0        1600  4               145.1.4.1/30       300   P2P   1/1

WDR1#sh ip ospf interface
Ethernet0/1 is up, line protocol is up
  Internet Address 145.1.1.9/30, Area 0, Attached via Interface Enable
  Process ID 1600, Router ID 145.1.1.9, Network Type POINT_TO_POINT, Cost: 10
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           10        no          no            Base
  Enabled by interface config, including secondary ip addresses
  Transmit Delay is 1 sec, State POINT_TO_POINT
  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 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 2
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 145.1.1.6
  Suppress hello for 0 neighbor(s)
  Multi-area interface Count is 1
    OSPF_MA2 interface exists in area 4 Neighbor Count is 1
...
OSPF_MA2 is up, line protocol is up
  Interface is unnumbered. Using address of Ethernet0/1 (145.1.1.9), Area 4, Attached via Multi-area
  Process ID 1600, Router ID 145.1.1.9, Network Type POINT_TO_POINT, Cost: 10
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           10        no          no            Base
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:03
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 2/4, flood queue length 0
  Next 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 145.1.1.6
  Suppress hello for 0 neighbor(s)

Configuraciones finales:

CoreX:
!
hostname CoreX
!
interface Ethernet0/0
 ip address 145.1.1.1 255.255.255.252
!
interface Ethernet0/1
 ip address 145.1.1.5 255.255.255.252
!
interface Ethernet0/2
 ip address 145.1.29.1 255.255.255.128
!
router ospf 1600
 network 0.0.0.0 255.255.255.255 area 0
!

WDR1:
!
hostname WDR1
!
interface Ethernet0/0
 ip address 145.1.1.2 255.255.255.252
 ip ospf 1600 area 0
!
interface Ethernet0/1
 ip address 145.1.1.9 255.255.255.252
 ip ospf network point-to-point
 ip ospf multi-area 4
 ip ospf multi-area 4 cost 10
 ip ospf 1600 area 0
!
interface Serial1/0
 ip address 145.1.4.1 255.255.255.252
 encapsulation ppp
 ip ospf 1600 area 4
 ip ospf cost 300
 clock rate 128000
!
router ospf 1600
 area 4 stub no-summary
!

WDR2:
!
hostname WDR2
!
interface Ethernet0/0
 ip address 145.1.1.6 255.255.255.252
 ip ospf 1600 area 0
!
interface Ethernet0/1
 ip address 145.1.1.10 255.255.255.252
 ip ospf network point-to-point
 ip ospf multi-area 4
 ip ospf multi-area 4 cost 10
 ip ospf 1600 area 0
!
interface Serial1/0
 ip address 145.1.4.5 255.255.255.252
 encapsulation ppp
 ip ospf 1600 area 4
 ip ospf cost 400
 clock rate 128000
!
interface Serial1/1
 ip address 145.1.5.1 255.255.255.252
 encapsulation ppp
 ip ospf 1600 area 5
 clock rate 128000
!
router ospf 1600
 area 4 stub no-summary
 area 5 stub no-summary
!

BR4:
!
hostname BR4
!
interface Ethernet0/0
 ip address 145.4.4.1 255.255.255.128
 ip ospf 1600 area 4
!
interface Serial1/0
 ip address 145.1.4.2 255.255.255.252
 encapsulation ppp
 ip ospf cost 300
 ip ospf 1600 area 4
!
interface Serial1/1
 ip address 145.1.4.6 255.255.255.252
 encapsulation ppp
 ip ospf cost 400
 ip ospf 1600 area 4
!
router ospf 1600
 area 4 stub no-summary
!

BR5:
!
hostname BR5
!
interface Ethernet0/0
 ip address 145.5.5.1 255.255.255.224
 ip ospf 1600 area 5
!
interface Serial1/0
 ip address 145.1.5.2 255.255.255.252
 encapsulation ppp
 ip ospf 1600 area 5
!
router ospf 1600
 area 5 stub no-summary
!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.