Building network automation solutions

6 week online course

One of the obscure facts of IPv6 OSPF (OSPFv3) is that it uses a 32-bit router ID like OSPFv2. It's a reasonable choice, I haven't seen an OSPF network with more than a billion routers yet. However, could you guess how this requirement is implemented in Cisco IOS? OSPFv3 searches for an IPv4 address (effectively the same algorithm used by OSPFv2) to get the router ID for the IPv6 routing process. Neat, isn't it?

You might wonder what happens if you want to configure an IPv6-only router. OSPF won't start unless you configure the router ID manually. And, no, you cannot enter a number (which would be the expected format, as the router ID is just a number in the IPv6 world), you have to enter an IPv4 address. Long live IPv4 :))Here is a sample printout from a router. First, let's check the interface status:

Related posts by categories

5 comments:

Yep, I read that, too, and was wondering why they wanted to keep an IPv4 router ID in a pure IPv6 network. I guess this is for future job security as we grow older because by then our kids will only learn IPv6 in schools.

Cisco can probably generate a random IPv4 router id like the way it generated a random MAC address in the router as long as the software can guarantee the id's uniqueness within the network.

@William: The OSPF RFC is not to blame. As I said, 4 billion routers/network (32-bit router ID) is more than enough for the next few years. The problem is the Cisco's implementation, as Cisco always assumed Router-ID = IPv4-address.

Generating random 32-bit router IDs is not an option; eventually you'd get a duplicate router ID (and it would not be so uncommon due to birthday paradox) ... and managing random 32-bit numbers is even worse than managing IPv4 addresses.

The MAC addresses in the routers are not random either. The last time I've checked (but it was a long ago), each box had a burnt-in (probably EEPROM in those days) MAC prefix that it used to allocate MAC addresses on various interfaces.

Arrrggh! Just because a 32-bit number is represented in dotquad decimal notation DOES NOT MAKE IT AN IPv4 address!

It's like saying everytime I write "50" I'm talking about 50 dollars. It could be 50kms or 50dB or whatever. It's just a number!

127.0.0.1 in IPv4 is a loopback address. 127.0.0.1 is just dotquad decimal for HEX 7F000001.

Instead of getting people to write 32-bit numbers in (God forbid) binary or even Hex, Cisco standardise on dot-quad decimal, as it's concise and easy to read. For those migrating from IPv4 it can also serve as a nice transition mechanism. It *does not* mean you are keeping vestages of IPv4 around. I repeat - dot quad decimal does not imply IPv4!!!

@Angry Anonymous: Just because something is a 32-bit number does not mean it has to be written in dotted decimal ... and in case it's nothing more than a number, I can't see any advantage in writing it in dotted notation.

Similarly, OSPF areas numbers are 32-bit quantities. IOS allows you to write them as a decimal number or as dotted decimal. Most people (apart from creators of certification material)prefer decimal numbers.

What's worst is that IOS is still trying to use an IPv4 address to get an IPv6 router ID. This has nothing to do with dotted decimal notation but with focus on IPv4.

The author

Ivan Pepelnjak (CCIE#1354 Emeritus), Independent Network Architect at ipSpace.net, has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced internetworking technologies since 1990.