OSPF will use different IP addresses for the next hop depending on the network type that you use. This can be confusing when you try configuring OSPF on top of a frame-relay network. In this short lesson, I want to show you the difference between the next-hop IP address and the OSPF network type that we use.
There are 5 OSPF network types:
- Point-to-Multipoint Non-Broadcast
I made non-broadcast and broadcast blue because these two network types have something in common. They both require a DR/BDR election and basically, you are telling OSPF that you have a multi-access network. In other words…every router can reach any other router. This can be challenging with frame-relay because this is not always the case if you have a partial mesh or hub and spoke configuration.
Point-to-multipoint, point-to-multipoint non-broadcast, and point-to-point are in red because they have one thing in common: We tell OSPF that we have a “bunch of point-to-point” links. As you will see in my demonstration, the “blue” network types have different next-hop behavior from the “red” network types.
Let’s take a look at a configuration so I can demonstrate it to you:
Above you see a frame-relay hub and spoke network. We have two PVCs, but there is only a single subnet, so this is a frame-relay point-to-multipoint network. You can also see that router Spoke1 has network 22.214.171.124 /24 behind it. We will advertise this network into OSPF and see what the next hop IP address is like. Let’s configure our routers:
Hub(config)#interface serial 0/0 Hub(config-if)#ip address 192.168.123.1 255.255.255.0 Hub(config-if)#encapsulation frame-relay Hub(config-if)#ip ospf network broadcast Hub(config-if)#exit Hub(config)#router ospf 1 Hub(config-router)#network 192.168.123.0 0.0.0.255 area 0
Spoke1(config)#interface serial 0/0 Spoke1(config-if)#ip address 192.168.123.2 255.255.255.0 Spoke1(config-if)#encapsulation frame-relay Spoke1(config-if)#ip ospf network broadcast Spoke1(config-if)#ip ospf priority 0 Spoke1(config-if)#exit Spoke1(config)#router ospf 1 Spoke1(config-router)#network 192.168.123.0 0.0.0.255 area 0
Spoke2(config)#interface serial 0/0 Spoke2(config-if)#ip address 192.168.123.3 255.255.255.0 Spoke2(config-if)#encapsulation frame-relay Spoke2(config-if)#ip ospf network broadcast Spoke2(config-if)#ip ospf priority 0 Spoke2(config-if)#exit Spoke2(config)#router ospf 1 Spoke2(config-router)#network 192.168.123.0 0.0.0.255 area 0
Above you see my configuration for the hub and spoke routers. I configured frame-relay, used the broadcast network type, and made sure that the spoke routers won’t become the DR/BDR with the
priority 0 command. Now let’s advertise network 126.96.36.199 /24 in OSPF on router Spoke1:
Spoke1(config)#interface loopback 0 Spoke1(config-if)#ip address 188.8.131.52 255.255.255.0 Spoke1(config-if)#exit Spoke1(config)#router ospf 1 Spoke1(config-router)#network 184.108.40.206 0.0.0.255 area 0
We will add a loopback interface to advertise the network in OSPF. Let’s check router Spoke2 to see what it looks like in the routing table:
If we use distance vector routing protocol the next hop ip address will be the hub router in both of broadcast & non-broadcast network types ? that’s right ? or I’am wrong ?
If we use OSPF non-broadcast network type we need to configure spoke router to become OSPF neighbors as well as create additional frame-relay maps ? that’s right ? please correct me if I wrong ?
As long as the spoke routers are neighbors with the hub then the spokes will be able to learn all prefixes. The only problem is that with the broadcast and non-broadcast network types, the spoke won’t know how to reach the next hop of another spoke…that’s what you need the frame-relay maps for.
Routing protocols like EIGRP or RIP don’t have the broadcast and non-broadcast network types that OSPF has. By default they use multicast and if you use the neighbor command they switch to unicast traffic only, that’s it.
The next hop will be the Hub router though, you can see see an example here: