Kevin Dorrell, CCIE #20765

11 Mar 2008

IOS Gotcha : IPv6 address

Filed under: IPv6 — dorreke @ 21:50

This is a gotcha that almost anyone who has ever configured IPv6 has tripped over.  One thing it is easy to forget in the heat of the moment is that an interface can have as many IPv6 addresses as you want.

If you are used to configuring IPv4, you are probably used to changing the IP address of an interface and having it do exactly that.  So:

R7#conf t 
Enter configuration commands, one per line.  End with CNTL/Z. 
R7(config)#int Lo7 
R7(config-if)#ip address 192.168.7.1 255.255.255.0 
R7(config-if)#exit 
R7(config)#exit 
R7# 
*Mar  1 00:02:27.467: %SYS-5-CONFIG_I: Configured from console by console 
R7# 
R7#show run int Lo7 
Building configuration... Current configuration : 65 bytes 
! 
interface Loopback7 
 ip address 192.168.7.1 255.255.255.0 
end

Oops, I meant 192.168.17.1:

R7#conf t 
Enter configuration commands, one per line.  End with CNTL/Z. 
R7(config)#int Lo7 
R7(config-if)#ip address 192.168.17.1 255.255.255.0 
R7(config-if)#exit 
R7(config)#exit 
R7# 
*Mar  1 00:04:13.351: %SYS-5-CONFIG_I: Configured from console by console 
R7#show run int Lo7 
Building configuration... Current configuration : 66 bytes 
! 
interface Loopback7 
 ip address 192.168.17.1 255.255.255.0 
end

That’s better.  Now let’s try the same thing in IPv6:

R7#conf t 
Enter configuration commands, one per line.  End with CNTL/Z. 
R7(config)#int Lo7 
R7(config-if)#ipv6 address fec0::7:1/124 
R7(config-if)#^Z 
R7# 
*Mar  1 00:06:49.107: %SYS-5-CONFIG_I: Configured from console by console 
R7#show run int Lo7 
Building configuration... Current configuration : 94 bytes 
! 
interface Loopback7 
 ip address 192.168.17.1 255.255.255.0 
 ipv6 address FEC0::7:1/124 
end

Oops, I actually meant FEC7::7:1/124.  FEC0::7:1/124 should have been somewhere else in the topology. Let’s change it:

R7#conf t 
Enter configuration commands, one per line.  End with CNTL/Z. 
R7(config)#int Lo7 
R7(config-if)#ipv6 address fec7::7:1/124 
R7(config-if)#^Z 
R7# 
*Mar  1 00:08:29.679: %SYS-5-CONFIG_I: Configured from console by console 
R7#

OK, that’s changed it, hasn’t it?  Let’s check:

R7#show run int Lo7 
Building configuration... Current configuration : 122 bytes 
! 
interface Loopback7 
 ip address 192.168.17.1 255.255.255.0 
 ipv6 address FEC0::7:1/124 
 ipv6 address FEC7::7:1/124 
end

You see how it hasn’t changed the IPv6 address?  It has just added an extra one.  A real “gotcha”.

Advertisements

3 Comments »

  1. Just a minor comment (nitpick, really). In your example you’re using IPv6 site-local addresses, which are deprecated by RFC 3879. For documentation purposes, you should use the IPv6 documentation prefix: 2001:DB8::/32 (see RFC 3849).

    Comment by Derek Morr — 11 Mar 2008 @ 23:04

  2. Derek, Thanks for pointing that out. I wasn’t aware of the discussion surrounding the old site-local IP address ranges. I guess I used FEC0:: because I have done too many NMC labs!

    I skimmed through those documents, but I must find time to read them in more detail. In particular, I noticed in RFC 3879 that the vote was not unanimous. From my preliminary skim through the documents, I think I would have hesitated before voting to adopt it. The arguments put forward are quite valid: the fact that site-local addresses are not unambiguous (obviously), that they can leak out in application data, etc.

    What they don’t seem to have addressed (unless I missed it) is the use of the addresses in an “isolated” laboratory context. (Unless, of course, the 2001:DB8::/32 should be used for that as well. That is not 100% clear to me yet.) The document argues from the p.o.v. of an operational network, and is quite correct from that standpoint. But does it imply that if, for example, I am teaching a class-full of students, then each student should have a globally unique address space? I can imagine that would add a layer of complication to the classroom documentation, assignment marking scripts, etc.

    Maybe I am making a mountain out of a molehill – a common defect of mine. 🙂

    Now, I have a dilemma (trilemma?) whether to edit the posting (and risk making a mistake or falsifying lab results), redo the experiment (time permitting), or leave it as it is, with this discussion to clarify the point. I think for now I shall take option 3.

    Thanks again for pointing it out, and I shall bear it in mind in the future.

    Comment by dorreke — 12 Mar 2008 @ 09:16

  3. thanks much, brother

    Comment by Evaxi — 24 Mar 2008 @ 16:24


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: