2

How to combine, get prefix ipv6 through the NDP and getting dns through dhcpv6?

example:

interface FastEthernet1/0
 no ip address
 duplex auto
 speed auto
 ipv6 address 2000::/64 eui-64
 ipv6 nd prefix 2000:34::/64

ipv6 dhcp pool DNS_ONLY
 dns-server 2000:FFFC:BBBB:AAAA:CCCC::1
Sander Steffann
  • 7,572
  • 18
  • 29
Mike
  • 21
  • 1

1 Answers1

2

To get this working you need to make a few changes.

First of all the whole 2000:0000::/32 prefix is reserved for Teredo, so you cannot use that on a LAN. I'll convert to addresses from the documentation prefix 2001:db8::/32 here. Please replace it with the prefix you got from your ISP. If you don't have one (i.e. because this is an isolated test setup) then please generate a ULA prefix. There is a useful generator and optional registration page at the SixXS ULA registry.

Personally I prefer not to use the eui-64 option on servers and routers, because I want the address to be predictable even after I swap network interface cards (and the eui-64 option depends on the MAC address of that card), so in my example I configure a fixed address. I also configure the all-routers anycast address, which is the /64 prefix with the host part all zeroes. I don't know any systems that use it, but it never hurts to comply with the RFC :-)

Then you have to tell the network that there is a DHCPv6 server in stateless mode available. This is done with the other-config-flag in the Router Advertisement.

Then you have to tell the router which DHCPv6 server settings to use on the interface. You do that with the ipv6 dhcp server ... setting.

You also might want to set your router to high precedence. It can prevent some problems when other systems accidentally (op maliciously) send Router Advertisements on the LAN. This is the ipv6 nd router-preference High setting.

And you don't have to explicitly specify the prefix for the Router Advertisement. It will get the prefix from its own interface address by default. You can change the prefix options for the default prefix(es) with the commands that start with ipv6 nd prefix default ..., but there is nothing in this setup which needs that.

So we end up with:

interface FastEthernet1/0
 no ip address
 duplex auto
 speed auto
 ipv6 address 2001:DB8:a:b::1/64
 ipv6 address 2001:DB8:a:b::/64 anycast
 ipv6 nd other-config-flag
 ipv6 nd router-preference High
 ipv6 dhcp server DNS_ONLY

ipv6 dhcp pool DNS_ONLY
 dns-server 2001:4860:4860::8888
 dns-server 2001:4860:4860::8844

And that should do it!

PS: I changed the DNS servers to Google's public DNS resolvers. Please adjust as necessary.

Sander Steffann
  • 7,572
  • 18
  • 29