OSPF network types: Broadcast

Configuring OSPF network can be cumbersome considering the requirement for each router to send update to other routers to create the same topology table. Obviously, in the big network with more routers, there will be more multicast updates to any routers which mean more traffic. This is where OSPF area comes into play. Rather than creating a one large network, OSPF can make smaller network partitions which connect to backbone network called Area 0. Having this smaller network partitions connect to Backbone network will create hierarchical network topology.

Still, inside an OSPF area, there are significant multicast packets sent to routers. Therefore OSPF has DR and BDR to reduce the multicast packets. Rather than sending those packets to all routers within the area, routers just need to send update to DR and BDR, then these two routers will multicast the packets to the rest of the network. Happened to remember about Route Reflector on BGP. It’s quite similar concepts.

Having those two requirements, some tweakings need to be made in order to make OSPF works. There are 3 Cisco proprietaries and 2 RFC standards known to configure OSPF network.

  • Non Broadcast Multi Access (NBMA) – RFC 2328 Standard
  • Broadcast – Cisco Proprietary
  • Point-to-Multipoint – RFC Standard
  • Point-to-Multipoint, Non-Broadcast – Cisco Proprietary
  • Point-to-Point – Cisco Standard

This is part 1 the next 5 parts writing.

Broadcast – Cisco Proprietary

  • Full or partial-mesh network topology.
  • One IP Subnet.
  • Hello Timer 10 seconds.
  • Automatic adjacency, DR/BDR elected.

Consider this as a LAN network topology where each router has full-mesh connectivity to other routers. The interface will behave as it is connected to LAN network and will be able to multicast hello packets to each routers. However, to avoid packet storming to all routers, therefore DR/BDR will be elected. OSPF neighbor adjacency will be automatically created due to the capability to multicast packets.

This is the dynamips .net file if you want to try it yourself.

autostart = false
model = 3640

[localhost]

	[[3640]]
		image = /Users/davidsudjiman/study/Cisco/IOS/ios_for_dynamips/c3640-js-mz.124-18.bin.image
		workingdir = /Users/davidsudjiman/study/cisco/dynamips/labs/ccnp/bsci/ospf/network_type/broadcast/
		ram = 128
		slot0 = NM-1FE-TX
		slot1 = NM-4T
		disk0 = 8

		idlepc = 0x604f7b2c

	# Router 1
	[[Router r1]]
		f0/0 = S1 11
		s1/0 = F1 1
		
	# Router 2
	[[Router r2]]
		f0/0 = S1 12
		s1/0 = F1 2
			
	# Router 3
	[[Router r3]]
		f0/0 = S1 13
		s1/0 = F1 3
		
	[[ETHSW S1]]
		11 = access 111
		12 = access 111
		13 = access 111
			
	[[FRSW F1]]
		1:102 = 2:201
		1:103 = 3:301
		2:203 = 3:302	
R1#sh run | s router ospf 1
router ospf 1
 log-adjacency-changes
 network 192.168.1.0 0.0.0.255 area 0

R1#sh run int f0/0
Building configuration...

Current configuration : 123 bytes
!
interface FastEthernet0/0
 ip address 192.168.1.1 255.255.255.0
 ip ospf network broadcast
end

R1#sh ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up 
  Internet Address 192.168.1.1/24, Area 0 
  Process ID 1, Router ID 192.168.1.1, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DROTHER, Priority 1 
  Designated Router (ID) 192.168.1.3, Interface address 192.168.1.3
  Backup Designated router (ID) 192.168.1.2, Interface address 192.168.1.2
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:07
  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 2, Adjacent neighbor count is 2 
    Adjacent with neighbor 192.168.1.2  (Backup Designated Router)
    Adjacent with neighbor 192.168.1.3  (Designated Router)
  Suppress hello for 0 neighbor(s)

Looking at R1 configuration ip ospf network broadcast will be the default option on LAN interface, in this case FastEthernet0/0. ip ospf network broadcast command on R1 is used for confirmation only.

Check out the result of sh ip ospf int f0/0 command above. It clearly shows the network type is BROADCAST, Hello packet interval is 10, and Dead timer is 40.

Here are the config of R2 and R2.

R2#sh run | s router ospf 1
router ospf 1
 log-adjacency-changes
 network 192.168.1.0 0.0.0.255 area 0

R2#sh run int f0/0
Building configuration...

