Fun (?!) with Cisco OSPF part 1

There are several factors involved in successfully forming an OSPF neighbourship, these are:

  1. Must pass the authentication process
  2. Must be in the same subnet with a matching mask
  3. Must be in the same OSPF area
  4. Stub flag must match
  5. Unique router-id required
  6. Dead and hello timers must match

This post really just refers to item 3 – the OSPF area. In the past I have come across routers set in area while being neighbours of routers in area 0. This always struck me as weird but I had assumed it was an old IOS thing and pushed it to the back of my mind! It seems however that the area ID can be entered in either decimal or dotted quad notation, more interestingly they are interoperable! Here is the configuration in standard format:

router ospf 1
 network area 456

All pretty standard, but the neighbour is configured thus:

router ospf 1
 network area

Interesting huh? How does become 456? Well, the dotted quad format should be treated as 32 bit single binary number so in full binary it would be:

0000 0000 0000 0000 0000 0001 1100 1000

When you take into account that the router shows this when we use the question mark after the ‘area’ part of the command:

R5(config-router)#network area ?
  <0-4294967295>  OSPF area ID as a decimal value
  A.B.C.D         OSPF area ID in IP address format

And as you would predict, the binary number 1111 1111 1111 1111 1111 1111 1111 1111 is equal to 4294967295 or, should you want to enter the area in dotted quad format, it is of course

It’s not possible to mix up the formats on the same router, it seems that once an area has been defined in dotted quad format, there it must stay, see this example:

R4(config)#router ospf 1
R4(config-router)#network area 
R4(config-router)#area 4294967295 stub
R4#sh run | s ospf
router ospf 1
 area stub
 network area

But I suppose that would have been VERY confusing!

This entry was posted in Cisco and tagged , , . Bookmark the permalink.

Leave a Reply

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