Stateless autoconfiguration for IPv6 is like a “mini-DHCP” server for IPv6. Routers running IPv6 can give the prefix of the network and a gateway address to clients looking for an IPv6 address. IPv6 uses the NDP (Neighbor Discovery Protocol) and one of the things this protocol offers is RS (Route Solicitation and (RA) Router Advertisement messages that help an IPv6 device to automatically configure an IPv6 address. Let’s take a look at a configuration example:

I’m going to use two routers to show you how stateless autoconfiguration works. R2 will have an IPv6 address and is going to send router advertisements. R1 will use this to configure it’s own IPv6 address.
R2(config)#ipv6 unicast-routing
R2(config)#interface fastEthernet 0/0
R2(config-if)#ipv6 address 2001:1234::/64 eui-64
Besides configuring an IPv6 address we have to use the ipv6 unicast-routing command to make R2 act like a router. Remember this command since you need it for routing protocols as well.
R1(config)#interface fastEthernet 0/0
R1(config-if)#ipv6 address autoconfig
We need to enable ipv6 address autoconfig on R1 to make sure it generates its own IPv6 address.
R1#debug ipv6 nd
ICMP Neighbor Discovery events debugging is on
R2#debug ipv6 nd
ICMP Neighbor Discovery events debugging is on
We can use debug ipv6 nd to watch the whole process.
R2#
ICMPv6-ND: Sending RA to FF02::1 on FastEthernet0/0
ICMPv6-ND: MTU = 1500
ICMPv6-ND: prefix = 2001:1234::/64 onlink autoconfig
Here you can see R2 sending the router advertisement with the prefix.
R1#
ICMPv6-ND: Received RA from FE80::CE0A:18FF:FE0E:0 on FastEthernet0/0
ICMPv6-ND: Autoconfiguring 2001:1234::CE09:18FF:FE0E:0 on FastEthernet0/0
This is R1 receiving the router advertisement and configuring its own IPv6 address.
R1#show ipv6 interface brief
FastEthernet0/0 [up/up]
FE80::CE09:18FF:FE0E:0
2001:1234::CE09:18FF:FE0E:0
And here is the proof that we have a fresh new IPv6 address on R1.
R1#show ipv6 routers
Router FE80::CE0A:18FF:FE0E:0 on FastEthernet0/0, last update 0 min
Hops 64, Lifetime 1800 sec, AddrFlag=0, OtherFlag=0, MTU=1500
HomeAgentFlag=0, Preference=Medium
Reachable time 0 msec, Retransmit time 0 msec
Prefix 2001:1234::/64 onlink autoconfig
Valid lifetime 2592000, preferred lifetime 604800
You can also use the show ipv6 routers command to see all cached router advertisements. This is a good example where you will see the link-local address of R2 instead of the global unicast address.
Not bad right? If we can do this why do we still care about DHCPv6? Don’t forget DHCP can do many more things than just giving out IPv6 addresses like:
- Registering hostnames of computers in DNS.
- Include a list of DNS or WINS servers.
- Include the IPv6 address of Callmanager (for VoIP phones) or a wireless LAN controller (for lightweight access points).
DHCP is of course also available for IPv6 and is called DHCPv6. The big difference between DHCP for IPv4 and DHCPv6 is that we don’t use broadcast traffic anymore. When an IPv6 device is looking for a DHCPv6 server it will send multicast packets to FF02::1:2. Routers will forward these packets to DHCP servers.
hostname R2
!
ipv6 unicast-routing
!
interface fastEthernet 0/0
ipv6 address 2001:1234::/64 eui-64
!
end
hostname R1
!
ipv6 unicast-routing
!
interface fastEthernet 0/0
ipv6 address autoconfig
!
end
That’s all for now. If you enjoyed this lesson please leave a comment!
No comments:
Post a Comment