Current configuration : 96 bytes
!
interface FastEthernet0/0
 ip address 192.168.1.2 255.255.255.0
end

R2#sh ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up 
  Internet Address 192.168.1.2/24, Area 0 
  Process ID 1, Router ID 192.168.1.2, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State BDR, Priority 1 
  Designated Router (ID) 192.168.1.3, Interface address 192.168.1.3
  Backup Designated router (ID) 192.168.1.2, Interface address 192.168.1.2
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:05
  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 1
  Last flood scan time is 4 msec, maximum is 4 msec
  Neighbor Count is 2, Adjacent neighbor count is 2 
    Adjacent with neighbor 192.168.1.1
    Adjacent with neighbor 192.168.1.3  (Designated Router)
  Suppress hello for 0 neighbor(s)
R3#sh run | s router ospf 1
router ospf 1
 log-adjacency-changes
 network 192.168.1.0 0.0.0.255 area 0

R3#sh run int f0/0
Building configuration...

Current configuration : 96 bytes
!
interface FastEthernet0/0
 ip address 192.168.1.3 255.255.255.0
end

R3#sh ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up 
  Internet Address 192.168.1.3/24, Area 0 
  Process ID 1, Router ID 192.168.1.3, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DR, Priority 1 
  Designated Router (ID) 192.168.1.3, Interface address 192.168.1.3
  Backup Designated router (ID) 192.168.1.2, Interface address 192.168.1.2
  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/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 2
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 2, Adjacent neighbor count is 2 
    Adjacent with neighbor 192.168.1.1
    Adjacent with neighbor 192.168.1.2  (Backup Designated Router)
  Suppress hello for 0 neighbor(s)

Ok, you might wondering, what if it is not a LAN network but a Frame-relay network? We sure can make full-mesh Frame Relay where each router can have connectivity to all routers. Will it work using the same ip ospf network broadcast command?

Let’s find out…

These are the original configuration for each router and confirmed that router connectivity to each other exists.

R1#sh run int s1/0
Building configuration...

Current configuration : 215 bytes
!
interface Serial1/0
 ip address 192.168.1.1 255.255.255.0
 encapsulation frame-relay
 ip ospf network broadcast
 serial restart-delay 0
 frame-relay map ip 192.168.1.2 102
 frame-relay map ip 192.168.1.3 103
end
R2#sh run int s1/0
Building configuration...

Current configuration : 215 bytes
!
interface Serial1/0
 ip address 192.168.1.2 255.255.255.0
 encapsulation frame-relay
 ip ospf network broadcast
 serial restart-delay 0
 frame-relay map ip 192.168.1.1 201
 frame-relay map ip 192.168.1.3 203
end
R3#sh run int s1/0
Building configuration...

Current configuration : 215 bytes
!
interface Serial1/0
 ip address 192.168.1.3 255.255.255.0
 encapsulation frame-relay
 ip ospf network broadcast
 serial restart-delay 0
 frame-relay map ip 192.168.1.1 301
 frame-relay map ip 192.168.1.2 302
end
R1#ping 192.168.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/11/20 ms
R1#ping 192.168.1.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/8/12 ms
R2#ping 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/9/12 ms
R2#ping 192.168.1.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/11/24 ms
R3#ping 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/12 ms
R3#ping 192.168.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/6/8 ms

Ok, connectivity is there and interface has been configured as boradcast.

Let see she ospf neighbor table…

R1#sh ip ospf nei

That’s weird? probably I have to reset the ospf process to make them reinitiate the ospf neighboring.

R1#clear ip ospf 1 pro
R1#clear ip ospf 1 process 
Reset OSPF process? [no]: y  
R1#sh ip ospf nei

Still, no luck. What’s wrong?

If we turn the debugging on to check the hello table. This is what we are seeing.

R1#debug ip ospf hello  
OSPF hello events debugging is on
Reset OSPF process? [no]: y
R1#
*Mar  1 00:17:15.135: OSPF: Send hello to 224.0.0.5 area 0 on Serial1/0 from 192.168.1.1
*Mar  1 00:17:25.135: OSPF: Send hello to 224.0.0.5 area 0 on Serial1/0 from 192.168.1.1
*Mar  1 00:17:35.135: OSPF: Send hello to 224.0.0.5 area 0 on Serial1/0 from 192.168.1.1

