OSPF: Over frame-relay

The network diagram is a replica from Jeremy’s network diagram. The lab objectives will not be posted here, if you need to have the lab you have to subscribe to CBT nuggets in order to download the lab workbook.

This lab was created using GNS3, I usually do not use GNS3 unless it is really necessary since I do not have enough real routers I resort to using GNS3, which is a pain in the neck, dynamips crashed 4-5 times, nevertheless GNS3 is still a great software that integrates several great command line softwares for people without real routers to hands-on, kudos to the creators of this free software and here’s the lab.

R1(config)#router ospf 1
R1(config-router)#network 10.12.3.1 0.0.0.0 area 0
R1(config-router)#exit
R1(config)#int lo0
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#router-id 1.1.1.1
R1(config-router)#end

The router-id command is to show the router’s name when I do show ip ospf neighbor.

ip address 1.1.1.1 255.255.255.255 this statement is actually not entirely necessary, because all loopback interfaces will be treated as stub host by OSPF. To change the behaviour the command ip ospf network point-to-point can be used at the loopback interface level.

R1(config)#int lo0
R1(config-if)#ip ospf network point-to-point

Let’s see the truncated ip ospf interface output:

R1#sh ip ospf interface
Loopback0 is up, line protocol is up
Internet Address 1.1.1.1/32, 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

There are several network types in the OSPF world:

1. broadcast

2. non-broadcast

3. virtual link

4. point-to-point

5. point-to-multipoint

The loopback address is classified as virtual link.

If there are several loopback addresses configured in the OSPF router, then the highest loopback address will be the router’s ID. However if router-id is used to manually configure the router’s ID, router’s ID created by router-id command will be used instead, but this command still requires the physical link with ip address to come up in order for OSPF process to start. A loopback interface however does not need the physical links with ip address to be up to start the OSPF process; as long as the router is turned on loopback interface is up.

Refer to the below OSPF interface:

R1#sh ip ospf interface
Loopback0 is up, line protocol is up
Internet Address 1.1.1.1/32, Area 0
Process ID 1, Router ID 1.1.1.1, Network Type LOOPBACK, Cost: 1
Loopback interface is treated as a stub Host
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 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:16
Wait time before Designated router selection 00:01:46
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)

As mentioned above, the loopback interface will be treated as stub host with a mask of /32. Also the default network type is non-broadcast.

In NBMA, OSPF will elect a DR and BDR, and all OSPF packets are in unicast. Neighbour relationship has to be manually configured with the neighbor command.

The state waiting means that the OSPF router is trying to identify which router is DR or BDR, in this state no DR or BDR election is allowed within the waiting time period.

(a simpler explanation is available in Routing TCP/IP Volume 1 page 349)

Look into the OSPF interface output again:

R1#sh ip ospf interface
Loopback0 is up, line protocol is up
Internet Address 1.1.1.1/32, Area 0
Process ID 1, Router ID 1.1.1.1, Network Type LOOPBACK, Cost: 1
Loopback interface is treated as a stub Host
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:01
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)

After the waiting period of 120s expired and still no DR or/and BDR is/are discovered, DR/BDR election starts, as you can see from the output R1’s OSPF interface becomes the DR of Area 0.

Note: network 0.0.0.0 255.255.255.255 area 0 is allowed, but not encouraged, this will make the router hard to decide which interface should belong to area 0, as a good practice always advertise route as specific as possible, for example advertise with network 10.12.3.1 0.0.0.0 area 0 will specifically tell the ospf router that the interface with the ip address 10.12.3.1 is the ospf interface at area 0.

To better illustrate the logic behind the configuration for R2, look at the diagram above.

As illustrated in the diagram, OSPF is actually the property of a router’s interface, refer to Routing TCP/IP Volume 1, page 341 last paragraph. Although the book specifically mention the DR is the property of a router’s interface, the logic is the same.

