Automatically Breeding IPv6 Addresses for an Interface
Problem
You appetite to accredit IPv6 and accomplish addresses automatically.
Solution
There are two methods for breeding IPv6 addresses automatically. The aboriginal uses the autoconfig command:
Router1#configure terminal
Enter agreement commands, one per line. End with CNTL/Z.
Router1(config)#ipv6 unicast-routing
Router1(config)#interface FastEthernet0/0
Router1(config-if)#ipv6 abode autoconfig
Router1(config-if)#end
Router1#
The additional adjustment uses the EUI-64 adjustment to automatically accomplish alone the host allotment of the IPv6 address, accumulated with a authentic arrangement portion:
Router1#configure terminal
Enter agreement commands, one per line. End with CNTL/Z.
Router1(config)#ipv6 unicast-routing
Router1(config)#interface FastEthernet0/0
Router1(config-if)#ipv6 abode AAAA::/64 eui-64
Router1(config-if)#end
Router1#
Discussion
Throughout this affiliate you will see the afterward command frequently:
Router1(config)#ipv6 unicast-routing
By default, the router will not avenue IPv6 packets. You can configure interfaces with IPv6 addresses, and you can alike use IPv6 applications such as PING and TELNET to acquaint to and from these routers. And, somewhat confusingly, you can configure changeless IPv6 routes to acquiesce the routers to do simple IPv6 networking. But afterwards this command, you cannot accredit any IPv6 acquisition protocols. So, alike admitting we are not application any acquisition protocols in this recipe, we accept enabled the ipv6 unicast-routing command because it is a acceptable convenance and will advice to abstain abashing afterwards on back you do appetite to run acquisition protocols.
The aboriginal adjustment declared in this compound uses the autoconfig command. This does two things. First, it automatically generates a Link-Local abode for use on the bounded arrangement segment. As we discussed in the Introduction to this chapter, Link-Local addresses are accurate IPv6 addresses that can be acclimated to acquaint with added accessories on the segment, but that do not "leak" off of it. So it is not attainable to avenue packets to these addresses.
So why would you appetite to configure a link-local abode on a router? Well, the abbreviate acknowledgment is that RFC 4291 says that every interface charge accept one. The account is that you don't charge a globally scoped abode for any bearings area the interface in catechism is neither the antecedent nor the destination for a packet.
For example, accept you accept two routers affiliated by an Ethernet segment. If the aboriginal router recives a packet that it wants via the additional router, the abutting hop abode in its acquisition table doesn't charge to be attainable off the segment. And there are abounding situations like this back the link-local abode can be used, either because the packets are exchanged absolutely amid neighbors or because the abode doesn't arise in the packet attack but is alone acclimated for acquisition decisions:
Router1#show ipv6 interface FastEthernet0/0
FastEthernet0/0 is up, band agreement is up
IPv6 is enabled, link-local abode is FE80::20E:D7FF:FED6:4D80
No all-around unicast abode is configured
Joined accumulation address(es):
FF02::1
FF02::1:FFD6:4D80
MTU is 1500 bytes
ICMP absurdity letters bound to one every 100 milliseconds
ICMP redirects are enabled
ND DAD is enabled, cardinal of DAD attempts: 1
ND attainable time is 30000 milliseconds
Router1#
The abode that the router generates this way uses the accepted link-local prefix FE80::/10 and the EUI-64 adaptation of the MAC abode for the aftermost 64 bits. We will altercate the EUI-64 encoding in a moment.
The additional affair that this command does is analysis for any accessible IPv6 DHCP servers. If DHCP is accessible on the bounded arrangement segment, again the router will automatically attack to use this agreement to access a added accepted IPv6 address. If a DHCP server is available, the router will automatically ascertain and download an adapted configuration. For added advice on DHCP for IPv6, amuse accredit to Compound 25.3.
The added adjustment apparent in the Solution area of this compound uses the EUI-64 keyword:
Router1(config)#interface FastEthernet0/0
Router1(config-if)#ipv6 abode AAAA::/64 eui-64
In this case, the router will automatically use the MAC abode of the interface to accomplish the host allocation of the IPv6 address. In this case, the arrangement allocation of the abode is AAAA::/64. Then, if we attending at the interface with the appearance ipv6 interface command, we can see what the absolute abode is:
Router1#show ipv6 interface FastEthernet0/0
FastEthernet0/0 is up, band agreement is up
IPv6 is enabled, link-local abode is FE80::20E:D7FF:FED6:4D80
All-around unicast address(es):
AAAA::20E:D7FF:FED6:4D80, subnet is AAAA::/64
Joined accumulation address(es):
FF02::1
FF02::1:FFD6:4D80
MTU is 1500 bytes
ICMP absurdity letters bound to one every 100 milliseconds
ICMP redirects are enabled
ND DAD is enabled, cardinal of DAD attempts: 1
ND attainable time is 30000 milliseconds
Router1#
We can use the appearance interface command to see the 48-bit MAC abode for this interface:
Router1#show interface FastEthernet0/0
FastEthernet0/0 is up, band agreement is up
Hardware is AmdFE, abode is 000e.d7d6.4d80 (bia 000e.d7d6.4d80)
Internet abode is 192.168.1.3/24
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
believability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Aftermost ascribe 00:00:00, achievement 00:00:00, achievement adhere never
Aftermost allowance of "show interface" counters never
Ascribe queue: 0/75/0/0 (size/max/drops/flushes); Total achievement drops: 0
Queueing strategy: fifo
Achievement queue: 0/40 (size/max)
5 minute ascribe amount 0 bits/sec, 0 packets/sec
5 minute achievement amount 0 bits/sec, 0 packets/sec
10879 packets input, 839782 bytes
Received 8284 broadcasts, 0 runts, 0 giants, 0 throttles
0 ascribe errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 ascribe packets with distill action detected
12137 packets output, 908637 bytes, 0 underruns
0 achievement errors, 0 collisions, 2 interface resets
0 babbles, 0 backward collision, 0 deferred
0 absent carrier, 0 no carrier
0 achievement absorber failures, 0 achievement buffers swapped out
Router1#
As you can see, the interface is now application the abode AAAA:: 20E:D7FF:FED6:4D80. The 48-bit MAC abode on this interface is 000e.d7d6.4d80. There is a different accord amid the host allocation of the IPv6 abode and this globally different Ethernet MAC address. The EUI-64 encoding is authentic in RFC 4291. For the abounding details, we animate readers to accredit to that document, but we will abridge the arrangement here.
The IEEE 802 accepted 48-bit MAC abode acclimated on Ethernet interfaces has a categorical format. The aboriginal 24 $.25 specify the bell-ringer Organizationally Different Identifier (OUI), which identifies the architect or the equipment. The actual 24 $.25 specify an alone interface. The bell-ringer allocation of the MAC abode has 2 appropriate $.25 in locations 7 and 8. Bit 7 is the "scope" indicator. If this bit is according to zero, again the MAC abode has all-around scope, acceptation that it can be acclimated anywhere. If it is according to one, again it has bounded scope, which usually agency that it has been redefined for bounded purposes. Bit 8 is the "individual/group" bit, which specifies whether this MAC abode is to be acclimated by a distinct accessory or a accumulating of devices.
The aboriginal aphorism for converting 48-bit MAC addresses to IPv6 EUI-64 architecture host addresses is to cast the ambit bit. If it is zero, accomplish it one, and carnality versa. The additional rule, which is aloof appropriate to pad the 48-bit abode to 64 bits, is to admit the hex amount 0xFFFE in amid the bell-ringer and host portions of the MAC address. So, in our case, back the MAC abode is 000e.d7d6.4d80, the additional octet charge change from 0x00 (0000 0000 in binary) to 0x02 (0000 0010 in binary). Then, back we admit the hex amount 0xFFFE, we get 020e.d7ff.fed6.4d80. Adding this as the host allocation of the abode to the prefix that we specified, AAAA::/64, we get AAAA::020E:D7FF:FED6:4D80/64.
The abundant advantage to this adjustment of acclamation is that you can configure absolutely the aforementioned commands on every accessory on a segment, and acquiesce anniversary accessory to ensure that it has a different IPv6 address. In fact, you can accumulate your configurations actual simple by aloof accepting to anguish about the prefixes for anniversary arrangement segment.
The disadvantage to this method, however, is that you will not about apperceive advanced of time what the abounding IPv6 abode for anniversary accessory is, alone that they will be unique. If you use this method, you charge do your almanac befitting afterwards the actuality rather than as allotment of the architecture process. This accomplishing adjustment is absolutely adopted to the accepted models of arrangement architecture for IPv4 networks.
See Also