Seems that R1 is multicasting (using IP 224.0.0.5) on the right interface and from the right IP 192.168.1.1. The questing is, does these packet get out from the PVCs?

R1#sh frame-relay pvc

PVC Statistics for interface Serial1/0 (Frame Relay DTE)

              Active     Inactive      Deleted       Static
  Local          2            0            0            0
  Switched       0            0            0            0
  Unused         0            0            0            0

DLCI = 102, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial1/0

  input pkts 45            output pkts 45           in bytes 4116      
  out bytes 4104           dropped pkts 0           in pkts dropped 0         
  out pkts dropped 0                out bytes dropped 0         
  in FECN pkts 0           in BECN pkts 0           out FECN pkts 0         
  out BECN pkts 0          in DE pkts 0             out DE pkts 0         
  out bcast pkts 0         out bcast bytes 0         
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
  pvc create time 00:30:30, last time pvc status changed 00:28:50
          
DLCI = 103, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial1/0

  input pkts 57            output pkts 45           in bytes 5248      
  out bytes 4144           dropped pkts 0           in pkts dropped 0         
  out pkts dropped 0                out bytes dropped 0         
  in FECN pkts 0           in BECN pkts 0           out FECN pkts 0         
  out BECN pkts 0          in DE pkts 0             out DE pkts 0         
  out bcast pkts 0         out bcast bytes 0         
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
  pvc create time 00:30:31, last time pvc status changed 00:28:51
  
... <omitted> ...

R1#sh frame-relay pvc

PVC Statistics for interface Serial1/0 (Frame Relay DTE)

              Active     Inactive      Deleted       Static
  Local          2            0            0            0
  Switched       0            0            0            0
  Unused         0            0            0            0

DLCI = 102, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial1/0

  input pkts 45            output pkts 45           in bytes 4116      
  out bytes 4104           dropped pkts 0           in pkts dropped 0         
  out pkts dropped 0                out bytes dropped 0         
  in FECN pkts 0           in BECN pkts 0           out FECN pkts 0         
  out BECN pkts 0          in DE pkts 0             out DE pkts 0         
  out bcast pkts 0         out bcast bytes 0         
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
  pvc create time 00:31:23, last time pvc status changed 00:29:44
          
DLCI = 103, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial1/0
          
  input pkts 57            output pkts 45           in bytes 5248      
  out bytes 4144           dropped pkts 0           in pkts dropped 0         
  out pkts dropped 0                out bytes dropped 0         
  in FECN pkts 0           in BECN pkts 0           out FECN pkts 0         
  out BECN pkts 0          in DE pkts 0             out DE pkts 0         
  out bcast pkts 0         out bcast bytes 0         
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
  pvc create time 00:31:26, last time pvc status changed 00:29:46

The answer is NO. We can see that OSPF process trying to multicast the packet but none actually being sent to PVCs.

Remember that Frame Relay is NBMA network. It stands for Non-broadcast Multi-access. It means it is the nature of Frame Relay link NOT to broadcast/multicast packets.

There is actually a way to trick this NBMA network to broadcast packets. The command is…

frame-relay map ip <IP Address> broadcast

This command will forward broadcasts to this address when broadcast/multicast is disable because of non-broadcast medium.
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094051.shtml

Let’s try it.

R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#int s1/0
R1(config-if)#do sh run int s1/0
Building configuration...

Current configuration : 215 bytes
!
interface Serial1/0
 ip address 192.168.1.1 255.255.255.0
 encapsulation frame-relay
 ip ospf network broadcast
 serial restart-delay 0
 frame-relay map ip 192.168.1.2 102
 frame-relay map ip 192.168.1.3 103
end

R1(config-if)#frame-relay map ip 192.168.1.2 102 broadcast
R1(config-if)# frame-relay map ip 192.168.1.3 103 broadcast
R1(config-if)# 
R1(config-if)#
*Mar  1 00:45:46.727: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.2 on Serial1/0 from LOADING to FULL, Loading Done
*Mar  1 00:45:46.743: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.3 on Serial1/0 from LOADING to FULL, Loading Done

Voila! Look what I just did!

On R2, debug ip ospf hello shows that R1 and R2 completed the neighboring.

