Categories R&S

IPv6 – Basic configuration –address assignment SLAAC/DHCPv6

Following my previous post, we need to finish the basic configuration of our network.

 

Here is again our network diagram with the IPv6 addresses.

IPv6 – Basic configuration –address assignment SLAAC/DHCPv6

Site 1 configuration:

 

Here is the config for the interco between R1 and SW1.

R1(config)#int Ethernet0/2
R1(config-if)#ipv6 add 2001:db8:10:2::/124
%Ethernet0/2: Warning: 2001:DB8:10:2::/124 is a Subnet Router Anycast

SW1(config-if)#ipv6 add 2001:db8:10::0/124
%Ethernet0/0: Warning: 2001:DB8:10::/124 is a Subnet Router Anycast

 

One thing that you have to be careful with is that if you configure 2 IPv6 addresses under an interface, the second doesn’t replace the first one like in IPv4, it add another IPv6 under the interface.

R1(config-if)#ipv6 add 2001:db8:99:1::1/124
R1(config-if)#ipv6 add 2001:db8:99:1::2/124

R1#sh ipv6 int brie
Ethernet1/3            [up/up]
    FE80::A8BB:CCFF:FE00:331
    2001:DB8:99:1::1
    2001:DB8:99:1::2

 

Let’s move on and configure the vlan interfaces on SW1.

SW1(config)#int vlan 10
SW1(config-if)#ipv6 add 2001:db8:10:10::1/64

SW1(config-if)#int vlan 11
SW1(config-if)#ipv6 add 2001:db8:10:10::1/64

SW1(config-if)#int vlan 12
SW1(config-if)#ipv6 add 2001:db8:10:11::1/64

That was easy, interface vlan are currently down so we will now activate the host.

Vlan10                 [down/down]
    FE80::A8BB:CCFF:FE80:600
    2001:DB8:10:10::1
Vlan11                 [down/down]
    FE80::A8BB:CCFF:FE80:600
    2001:DB8:10:11::1
Vlan12                 [down/down]
    FE80::A8BB:CCFF:FE80:600
    2001:DB8:10:12::1

 

End host ip address assignment – SLAAC:

I’m using routers as end host.

I will configure the router’s interface in order for them to get an IPv6 address using SLAAC.

SLAAC (Stateless Address AutoConfiguration) : Clients self-address with no ready centralized tracking or management.

Here is the config used on the router interface for SLAAC.

PC12(config-if)#int Ethernet0/0
PC12(config-if)#ipv6 enable
PC12(config-if)#ipv6 address autoconfig

And we get an IP address in the correct range !

I can also ping vlan 10 interface.

PC12#sh ipv6 int brie
Ethernet0/0            [up/up]
    FE80::A8BB:CCFF:FE00:800
    2001:DB8:10:10:A8BB:CCFF:FE00:800

PC12#ping ipv6 2001:DB8:10:10::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:DB8:10:10::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/8/24 ms

 

End host ip address assignment – Stateful DHCPv6:

For Stateful DHCPv6 we need to configure a DHCP server on SW1. We will use it to assign address on host in vlan 11.

SW1(config)#ipv6 dhcp pool USER-VLAN11
SW1(config-dhcpv6)#address prefix 2001:db8:10:11::/64 lifetime infinite infinite
SW1(config-dhcpv6)#dns-server 2001:4860:4860::8888  (That's google ipv6 public DNS)

Note that there is no option for default-router as in IPv4 DHCP.

SW1(config-dhcpv6)#?
IPv6 DHCP configuration commands:
  address            IPv6 address allocation
  default            Set a command to its defaults
  dns-server         DNS servers
  domain-name        Domain name to complete unqualified host names
  exit               Exit from DHCPv6 configuration mode
  import             Import options
  information        Information refresh option
  link-address       Link-address to match
  nis                NIS server options
  nisp               NISP server options
  no                 Negate a command or set its defaults
  prefix-delegation  IPv6 prefix delegation
  sip                SIP server options
  sntp               SNTP server options
  vendor-specific    Configure Vendor-specific option

 

Now we will setup our end host to get an IP address from DHCP.

I enable IPv6 and choose the dhcp option.

PC14(config)#int eth 0/0
PC14(config-if)#ipv6 enabl
PC14(config-if)#ipv6 add dhcp

But as per the log and debugs on, no address is assign:

