OSPF over Frame-Relay: Non-Broadcast

OSPF over Frame-Relay: Non-Broadcast

When OSPF is run on a network, two important events occur before routing information is exchanged.

    • OSPF neighbors are discovered using multicast Hello packets.
    • For a multi-access network (like Ethernet and Frame-relay), a DR (Designated Router) and a BDR (Backup Designated Router) are elected. All routers on that segment form adjacency with the DR and BDR only.

Hello packets are multicast to 224.0.0.5 address. In order for the Hello packets to reach remote routers, the underlying Layer 2 technology must allow broadcast/multicast packets to be forwarded. Frame-relay, inherently, does not forward broadcast or multicast packets to be sent. Hence, in NBMA network topology, the neighbors are not discovered automatically. Neighbors must be configured manually. OSPF elects DR and BDR for every multi-access network. In a frame-relay hub-and-spoke environment, ideally, the Hub router must be made the DR.

The below network is a simple hub-and-spoke topology. Each Spoke router has a single DLCI towards the Hub router. The Hub has multiple DLCIs towards Spoke routers.

Frame-Relay Configuration

The frame-relay configuration on the Hub and Spoke routers is as below.

Hub FR Configuration

interface serial 0/0
 encapsulation frame-relay
 ip address 10.1.1.1 255.255.255.0
 frame-relay interface-dlci 102
 frame-relay interface-dlci 103
!

Spoke1 FR Configuration

interface serial 0/0
 encapsulation frame-relay
 ip address 10.1.1.2 255.255.255.0
 frame-relay interface-dlci 201
!

Spoke2 FR Configuration

interface serial 0/0
 encapsulation frame-relay
 ip address 10.1.1.3 255.255.255.0
 frame-relay interface-dlci 301
!

This provides reachability from Hub to Spoke routers but not between Spoke routers.

OSPF Configuration

The basic OSPF configuration on each routers is as below:

Basic OSPF Configuration

Hub router:
router ospf 1
 network 10.1.1.0 0.0.0.255 area 0
!
Spoke1 router:
router ospf 1
 network 10.1.1.0 0.0.0.255 area 0
!
Spoke2 router:
router ospf 1
 network 10.1.1.0 0.0.0.255 area 0
!

The router figures out that it is connected to a non-broadcast network type when OSPF is configured on an interface. By default, OSPF treats the physical interface and frame-relay multipoint interface as NBMA network type. The network type can be viewed using show ip ospf interface command.

NBMA network type

Hub# show ip ospf interface
Serial0/0 is up, line protocol is up
  Internet Address 10.1.1.1/24, Area 0
  Process ID 1, Router ID 10.1.1.1, Network Type NON_BROADCAST, Cost: 64
!---- output omitted

Since the router realizes that it is connected to an NBMA network where broadcast/multicast packets are not forwarded, it does not attempt to send any Hello packets. Instead, a neighbor <neighbor-ip-address> command is required under OSPF configuration on the Hub router for each Spoke routers.

Also, the Hub router must be made the DR of the network. Hence, the OSPF Priority is set to 255 on the Hub router. OSPF Priority of 0 on the Spoke routers make them ineligible for election in DR/BDR.

Hub OSPF Configuration

router ospf 1
 network 10.1.1.0.0.0.0.255 area 0
 neighbor 10.1.1.2
 neighbor 10.1.1.3
!
interface serial 0/0
 ....
 ip ospf priority 255
!

Spokes OSPF Configuration

router ospf 1
 network 10.1.1.0 0.0.0.255 area 0
!
interface serial 0/0
 ....
 ip ospf priority 0
!

This causes the Hub router to send unicast Hello messages to each Spoke routers. The Spoke routers respond to these Hello messages with a unicast Hello messages of themselves. The packet capture below shows a unicast Hello message to Spoke2 router.

Unicast Hello messages to Spoke routers

*Mar  1 00:07:28.339: OSPF: Send hello to 10.1.1.3 area 0 on Serial0/0 from 10.1.1.1
*Mar  1 00:07:28.343: OSPF: Send hello to 10.1.1.2 area 0 on Serial0/0 from 10.1.1.1
*Mar  1 00:07:28.455: OSPF: rcv. v:2 t:1 l:48 rid:10.1.1.3
      aid:0.0.0.0 chk:D631 aut:0 auk: from Serial0/0
