Friday 23 March 2012

OSPF Routing - Implementing OSPF over NBMA LAB


Okay so, below is the lab and as usual all the basic networking is already setup, lets get on with it;

Objectives:
1. Configure OSPF for the above network diagram. You will need to configure OSPF for the Area 0 and Area 24 Frame Relay network using the default OPSF network mode (no ip ospf network statements may be used on any router in these areas). R3’s interface connecting to Area 356 needs to be configured for the OSPF RFC standard point-to-multipoint mode. R5 and R6 must use the default OSPF mode (no ip ospf network statements may be used on R5 or R6).


2. Each OSPF router has a single loopback interface. These should be advertised through the OSPF network. The loopback interfaces of the ABRs can be included in either area.


3. Ensure only appropriate routers have DR/BDR status.


4. In order to achieve full connectivity, you may need to add additional Frame-Relay maps to your routers. However, you may not add additional Frame-Relay PVCs by modifying the FRS devices.


5. To test your configuration, R4 should be able to ping the loopback interfaces of R5 (5.5.5.5) and R6 (6.6.6.6).



Lets get the network advertised and the loopback :0)

R1(config)#router ospf 1
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#network 10.12.3.0 0.0.0.255 area 0
R1(config-router)#router-id 1.1.1.1


Okay, now before we go any further lets check the default modes that the interfaces are in;


R1#show ip ospf interface
Loopback0 is up, line protocol is up
  Internet Address 1.1.1.1/24, Area 0
  Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 1
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
Serial0/0.1 is up, line protocol is up
  Internet Address 10.12.3.1/24, Area 0
  Process ID 1, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost: 64
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 1.1.1.1, Interface address 10.12.3.1
  No backup designated router on this network
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:06
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)




So if we recall back from the previous post, OSPF over NBMA defaults to NON-BROADCAST which;

  • Is the default mode for x.25, Frame Relay, ATM
  • Neighbours have to be statically configured
  • Must be one subnet
  • Acts like a LAN enviroment 
  • DR/BDR elected (must have FULL connectivity)

(We allow the broadcast on the Frame Network with the sudo broadcast)

Loopback0 is a POINT-TO-POINT becuase i have statically configured it as such, so it doesn't advertise the network as a host address (becuase we want to simulate a network here)

Right, lets get Router2 up;

R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 10.12.3.2 0.0.0.255 area 0
R2(config-router)#network 10.24.0.2 0.0.0.0 area 24
R2(config-router)#network 2.2.2.2 0.0.0.0 area 0


R2#show ip ospf inter
Loopback0 is up, line protocol is up
  Internet Address 2.2.2.2/24, Area 0
  Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 1
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
  Supports Link-local Signaling (LLS)
  Index 2/3, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
Serial0/0.1 is up, line protocol is up
  Internet Address 10.12.3.2/24, Area 0
  Process ID 1, Router ID 2.2.2.2, Network Type NON_BROADCAST, Cost: 64
  Transmit Delay is 1 sec, State WAITING, Priority 1
  No designated router on this network
  No backup designated router on this network
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:00
    Wait time before Designated router selection 00:00:00
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
Serial0/1.1 is up, line protocol is up
  Internet Address 10.24.0.2/24, Area 24
  Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 64
  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)
  Index 1/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)



R2# show run int Serial0/0.1
interface Serial0/0.1 multipoint
 ip address 10.12.3.2 255.255.255.0
 frame-relay map ip 10.12.3.1 201 broadcast
end


R2# show run int Serial0/1.1
interface Serial0/1.1 point-to-point
 ip address 10.24.0.2 255.255.255.0
 frame-relay interface-dlci 204
end


So we can see that the default Multipoint mode for NBMA is NON-BROADCAST - we didn't configure this anywhere!

Also if we look at Serial0/1.1, we can see it recgonised that we configured a subinterface and the OSPF mode defaulted to POINT-2-POINT mode

RIGHT, so the only thing left now is to config R3 and then statically set the neighbours, HOWEVER we need to ensure that Router1 is elected the DR as it is the hub, and R2 and R3 are not elected the BDR's as they do not have FULL connectivity (as this is being treated like a LAN segment) they are just spokes.


R2(config)#inter s0/0.1
R2(config-subif)#ip ospf pri 0



So this makes it so that R2 is NOT a DR, lets do the same on R3 also :0)

R3(config)#inter s0/0.1
R3(config-subif)#ip ospf priority 0



R3(config-subif)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 10.12.3.0 0.0.0.255 area 0
R3(config-router)#network 10.35.6.0 0.0.0.0 area 356
R3(config-router)#network 3.3.3.3 0.0.0.0 area 0


If we check our OSPF neighbours on R1, we still show no neighbours ... so lets set the neighbours statically on R1 (they only need to be set on R1, as R1 will iniate the HELLO with the other two routers and the neighbourship will be formed ....)