*Jul 31 19:25:43.203: IPv6 DHCP: Sending SOLICIT to FF02::1:2 on Ethernet0/0
*Jul 31 19:25:43.203: IPv6-Fwd: Sending on Ethernet0/0
*Jul 31 19:26:15.051: IPv6-Sas: SAS on intf Ethernet0/0 picked source FE80::A8BB:CCFF:FE00:A00 for FF02::1:2
*Jul 31 19:26:15.051: IPv6 DHCP: Sending SOLICIT to FF02::1:2 on Ethernet0/0
*Jul 31 19:26:15.051: IPv6-Fwd: Sending on Ethernet0/0

The host is sending solicit message but gets nothing.

That’s because we also need to add a new command under the interface vlan 11 on SW1.

We need to specify the DHCP pool.

SW1(config)#int vlan 11
SW1(config-if)#ipv6 dhcp server USER-VLAN11

And now we get our address.

*Jul 31 19:31:05.363: IPv6 DHCP: Sending SOLICIT to FF02::1:2 on Ethernet0/0
*Jul 31 19:31:05.363: IPv6-Fwd: Sending on Ethernet0/0
*Jul 31 19:31:19.925: IPV6: source FE80::A8BB:CCFF:FE80:600 (Ethernet0/0)
*Jul 31 19:31:19.925:       dest FF02::1:FF00:A00
*Jul 31 19:31:19.925:       traffic class 224, flow 0x0, len 72+14, prot 58, hops 255, forward to ulp
*Jul 31 19:31:19.926: IPV6: source FE80::A8BB:CCFF:FE00:A00 (local)
*Jul 31 19:31:19.926:       dest FE80::A8BB:CCFF:FE80:600 (Ethernet0/0)
*Jul 31 19:31:19.926:       traffic class 224, flow 0x0, len 72+0, prot 58, hops 255, originating
*Jul 31 19:31:19.927: IPv6-Fwd: Created tmp mtu cache entry for FE80::A8BB:CCFF:FE00:A00 FE80::A8BB:CCFF:FE80:600 00000000
*Jul 31 19:31:19.927: IPv6-Fwd: Sending on Ethernet0/0
*Jul 31 19:31:19.929: IPv6 DHCP: Received ADVERTISE from FE80::A8BB:CCFF:FE80:600 on Ethernet0/0
*Jul 31 19:31:19.929: IPv6 DHCP: Adding server FE80::A8BB:CCFF:FE80:600
*Jul 31 19:31:19.929: IPv6 DHCP: Sending REQUEST to FF02::1:2 on Ethernet0/0
*Jul 31 19:31:19.929: IPv6 DHCP: DHCPv6 address changes state from SOLICIT to REQUEST (ADDR_ADVERTISE_RECEIVED) on Ethernet0/0
*Jul 31 19:31:19.933: IPv6 DHCP: Received REPLY from FE80::A8BB:CCFF:FE80:600 on Ethernet0/0
*Jul 31 19:31:19.933: IPv6 DHCP: Processing options
*Jul 31 19:31:19.933: IPv6 DHCP: Adding address 2001:DB8:10:11:3965:F165:3DDB:9226/128 to Ethernet0/0
*Jul 31 19:31:19.934: IPv6 DHCP: T1 set to expire in 43200 seconds
*Jul 31 19:31:19.934: IPv6 DHCP: T2 set to expire in 69120 seconds
*Jul 31 19:31:19.934: IPv6 DHCP: Configuring DNS server 2001:4860:4860::8888
*Jul 31 19:31:19.934: IPv6 DHCP: DHCPv6 address changes state from REQUEST to OPEN (ADDR_REPLY_RECEIVED) on Ethernet0/0

PC14#sh ipv6 int brie
Ethernet0/0            [up/up]
    FE80::A8BB:CCFF:FE00:A00
    2001:DB8:10:11:3965:F165:3DDB:9226

 

End host ip address assignment – stateless DHCPv6:

Last is stateless assignment, it’s a combination of SLAAC and statefull DHCPv6.

Address assignment comes from SLAAC and DNS and other option from DHCP.

 

We will use that for end host in vlan 12.

On SW1, we create a new DHCPv6 pool and we configure the interface vlan 12.

SW1(config)#ipv6 dhcp pool USER-VLAN12
SW1(config-dhcpv6)#dns-server 2001:4860:4860::8888
SW1(config-dhcpv6)#domain-name allinrouting.com

SW1(config)#int vlan 12
SW1(config-if)#ipv6 dhcp server USER-VLAN12

See that no IPv6 prefix is configure in the DHCP pool.

Next we configure our end host and turn on debugging.

I get my IP address but from the debug I do not see that the DNS was received.

