EIGRP and OSPF – Are We Connected?

For both OSPF and EIGRP routers to become neighbors, their interface’s primary IP address must be on the same subnet. That statement is true. There is a difference in the definition of “same subnet”, though.

In OSPF, both routers have to be configured to be on the same subnet with the same mask or else they won’t neighbor up.  When an hello packet is sent, the subnet mask is sent embedded in there.  The router does a quick look to be sure the subnets are defined the same way on both ends.  If everything doesn’t match, they don’t neighbor. Here’s a Wireshark screenshot to show you the OSPF hello.  Note: See edit below.

OSPF-Header

In EIGRP,the subnet mask isn’t sent in the hello packet, so that doesn’t come into play.  Each router does a subnet calculation on the source address of the potential suitor, and, if that guy falls within the connected network, the peering magic happens.  Here’s another Wireshark shot for you to enjoy.

EIGRP-Header

Send any Wireshark certification vouchers questions my way.

Edit:  I did some further research on Julius’s comment about point-to-point links in OSPF.  It is absolutely true that point-to-point links do indeed ignore the subnet mask, and routers will become neighbors even with mismatched masks.  The same holds true for point-to-multipoint.  The other network types (non-broadcast and point-to-multipoint non-broadcast) don’t support dynamic neighbor discovery, so there’s nothing to test between those.  The moral of the story is that the mask is only evaluated on broadcast network types.

Aaron Conaway

I shake my head around sometimes and see what falls out. That's what lands on these pages.

More Posts

Follow Me:
Twitter

2 comments for “EIGRP and OSPF – Are We Connected?

  1. Julius
    June 26, 2014 at 10:08 pm

    I guess that if OSPF network type is point-to-point then the subnet mask is not checked.

    Just my 2 cents..

  2. June 27, 2014 at 10:17 am

    You’re right, Julius. In a P-P network type, the mask is still carried in the hello packet, but the routers still neighbor up.

    This requires further study. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *