Example for Configuring Basic IPv6 Functions
Networking Requirements
As shown in Figure 8-16, RouterA and RouterB are connected using GE1/0/0. RouterA and RouterB need to establish a neighbor relationship, and RouterB can obtain an IPv6 address using the neighbor discovery function.
Configuration Roadmap
The configuration roadmap is as follows:
Enable the IPv6 forwarding function on RouterA and configure an IPv6 address for RouterA so that RouterA can forward IPv6 packets.
Configure RouterA to send RA packets and allow GE1/0/0 of RouterB to automatically configure an IPv6 address based on the route prefix carried in the received RA packets.
Procedure
- Configure RouterA.
# Configure an IPv6 address for GE1/0/0 of RouterA.
<Huawei> system-view
[Huawei] sysname RouterA
[RouterA] ipv6
[RouterA] interface gigabitethernet 1/0/0
[RouterA-GigabitEthernet1/0/0] ipv6 enable
[RouterA-GigabitEthernet1/0/0] ipv6 address fc01::1/64
[RouterA-GigabitEthernet1/0/0] quit
# Configure the neighbor discovery function on RouterA.
[RouterA] interface gigabitethernet 1/0/0
[RouterA-GigabitEthernet1/0/0] undo ipv6 nd ra halt
[RouterA-GigabitEthernet1/0/0] quit
[RouterA] quit
- # Configure RouterB.
# Configure GE1/0/0 of RouterB to automatically generate an IPv6 address through stateless autoconfiguration.
<Huawei> system-view
[Huawei] sysname RouterB
[RouterB] ipv6
[RouterB] interface gigabitethernet 1/0/0
[RouterB-GigabitEthernet1/0/0] ipv6 enable
[RouterB-GigabitEthernet1/0/0] ipv6 address auto link-local
[RouterB-GigabitEthernet1/0/0] ipv6 address auto global local-identifier
[RouterB-GigabitEthernet1/0/0] quit
[RouterB] quit
- Verify the configuration.
If the preceding configurations are successful, you can view the configured global unicast addresses. The interface status and the IPv6 protocol are Up. You can also check the neighbor of the interfaces.
# Check interface information on RouterA.
<RouterA> display ipv6 interface gigabitethernet 1/0/0
GigabitEthernet1/0/0 current state : UP IPv6 protocol current state : UP IPv6 is enabled, link-local address is FE80::A19:A6FF:FECD:A897 Global unicast address(es): FC01::1, subnet is FC01::/64 Joined group address(es): FF02::1:2 FF02::1:FF00:1 FF02::2 FF02::1 FF02::1:FFCD:A897 MTU is 1500 bytes ND DAD is enabled, number of DAD attempts: 1 ND reachable time is 30000 milliseconds ND retransmit interval is 1000 milliseconds ND advertised reachable time is 0 milliseconds ND advertised retransmit interval is 0 milliseconds ND router advertisement max interval 600 seconds, min interval 200 seconds ND router advertisements live for 1800 seconds ND router advertisements hop-limit 64 ND default router preference medium Hosts use stateless autoconfig for addresses
# Check interface information on RouterB.
<RouterB> display ipv6 interface gigabitethernet 1/0/0
GigabitEthernet1/0/0 current state : UP
IPv6 protocol current state : UP
IPv6 is enabled, link-local address is FE80::2D6F:0:7AF3:1
Global unicast address(es):
fc01::15B:E0EA:3524:E791
subnet is fc01::/64 [SLAAC 2012-07-19 17:30:55 2592000S]
Joined group address(es):
FF02::1:FF00:2
FF02::1:FFF3:1
FF02::2
FF02::1
MTU is 1500 bytes
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds
ND retransmit interval is 1000 milliseconds
# Check neighbor information on GE1/0/0 of RouterA.
<RouterA> display ipv6 neighbors gigabitethernet 1/0/0
---------------------------------------------------------
IPv6 Address : fc01::15B:E0EA:3524:E791
Link-layer : 00e0-fc89-fe6e State : STALE
Interface : GigabitEthernet1/0/0 Age : 7
VLAN : - CEVLAN: -
VPN name : Is Router : TRUE
Secure FLAG : UN-SECURE
---------------------------------------------------------
Total: 1 Dynamic: 1 Static: 0
Configuration File
RouterA configuration file
# sysname RouterA # ipv6 # interface GigabitEthernet1/0/0 ipv6 enable ipv6 address fc01::1/64 undo ipv6 nd ra halt # return
RouterB configuration file
# sysname RouterB # ipv6 # interface GigabitEthernet1/0/0 ipv6 enable ipv6 address auto link-local ipv6 address auto global local-identifier # return