Automatically Generating IPv6 Addresses for an Interface
Problem
You want to enable IPv6 and generate addresses automatically.
Solution
There are two methods for generating IPv6 addresses automatically. The first uses the autoconfig command:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#ipv6 unicast-routingRouter1(config)#interfaceRouter1(config-if)#FastEthernet0/0ipv6 address autoconfigRouter1(config-if)#endRouter1#
The second method uses the EUI-64 method to automatically generate only the host part of the IPv6 address, combined with a defined network portion:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#ipv6 unicast-routingRouter1(config)#interfaceRouter1(config-if)#FastEthernet0/0ipv6 addressAAAA::/64eui-64Router1(config-if)#endRouter1#
Discussion
Throughout this chapter you will see the following command frequently:
Router1(config)#ipv6 unicast-routingBy default, the router will not route IPv6 packets. You can configure interfaces with IPv6 addresses, and you can even use IPv6 applications such as PING and TELNET to communicate to and from these routers. And, somewhat confusingly, you can configure static IPv6 routes to allow the routers to do simple IPv6 networking. But without this command, you cannot enable any IPv6 routing protocols. So, even though we are not using any routing protocols in this recipe, we have enabled the ipv6 unicast-routing command ...