*Jul 31 19:51:33.823: [IPv6 Input]IPV6ADDR: intfid_algo '3' is not active on intf 3: unknown
*Jul 31 19:51:33.823: [IPv6 Input]IPV6ADDR: intfid_algo '2' is active on intf 3: eui64
*Jul 31 19:51:33.823: [IPv6 Input]IPV6ADDR: Generating IntfID for 'eui64', prefix 2001:DB8:10:12::/64, address 2001:DB8:10:12:A8BB:CCFF:FE00:700: rc 0
*Jul 31 19:51:33.823: [IPv6 Input]IPV6ADDR: Preferring 2001:DB8:10:12:A8BB:CCFF:FE00:700 from Ethernet0/0
*Jul 31 19:51:33.824: [IPv6 Input]IPV6ADDR: Adding operating owner address configured on Ethernet0/0
*Jul 31 19:51:33.824: [IPv6 Input]IPV6ADDR: Notification: Address 2001:DB8:10:12:A8BB:CCFF:FE00:700 added to Ethernet0/0
*Jul 31 19:51:33.824: [IPv6 Input]IPV6ADDR: Ethernet0/0 - Join Mcast group: New refcnt for FF02::1:FF00:700 is 2
*Jul 31 19:51:34.829: [IPv6 ND]IPV6ADDR: Notification: Address 2001:DB8:10:12:A8BB:CCFF:FE00:700/64 is up on Ethernet0/0

PC11#sh ipv6 int brie
Ethernet0/0            [up/up]
    FE80::A8BB:CCFF:FE00:700
    2001:DB8:10:12:A8BB:CCFF:FE00:700

Again, another command needs to be added under the interface vlan 12 of SW1.

This is use to obtain autoconfiguration information other than addresses. If the flag is set, the attached hosts should use stateful autoconfiguration to obtain the other (nonaddress) information.

SW1(config)#int vlan 12
SW1(config-if)#ipv6 nd other-config-flag

And with this command we get DHCP option.

*Jul 31 19:56:04.091: IPv6 DHCP: Received REPLY from FE80::A8BB:CCFF:FE80:600 on Ethernet0/0
*Jul 31 19:56:04.091: IPv6 DHCP: detailed packet contents
*Jul 31 19:56:04.091:   src FE80::A8BB:CCFF:FE80:600 (Ethernet0/0)
*Jul 31 19:56:04.091:   dst FE80::A8BB:CCFF:FE00:700 (Ethernet0/0)
*Jul 31 19:56:04.091:   type REPLY(7), xid 16576445
*Jul 31 19:56:04.091:   option SERVERID(2), len 10
*Jul 31 19:56:04.091:     00030001AABBCC000600
*Jul 31 19:56:04.091:   option CLIENTID(1), len 10
*Jul 31 19:56:04.091:     00030001AABBCC000700
*Jul 31 19:56:04.091:   option DNS-SERVERS(23), len 16
*Jul 31 19:56:04.091:     2001:4860:4860::8888
*Jul 31 19:56:04.091:   option DOMAIN-LIST(24), len 18
*Jul 31 19:56:04.091:     allinrouting.com
*Jul 31 19:56:04.092: IPv6 DHCP: Adding server FE80::A8BB:CCFF:FE80:600
PC11#
*Jul 31 19:56:04.092: IPv6 DHCP: Processing options
*Jul 31 19:56:04.092: IPv6 DHCP: Configuring DNS server 2001:4860:4860::8888
*Jul 31 19:56:04.092: IPv6 DHCP: Configuring domain name allinrouting.com
*Jul 31 19:56:04.092: IPv6 DHCP: DHCPv6 changes state from INFORMATION-REQUEST to IDLE (REPLY_RECEIVED) on Ethernet0/0

And DNS works.

PC11#sSH LOG
Translating "LOG"...domain server (2001:4860:4860::8888)
*Jul 31 19:58:32.941: IPv6-Sas: SAS picked source 2001:DB8:10:12:A8BB:CCFF:FE00:700 for 2001:4860:4860::8888
*Jul 31 19:58:32.941: IPv6-Fwd: No route to destination 2001:4860:4860::8888 (tableid=0)

On SW1, the DHCP pool reports 0 client. That makes sense because no IPv6 addresses are in lease.

DHCPv6 pool: USER-VLAN12
  DNS server: 2001:4860:4860::8888
  Domain name: allinrouting.com
  Active clients: 0

 

I will assign addresses to end host from site 2 and 3 the same way.

 

In the next post we will try to make all those stuff communicating together using dynamic routing protocols.

Thank you for reading.

 

 

IPv6 – Basic configuration –address assignment SLAAC/DHCPv6

IPv6 – Basic configuration –address assignment SLAAC/DHCPv6

 

Leave a Reply

Your email address will not be published.