ipv6 address autoconfig

To enable IPv6 stateless autoconfiguration, use the interface GigabitEthernet 0 command in Configuration mode. This command does not have a no form.

IPv6 address autoconfiguration is enabled by default in Linux. Cisco ADE 2.0 shows the IPv6 address autoconfiguration in the running configuration for any interface that is enabled.

interface GigabitEthernet 0

Syntax Description

interface

The command to configure an interface.

GigabitEthernet

Configures the Gigabit Ethernet interface.

<0 - 3>

Number of the Gigabit Ethernet port to configure.

Defaults

No default behavior or values.

Command Modes

Configuration

Usage Guidelines

IPv6 stateless autoconfiguration has the security downfall of having predictable IP addresses. This downfall is resolved with privacy extensions. You can verify that the privacy extensions feature is enabled using the show command.

Example 1

/admin# configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

/admin(config)# interface GigabitEthernet 0

/admin(config)# (config-GigabitEthernet)# ipv6 address autoconfig

/admin(config)# (config-GigabitEthernet)# end

/admin#

 

When IPv6 autoconfiguration is enabled, the running configuration shows the interface settings similar to the following:

!

interface GigabitEthernet 0

ip address 172.23.90.116 255.255.255.0

ipv6 address autoconfig

!

You can use the show interface GigabitEthernet 0 command to display the interface settings. In example 2, you can see that the interface has three IPv6 addresses. The first address (starting with 3ffe) is obtained using the stateless autoconfiguration. For the stateless autoconfiguration to work, you must have IPv6 route advertisement enabled on that subnet. The next address (starting with fe80) is a link-local address that does not have any scope outside the host. You will always see a link local address regardless of the IPv6 autoconfiguration or DHCPv6 configuration. The last address (starting with 2001) is obtained from a IPv6 DHCP server.

Example 2

/admin# show interface GigabitEthernet 0

eth0 Link encap:Ethernet HWaddr 00:0C:29:AF:DA:05

inet addr:172.23.90.116 Bcast:172.23.90.255 Mask:255.255.255.0

inet6 addr: 3ffe:302:11:2:20c:29ff:feaf:da05/64 Scope:Global

inet6 addr: fe80::20c:29ff:feaf:da05/64 Scope:Link

inet6 addr: 2001:558:ff10:870:8000:29ff:fe36:200/64 Scope:Global

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:77848 errors:0 dropped:0 overruns:0 frame:0

TX packets:23131 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:10699801 (10.2 MiB) TX bytes:3448374 (3.2 MiB)

Interrupt:59 Base address:0x2000

 

/admin#

The following RFC provides the IPv6 stateless autoconfiguration privacy extensions:

http://www.ietf.org/rfc/rfc3041.txt

To verify that the privacy extensions feature is enabled, you can use the show interface GigabitEthernet 0 command. You can see two autoconfiguration addresses: one address is without the privacy extensions, and the other is with the privacy extensions.

In the example 3 below, the MAC is 3ffe:302:11:2:20c:29ff:feaf:da05/64 and the non-RFC3041 address contains the MAC, and the privacy-extension address is 302:11:2:9d65:e608:59a9:d4b9/64.

The output appears similar to the following:

Example 3

/admin# show interface GigabitEthernet 0

eth0 Link encap:Ethernet HWaddr 00:0C:29:AF:DA:05

inet addr:172.23.90.116 Bcast:172.23.90.255 Mask:255.255.255.0

inet6 addr: 3ffe:302:11:2:9d65:e608:59a9:d4b9/64 Scope:Global

inet6 addr: 3ffe:302:11:2:20c:29ff:feaf:da05/64 Scope:Global

inet6 addr: fe80::20c:29ff:feaf:da05/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:60606 errors:0 dropped:0 overruns:0 frame:0

TX packets:2771 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:9430102 (8.9 MiB) TX bytes:466204 (455.2 KiB)

Interrupt:59 Base address:0x2000

 

/admin#

Related Commands

Command

Description

show interface

Displays information about the system interfaces.

ip address (interface configuration mode)

Sets the IP address and netmask for the interface.

shutdown (interface configuration mode)

Shuts down the interface (see “shutdown”).

ipv6 address dhcp

Enables IPv6 address DHCP on an interface.

show running-config

Displays the contents of the currently running configuration file or the configuration.