IPv4 forever?

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:

Site-D(config)#do show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES manual up up
FastEthernet0/1 unassigned YES manual up up
Loopback0 unassigned YES manual up up
No IPv4 running anywhere. Good. Let's continue and configure IPv6:
Site-D(config)#ipv6 unicast
Site-D(config)#ipv6 router ospf 1
Site-D(config-rtr)#
*Mar 1 01:18:46.423: %OSPFv3-4-NORTRID: OSPFv3 process 1 could not pick a router-id,
please configure manually
Oops, IPv6 OSPF won't start if the router doesn't have an IPv4 address. Let's configure the router ID:
Site-D(config-rtr)#router-id ?
A.B.C.D OSPF router-id in IP address format

Site-D(config-rtr)#router-id 10.0.1.8
Site-D(config-rtr)#

If you're a Cisco partner, you can run the Configuring OSPFv3 remote lab exercise free-of-charge from Partner Education Connection. Everyone else can get the same exercise as part of the IPv6 remote lab bundle from our learning store, where you can also buy the IPv6 Fundamentals, Design and Deployment (IP6FD) e-course.

5 comments:

  1. Thanx 4 the info buddy!!!!!!!!

    Jenny

    ReplyDelete
  2. 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.

    ReplyDelete
  3. @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.

    ReplyDelete
  4. 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!!!

    ReplyDelete
  5. @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.

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.