R1(config)#router ospf 1
R1(config-router)#neighbor 10.12.3.2 ?
  cost             OSPF cost for point-to-multipoint neighbor
  database-filter  Filter OSPF LSA during synchronization and flooding for
                   point-to-multipoint neighbor
  poll-interval    OSPF dead-router polling interval
  priority         OSPF priority of non-broadcast neighbor
  <cr>



We can set the priority on the neighbours, however priority 0 is the default (so this will not show in the running config)

R1(config-router)#neighbor 10.12.3.2 priority 0
R1(config-router)#neighbor 10.12.3.3 priority 0
R1(config-router)#
*Mar  1 00:43:26.483: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Serial0/0.1 from LOADING to FULL, Loading Done
*Mar  1 00:43:26.631: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Serial0/0.1 from LOADING to FULL, Loading Done





Sweet, OSPF is up and lets just the relationships;


R1#show ip ospf ne

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           0   FULL/DROTHER    00:01:48    10.12.3.2       Serial0/0.1
3.3.3.3           0   FULL/DROTHER    00:01:36    10.12.3.3       Serial0/0.1


Sweet, so we have FULL and both are neither a DR or BDR! lets confirm R1 is the DR:


R1#show ip ospf int serial0/0.1
Serial0/0.1 is up, line protocol is up
  Internet Address 10.12.3.1/24, Area 0
  Process ID 1, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost: 64
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 1.1.1.1, Interface address 10.12.3.1
  No backup designated router on this network
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:17
  Supports Link-local Signaling (LLS)
  Index 2/2, 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 2, Adjacent neighbor count is 2
    Adjacent with neighbor 2.2.2.2
    Adjacent with neighbor 3.3.3.3
  Suppress hello for 0 neighbor(s)


Double KOOL, whilst this was happening i had a wireshark running in the background, lets see what we got:

The Blue highlighted line is the HELLO packet from R1 to R2, and with the OSPF header you can see all the options that we set! like the PRIORITY the LOOPBACK address and all the timers and address info!!!



You can see that it is sending within the HELLO packet that IT (R1) is the DR ... KEWL!
If we check R2s reply;


And we can see he has acknowledged this is now an ACTIVE neighbour and so can begin exchanging information (LSA's etc):

Here we can see the LSA (Link State Advertisement, which is TYPE 1) which is advertising R1's loopback address ... Now here is R2s DB Description packet back to R1;



Notice, we have Summary-LSA (TYPE 3) in there from area 24 which is advertising 10.24.0.0/24, next we see a request from R1 (a LS REQUEST) which is asking for more information about the 2 networks it just recieved LSA's for ....


So R2 then sends out an LS UPDATE (which contains more info about the TYPE1 & TYPE 3 LSA's)


Same process with R3 .... how koool!

Lets setup R4 (our Point-2-Point):

R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
R4(config-router)#network 10.24.0.0 0.0.0.255 area 24
R4(config-router)#network
*Mar  1 01:34:08.243: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Serial0/0.1 from LOADING to FULL, Loading Done
R4(config-router)#network 4.4.4.4 0.0.0.0 area 24


BAM, our neighbour relationship is already up ... BECUASE this is a point to point, so we dont need static neighbours, no BR, DBR (so no election is held) etc:

R4#show ip ospf ne

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           0   FULL/  -        00:00:35    10.24.0.2       Serial0/0.1



R4#show ip ospf int
Loopback0 is up, line protocol is up
  Internet Address 4.4.4.4/24, Area 24
  Process ID 1, Router ID 4.4.4.4, Network Type POINT_TO_POINT, Cost: 1
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
Serial0/0.1 is up, line protocol is up
  Internet Address 10.24.0.4/24, Area 24
  Process ID 1, Router ID 4.4.4.4, Network Type POINT_TO_POINT, Cost: 64
  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)
  Index 1/1, 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 2.2.2.2
  Suppress hello for 0 neighbor(s)


And lets check the routing table:


R4#show ip route
     1.0.0.0/24 is subnetted, 1 subnets
O IA    1.1.1.0 [110/129] via 10.24.0.2, 00:02:59, Serial0/0.1
     2.0.0.0/24 is subnetted, 1 subnets
O IA    2.2.2.0 [110/65] via 10.24.0.2, 00:02:59, Serial0/0.1
     3.0.0.0/24 is subnetted, 1 subnets
O IA    3.3.3.0 [110/129] via 10.24.0.2, 00:02:59, Serial0/0.1
     4.0.0.0/24 is subnetted, 1 subnets
C       4.4.4.0 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 2 subnets
O IA    10.12.3.0 [110/128] via 10.24.0.2, 00:02:59, Serial0/0.1
C       10.24.0.0 is directly connected, Serial0/0.1


SO in Objective 1, we need to address this part
"R3’s interface connecting to Area 356 needs to be configured for the OSPF RFC standard point-to-multipoint mode"
 
R3(config-router)#inter s0/1.1
R3(config-subif)#ip ospf network point-to-multipoint







Lets check it:

Serial0/1.1 is up, line protocol is up
  Internet Address 10.35.6.3/24, Area 356
  Process ID 1, Router ID 3.3.3.3, Network Type POINT_TO_MULTIPOINT, Cost: 64
  Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:28
  Supports Link-local Signaling (LLS)
  Index 1/3, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)



Excellent, lets get R5 and R6 setup:


R5(config)#router ospf 1
R5(config-router)#router-id 5.5.5.5
R5(config-router)#network 5.5.5.5 0.0.0.0 area 356
R5(config-router)#network 10.35.6.0 0.0.0.255 area 356



 MMmm but no neighbours, YET we are a point to multipoint, we dont have to configure static neighbours


R5#show ip ospf int
Loopback0 is up, line protocol is up
  Internet Address 5.5.5.5/24, Area 356
  Process ID 1, Router ID 5.5.5.5, Network Type POINT_TO_POINT, Cost: 1
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
Serial0/0.1 is up, line protocol is up
  Internet Address 10.35.6.5/24, Area 356
  Process ID 1, Router ID 5.5.5.5, Network Type POINT_TO_POINT, Cost: 64
  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:04
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)


R5#show run int Serial0/0.1
interface Serial0/0.1 point-to-point
 ip address 10.35.6.5 255.255.255.0
 frame-relay interface-dlci 503


The default mode for point-to-point is point-2-point, not multipoint ... R3 is the hub and has the connectivity to reach both R5 and R6 ....



If we check R3's serial interface:


R3#show ip ospf int Serial0/1.1
Serial0/1.1 is up, line protocol is up
  Internet Address 10.35.6.3/24, Area 356
  Process ID 1, Router ID 3.3.3.3, Network Type POINT_TO_MULTIPOINT, Cost: 64
  Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5



compare this against R5 serials interface:


Serial0/0.1 is up, line protocol is up
  Internet Address 10.35.6.5/24, Area 356
  Process ID 1, Router ID 5.5.5.5, Network Type POINT_TO_POINT, Cost: 64
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5


One thing that MUST match when forming neighbours is the HELLO timers!


If i adjust the HELLO timer on R3 to match R5
R3(config)#int Serial0/1.1
R3(config-subif)#ip ospf hello-interval 10
R3(config-subif)#
*Mar  1 02:02:36.687: %OSPF-5-ADJCHG: Process 1, Nbr 5.5.5.5 on Serial0/1.1 from LOADING to FULL, Loading Done



The dead timer is automagically adusted to x4 times the hello timer

R3#show ip ospf ne

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   FULL/DR         00:01:51    10.12.3.1       Serial0/0.1
5.5.5.5           0   FULL/  -        00:00:35    10.35.6.5       Serial0/1.1



Lets do R6, i should not need to adjust anything for R6, as we have changed the HUB interface on R3


R6(config)#router ospf 1
R6(config-router)#router-id 6.6.6.6
R6(config-router)#network 10.35.6.6 0.0.0.0 area 356
*Mar  1 02:05:29.979: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Serial0/0.1 from LOADING to FULL, Loading Done
R6(config-router)#network 6.6.6.6 0.0.0.0 area 356
R6(config-router)#exit


R6(config)#do show ip ospf ne

Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           0   FULL/  -        00:00:37    10.35.6.3       Serial0/0.1





R6(config)#do show ip ospf ne

Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           0   FULL/  -        00:00:37    10.35.6.3       Serial0/0.1







Excellent, lets check the routing table:


R6(config)#do show ip route

     1.0.0.0/24 is subnetted, 1 subnets
O IA    1.1.1.0 [110/129] via 10.35.6.3, 00:01:40, Serial0/0.1
     2.0.0.0/24 is subnetted, 1 subnets
O IA    2.2.2.0 [110/129] via 10.35.6.3, 00:01:40, Serial0/0.1
     3.0.0.0/24 is subnetted, 1 subnets
O IA    3.3.3.0 [110/65] via 10.35.6.3, 00:01:40, Serial0/0.1
     4.0.0.0/24 is subnetted, 1 subnets
O IA    4.4.4.0 [110/193] via 10.35.6.3, 00:01:40, Serial0/0.1
     5.0.0.0/24 is subnetted, 1 subnets
O       5.5.5.0 [110/129] via 10.35.6.3, 00:01:40, Serial0/0.1
     6.0.0.0/24 is subnetted, 1 subnets
C       6.6.6.0 is directly connected, Loopback0
     10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O IA    10.12.3.0/24 [110/128] via 10.35.6.3, 00:01:43, Serial0/0.1
O IA    10.24.0.0/24 [110/192] via 10.35.6.3, 00:01:43, Serial0/0.1
O       10.35.6.3/32 [110/64] via 10.35.6.3, 00:01:43, Serial0/0.1
C       10.35.6.0/24 is directly connected, Serial0/0.1



Okay, so we have now completed upto Objective 3 .... the rest to follow tomorrow


Wow, check this guy out over at : http://www.ine.com/about-petr.htm
"is the only person in the world to have obtained four CCIEs in under two year"




AWESOME, STUFF, just what i need for some more motivation!