R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#int lo0
R2(config-if)#ip address 2.2.2.2 255.255.255.255
R2(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#network 2.2.2.2 0.0.0.0 area 0

R2(config-router)#network 10.12.3.2 0.0.0.0 area 0

R2(config-router)#network 10.24.0.2 0.0.0.0 area 24

R2(config-router)#end
R2#

Also take note that the process ID has no meaning outside the router, the process id simply to identify the ospf processes running on Cisco routers. Cisco routers allow multiple OSPF process to run on a single router, however it is never encouraged due to the amount of cpu resources needed.

No adjacency is formed because no hello is received, this is the behaviour in NBMA network, neighbour relationship has to be manually configured.

Which router should be DR? Or BDR?

A DR’s role is to reduce the number of LSA in a multi-access network, the overall network diagram present here is a Multi-access network where a router has multiple routers connected to it. In this situation a designated router is needed to control the number of LSA flooding the area. Refer to Routing TCP/IP Volume 1 Page 341 to page 342 for a clear illustration of the logic behind the DR and BDR election.

On Area 0 which should be the DR? Refer to this diagram:

Only R1 has full connectivity to all routers in Area 0 hence R1 should be the DR, R2 and R3 are spoke routers which only has connectivity to R1 hence both R2 and R3 should not be either a DR or BDR since they only have limited connectivity in Area 0.

R2(config)#int se0/1.1
R2(config-subif)#ip ospf priority 0

Recall that DR or BDR is the property of a router’s interface and not the entire router. By setting the priority of R2’s interface se0/1.1 to 0 R2’s serial 0/1.1 will never be elected either a DR or BDR.

R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#int lo0
R3(config-if)#ip address 3.3.3.3 255.255.255.255
R3(config-if)#exit
R3(config)#router ospf 1
R3(config-router)#network 3.3.3.3 0.0.0.0 area 0
R3(config-router)#network 10.12.3.3 0.0.0.0 area 0
R3(config-router)#network 10.35.6.3 0.0.0.0 area 356
R3(config-router)#end
R3#

R3(config)#int se0/0.1
R3(config-subif)#ip ospf priority 0

R3(config)#int se0/1
R3(config-if)#encapsulation frame-relay ietf
R3(config-if)#exit
R3(config)#int se0/1.1 multipoint
R3(config-subif)#ip address 10.35.6.3 255.255.255.0
R3(config-subif)#frame-relay map ip 10.35.6.4 305 broadcast
R3(config-subif)#frame-relay map ip 10.35.6.5 306 broadcast
R3(config-subif)#end
R3(config)#int se0/1
R3(config-if)#no shut

R1(config)#int se0/0.1
R1(config-subif)#ip ospf priority 200
R1(config-subif)#end

Actually I do not need to adjust the R1’s interface priority, the default is 1 which beats R2 and R3.

R1(config)#router ospf 1
R1(config-router)#neighbor 10.12.3.2 priority 0
R1(config-router)#neighbor 10.12.3.3 priority 0

Ok…Actually neighbor priority command will set the default priority value to whatever I want, so ip ospf priority command is actually not needed.

R1#sh ip ospf neighb

Neighbor ID     Pri   State           Dead Time   Address         Interface
N/A               0   ATTEMPT/DROTHER 00:00:22    10.12.3.3       Serial0/0.1
N/A               0   ATTEMPT/DROTHER 00:00:22    10.12.3.2       Serial0/0.1

Refer to Routing TCP/IP Volume 1 page 354:

Attempt state only applies to NBMA networks where neighbours are manually configured. A router sends packets to a neighbour in Attempt state at the HelloInterval instead of PollInterval.

R1#
*Mar  1 02:01:11.496: %OSPF-5-ADJCHG: Process 1, Nbr 0.0.0.0 on Serial0/0.1 from ATTEMPT to DOWN, Neighbor Down: Dead timer expired
*Mar  1 02:01:11.500: %OSPF-5-ADJCHG: Process 1, Nbr 0.0.0.0 on Serial0/0.1 from ATTEMPT to DOWN, Neighbor Down: Dead timer expired

Seems like R2 and R3 did not receive the hello sent by R1….hmm…..The state should be Full….

Link flap occurred on serial interfaces of the spoke routers after OSPF was configured. Also GNS3 crashed 6-7 times.

After dynamips crashed for the 15th time I gave up and decided to use real routers to do my lab.

This portion gave me a headache, serial sub interfaces kept flapping for R2 and R3 making frame-relay interface inactive. I tried the config on my real routers no problems at all.

So here’s the configuration for R1:

R1#sh run
Building configuration…

Current configuration : 1281 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
!
!
!
!
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/0
no ip address
encapsulation frame-relay
no fair-queue
!
interface Serial0/0.1 multipoint
ip address 172.30.0.1 255.255.255.0
frame-relay map ip 172.30.0.2 102 broadcast
frame-relay map ip 172.30.0.3 103 broadcast
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
no ip address
shutdown
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 172.30.0.1 0.0.0.0 area 0
neighbor 172.30.0.3
neighbor 172.30.0.2
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
line vty 0 4
login
!
!
end

R1#

Here’s the configuration for R2:

R2#sh run
Building configuration…

Current configuration : 1259 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
!
!
!
!
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/0
no ip address
shutdown
no fair-queue
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
no ip address
encapsulation frame-relay
!
interface Serial0/1.1 multipoint
ip address 172.30.0.2 255.255.255.0
ip ospf priority 0
frame-relay map ip 172.30.0.1 201 broadcast
frame-relay map ip 172.30.0.3 201 broadcast
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 172.30.0.2 0.0.0.0 area 0
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
line vty 0 4
login
!
!
end

R2#

Here’s the configuration for R3:

R3#sh run
Building configuration…

Current configuration : 1259 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
!
!
!
!
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/0
no ip address
encapsulation frame-relay
no fair-queue
!
interface Serial0/0.1 multipoint
ip address 172.30.0.3 255.255.255.0
ip ospf priority 0
frame-relay map ip 172.30.0.1 301 broadcast
frame-relay map ip 172.30.0.2 301 broadcast
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
no ip address
shutdown
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 172.30.0.3 0.0.0.0 area 0
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
line vty 0 4
login
!
!
end

R3#

Here’s the configuration for FRS1:

FRS#sh run
Building configuration…

Current configuration : 1579 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname FRS
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
!
!
!
!
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
frame-relay switching
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/0
no ip address
encapsulation frame-relay
logging event subif-link-status
logging event dlci-status-change
clock rate 1000000
no frame-relay inverse-arp
frame-relay intf-type dce
frame-relay route 102 interface Serial0/1 201
frame-relay route 103 interface Serial0/2 301
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
no ip address
encapsulation frame-relay
logging event subif-link-status
logging event dlci-status-change
clock rate 1000000
no frame-relay inverse-arp
frame-relay intf-type dce
frame-relay route 201 interface Serial0/0 102
!
interface Serial0/2
no ip address
encapsulation frame-relay
clock rate 1000000
no frame-relay inverse-arp
frame-relay intf-type dce
frame-relay route 301 interface Serial0/0 103
!
interface Serial0/3
no ip address
shutdown
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
line vty 0 4
login
!
!
end

FRS#

Advertisement

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 )

Facebook photo

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

Connecting to %s