*Mar  1 00:07:28.459: OSPF: Rcv hello from 10.1.1.3 area 0 from Serial0/0 10.1.1.3
*Mar  1 00:07:28.459: OSPF: Send immediate hello to nbr 10.1.1.3, src address 10.1.1.3, on Serial0/0
*Mar  1 00:07:28.459: OSPF: Send hello to 10.1.1.3 area 0 on Serial0/0 from 10.1.1.1
*Mar  1 00:07:28.463: OSPF: End of hello processing
*Mar  1 00:07:28.467: OSPF: rcv. v:2 t:1 l:48 rid:10.1.1.2
      aid:0.0.0.0 chk:D632 aut:0 auk: from Serial0/0
*Mar  1 00:07:28.467: OSPF: Rcv hello from 10.1.1.2 area 0 from Serial0/0 10.1.1.2
*Mar  1 00:07:28.471: OSPF: Send immediate hello to nbr 10.1.1.2, src address 10.1.1.2, on Serial0/0
*Mar  1 00:07:28.471: OSPF: Send hello to 10.1.1.2 area 0 on Serial0/0 from 10.1.1.1

If the Hello messages are acceptable, OSPF adjacency is formed between Hub and Spoke routers, but not between Spoke routers. The DROTHER state for Spoke routers indicate they are neither DR nor BDR.

OSPF Adjacency

Hub# show ip ospf neighbors
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.2          0   FULL/DROTHER    00:01:53    10.1.1.2        Serial0/0
10.1.1.3          0   FULL/DROTHER    00:01:48    10.1.1.3        Serial0/0
Spoke1# show ip ospf neighbors
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.1        255   FULL/DR         00:01:48    10.1.1.1        Serial0/0
Spoke2# show ip ospf neighbors
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.1        255   FULL/DR         00:01:35    10.1.1.1        Serial0/0

Unicast OSPF updates

When Spoke1 router advertises 2.2.2.2/32 network, it sends a unicast Update packet to the Hub router. The Hub router advertises this network over DLCI 103 to Spoke2 router without changing the next-hop due to multi-access network behavior.

Advertising 2.2.2.2/32

Hub# show ip route 2.2.2.2
Routing entry for 2.2.2.2/32
  Known via "ospf 1", distance 110, metric 65, type intra area
  Last update from 10.1.1.2 on Serial0/0, 00:00:08 ago
  Routing Descriptor Blocks:
  * 10.1.1.2, from 10.1.1.2, 00:00:08 ago, via Serial0/0
      Route metric is 65, traffic share count is 1
Spoke2# show ip route 2.2.2.2
Routing entry for 2.2.2.2/32
  Known via "ospf 1", distance 110, metric 65, type intra area
  Last update from 10.1.1.2 on Serial0/0, 00:00:48 ago
  Routing Descriptor Blocks:
  * 10.1.1.2, from 10.1.1.2, 00:00:48 ago, via Serial0/0
      Route metric is 65, traffic share count is 1

However, this poses a problem as there is no reachability between Spoke1 and Spoke2 routers. The CEF entry shows valid glean adjacency indicating that the next-hop should be directly connected but there is no MAC header rewrite information available.

Spoke1 unreachable

Spoke2# show ip cef 10.1.1.2
10.1.1.0/24, version 8, epoch 0, attached, connected
0 packets, 0 bytes
  via Serial0/0, 0 dependencies
    valid glean adjacency
Spoke2# ping 10.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

This can be fixed by configuring a frame-relay map command under the frame-relay interface. This provides a mapping between the destination address and the DLCI that connects to the destination address.

Frame-Relay Mapping

Spoke1 router:
interface serial 0/0
 ....
 frame-relay map ip 10.1.1.3 201
!
Spoke2 router:
interface serial 0/0
 ....
 frame-relay map ip 10.1.1.2 301
!

Valid FR Mapping

Spoke2# show ip cef 10.1.1.2
10.1.1.2/32, version 13, epoch 0, connected, cached adjacency 10.1.1.2
0 packets, 0 bytes
  via 10.1.1.2, Serial0/0, 0 dependencies
    next hop 10.1.1.2, Serial0/0
    valid cached adjacency
Spoke2# ping 10.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/57/172 ms