OSPF Next Hop IP with different Network Types

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:

  • Non-Broadcast
  • Broadcast
  • Point-to-Multipoint
  • Point-to-Multipoint Non-Broadcast
  • Point-to-Point

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:

ospf frame relay

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 2.2.2.0 /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 2.2.2.0 /24 in OSPF on router Spoke1:

Spoke1(config)#interface loopback 0
Spoke1(config-if)#ip address 2.2.2.2 255.255.255.0    
Spoke1(config-if)#exit
Spoke1(config)#router ospf 1
Spoke1(config-router)#network 2.2.2.0 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:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 799 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

567 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Tags:


Forum Replies

  1. Excellent lesson :slight_smile:

  2. Hi Rene,

    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 ?

  3. Hi Rene,

    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 ?

  4. Hi Hussein,

    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.

    Rene

  5. Hi Hussein,

    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:

    https://networklessons.com/eigrp/eigrp-over-frame-relay/

    Rene

20 more replies! Ask a question or join the discussion by visiting our Community Forum