Welcome to this first article of many in which we will be looking at different concepts related to the OSPF routing protocol. RFC 2328 – OSPF Version 2 – will be our reference document, so it will be good to have a copy of this RFC at hand.
In this article, we will look at the different network types supported by OSPF and the behavior of OSPF in these different network types.
CCNA Training – Resources (Intense)
According to RFC 2328 section 1.2, there are three major network types defined in OSPF:
- Point-to-point networks
- Broadcast networks
- Non-broadcast networks which is sub-divided into non-broadcast multi-access (NBMA) networks and point-to-multipoint networks.
This is the simplest form of the network types: Two devices (routers) are connected together with a single link. An example of a point-to-point link is a serial link connecting just two routers (using HDLC or PPP). With point-to-point links, OSPF does not select a DR or BDR. Also, hello packets are sent to the multicast address 184.108.40.206.
Let’s use the lab diagram below to confirm the operation of OSPF on a point-to-point link:
The configuration on the routers is as follows:
! ***R1's Configuration *** hostname R1 ! interface Serial1/0 ip address 192.168.12.1 255.255.255.252 clock rate 64000 ! router ospf 1 network 192.168.12.0 0.0.0.3 area 0 ! ! ***R2's Configuration *** hostname R2 ! interface Serial1/1 ip address 192.168.12.2 255.255.255.252 ! router ospf 1 network 192.168.12.0 0.0.0.3 area 0
The show ip ospf interface command will reveal to us that, based on the interface (layer 2 technology), Cisco has defaulted the serial interface to the point-to-point network type:
We can also capture packets off one of the serial interfaces, which will enable us look into the details of the hello packet sent by the routers:
As you can see, the packet is sent to the multicast address of 220.127.116.11. Also notice that the ‘Designated Router’ and ‘Backup Designated Router’ fields are set to 0.0.0.0 meaning there is no DR or BDR.
As the name suggests, broadcast networks support the “broadcast” capability, meaning that a broadcast/multicast packet sent by one device on the network can be received by all/some of the other devices. These types of networks are also multi-access because more than two devices can be connected to them. Ethernet is an example of a broadcast network.
On broadcast networks, neighbors are dynamically discovered by the hellos that sent to the multicast address of 18.104.22.168. Also, DR and BDR are elected on these networks.
Note: In a bid to reduce the number of OSPF adjacencies, other routers (non-DR/BDR) only form full adjacencies with the DR/BDR and not with each other.
The lab setup below shows a typical broadcast network. All routers connect to the network via their Ethernet0/0 interface:
From the show ip ospf interface command on R1, we see that the e0/0 interface has the broadcast network type:
A packet capture of the hello packet from R1 is also shown below. Notice that a DR and a BDR have been elected on this network.
These are networks that support multiple devices (multi-access) but do not support the broadcast capability. Frame-relay is an example of a non-broadcast network. OSPF can operate in two modes when dealing with non-broadcast networks: non-broadcast multi-access (NBMA) or point-to-multipoint.
When OSPF operates in NBMA mode, it mimics a broadcast network (DR/BDR are elected) but, since broadcast is not supported, neighbors may need to be manually configured. One of the limitations of this is that there must be a full mesh between the devices; i.e., neighbors must be able to communicate directly; otherwise, the OSPF network may experience issues.
The lab setup below is a frame-relay full-mesh network among three routers:
The configuration on R1 is as shown below:
interface Serial1/0 ip address 10.10.123.1 255.255.255.0 encapsulation frame-relay ! router ospf 1 network 10.10.123.0 0.0.0.255 area 0 neighbor 10.10.123.2 neighbor 10.10.123.3 !
Hint: The configuration on R2 and R3 is similar. Inverse ARP is turned on by default so I don’t have to configure any static frame relay mapping.
Looking at the show ip ospf interface command output, we see that the default network type for a physical interface configured with an NBMA technology is “NON_BROADCAST”:
With the neighbor statements configured, hellos are now unicast instead of multicast, as shown below. Also notice that a DR and BDR have been elected:
Note: Another way to configure this so that OSPF adjacencies are formed is to change the OSPF network type on the interfaces to BROADCAST; this way, we would not need the neighbor statements under the OSPF process and hellos will now be multicast. For problems that may occur with running OSPF in NBMA and Broadcast mode over Frame Relay, refer to this Cisco article.
In this mode, OSPF treats the non-broadcast network like a collection of point-to-point links. There is no DR/BDR election, but neighbors may be automatically discovered, depending on how the interface is configured (e.g., if inverse ARP is turned on). Another advantage of running OSPF in this mode is that a common subnet can still be used among the routers, unlike different subnets in the case of point-to-point links.
We will use the same lab setup as the one shown above for NBMA, but this time, the serial interfaces have been configured with the ip ospf network point-to-multipoint command, e.g.:
interface Serial1/0 ip address 10.10.123.1 255.255.255.0 encapsulation frame-relay ip ospf network point-to-multipoint !
The show ip ospf interface command output reveals that the network type has changed to POINT_TO_MULTIPOINT:
A capture of the hello packet below shows that there is no DR/BDR:
This brings us to the end of this article, where we have considered the different network types supported by OSPF. We have also seen the behavior of OSPF when operating in these different network types – whether hellos are multicast or unicast, if DR/BDR are elected, and so on. Finally, we also looked at how to change the default network type on the interface of Cisco routers.
I hope you have found this article insightful and I look forward to writing other OSPF articles.
References and Further Reading
- RFC 2328: OSPF Version 2: https://tools.ietf.org/html/rfc2328
- OSPF Network types: http://packetlife.net/blog/2008/jun/19/ospf-network-types/
- OSPF Design Guide: http://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/7039-1.html
- Initial Configurations for OSPF over Non-Broadcast Links: http://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/13690-18.html