*Mar  1 00:44:57.927: OSPF: Send hello to 224.0.0.5 area 0 on Serial1/0 from 192.168.1.2
*Mar  1 00:45:07.927: OSPF: Send hello to 224.0.0.5 area 0 on Serial1/0 from 192.168.1.2
*Mar  1 00:45:17.927: OSPF: Send hello to 224.0.0.5 area 0 on Serial1/0 from 192.168.1.2
*Mar  1 00:45:27.931: OSPF: Send hello to 224.0.0.5 area 0 on Serial1/0 from 192.168.1.2
*Mar  1 00:45:37.931: OSPF: Send hello to 224.0.0.5 area 0 on Serial1/0 from 192.168.1.2
*Mar  1 00:45:46.107: OSPF: Rcv hello from 192.168.1.1 area 0 from Serial1/0 192.168.1.1
*Mar  1 00:45:46.111: OSPF: Send immediate hello to nbr 192.168.1.1, src address 192.168.1.1, on Serial1/0
*Mar  1 00:45:46.115: OSPF: Send hello to 192.168.1.1 area 0 on Serial1/0 from 192.168.1.2
*Mar  1 00:45:46.119: OSPF: End of hello processing
*Mar  1 00:45:46.135: OSPF: Rcv hello from 192.168.1.1 area 0 from Serial1/0 192.168.1.1
*Mar  1 00:45:46.139: OSPF: End of hello processing
*Mar  1 00:45:46.171: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.1 on Serial1/0 from LOADING to FULL, Loading Done

But this is not a complete config. We need to configure all router with broadcast, otherwise the neighboring will be only from R1 to R2 and from R1 to R3 only. But none from R3 to R2. Like these below.

R2#sh ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.1.1       1   FULL/BDR        00:00:39    192.168.1.1     Serial1/0
R3#sh ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.1.1       1   FULL/BDR        00:00:32    192.168.1.1     Serial1/0

And this is what happen when we change apply the broadcast command.

R2(config-if)#  frame-relay map ip 192.168.1.3 203 b  
R2(config-if)#  frame-relay map ip 192.168.1.1 201 b  
R2(config-if)#do sh ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.1.1       1   FULL/BDR        00:00:38    192.168.1.1     Serial1/0
192.168.1.3       1   FULL/DR         00:00:39    192.168.1.3     Serial1/0
R3(config-if)# frame-relay map ip 192.168.1.1 301 b
R3(config-if)# frame-relay map ip 192.168.1.2 302 b
R3(config-if)#
*Mar  1 00:52:06.839: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.2 on Serial1/0 from LOADING to FULL, Loading Done
R3(config-if)#do sh ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.1.1       1   FULL/BDR        00:00:34    192.168.1.1     Serial1/0
192.168.1.2       1   FULL/DROTHER    00:00:36    192.168.1.2     Serial1/0
R1#sh ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.1.2       1   FULL/DROTHER    00:00:33    192.168.1.2     Serial1/0
192.168.1.3       1   FULL/DR         00:00:32    192.168.1.3     Serial1/0

Beautiful! We now have full adjacency!

You see that 192.168.1.3 (R3) is DR and 192.168.1.1 (R1) is BDR. It means R3 will responsible multicasting Hello and BDR is the backup. To elaborate, R3 will be the only one to send multicast packets to R1 and R2. It also means that R1 and R2 will get updates from R3 ONLY. R1 won’t get multicast packets from R2, and vice versa.

NOTE. If you don’t know why R3 becomes DR and R1 becomes BDR, stop reading this and go to Cisco Documentation.

The example above is for Full-mesh Frame Relay where each router can broadcast to other routers and DR and BDR can be anywhere where possible.

2 thoughts on “OSPF network types: Broadcast

  1. Dear David,

    I was practicing the same and had one issue. While searching for the solution I found your article.

    If we change the priorities on spokes routers to 0, so they cannot become DR or BDR then the OSPF state between the both spokes remains as 2-Way. However the network advertise by one spoke is shows in the routing table of other spoke.

    When I change the priorities back to 1 on the spokes then BDR is also selected and OSPF Stage changed to Full.

    Do you have idea why this is happening.

    Regards,

    Shahid (Bxperts)

  2. Shahid,

    You don’t need to make your spoke either DR/BDR. Yes, your spoke and other spoke will get routing updates from DR/BDR but not from other spoke. This expected as on broadcast network, only DR/BDR that will send out the routing updates.

    HTH,
    dsu

Leave a comment