background image

13 

 

# Set the O flag to 1 in RA advertisements to be sent on VLAN-interface 3. Hosts that receive 
the RA advertisements will obtain configuration information other than IPv6 address through 
DHCPv6. 

[SwitchB-Vlan-interface3] ipv6 nd autoconfig other-flag 

# Configure VLAN-interface 3 to operate in DHCPv6 server mode. 

[SwitchB-Vlan-interface3] ipv6 dhcp select server 

[SwitchB-Vlan-interface3] quit 

# Create IPv6 address pool 1. 

[SwitchB] ipv6 dhcp pool 1 

[SwitchB-dhcp6-pool-1] network 4001::/64 

[SwitchB-dhcp6-pool-1] dns-server 1::1 

[SwitchB-dhcp6-pool-1] quit 

# Configure an IPv6 static route destined for 2001::/64 and the next hop of the route is 3001::1. 

[SwitchB] ipv6 route-static 2001:: 64 3001::1 

# Save the configuration. 

[SwitchB] save force 

3. 

Configure Host A. 

Configure IPv6 on Host A, and then enable Host A to use DHCPv6 for IPv6 address acquisition. 

4. 

Configure Host B. 

Configure IPv6 on Host B, and then enable Host B to use DHCPv6 for IPv6 address acquisition. 

Verifying the configuration 

# View the IPv6 addresses assigned by the DHCPv6 server on Switch A. 

[SwitchA] display ipv6 dhcp server ip-in-use 

Pool: 1 

 IPv6 address                                Type      Lease expiration 

 2001::2                                     Auto(C)   Sep 30 11:45:07 2021 

# View information about the neighbors of GigabitEthernet 1/0/2 on Switch A. 

[SwitchA] display ipv6 neighbors interface gigabitethernet 1/0/2 

Type: S-Static    D-Dynamic    O-Openflow     R-Rule    IS-Invalid static 

IPv6 address              MAC address    VLAN/VSI   Interface     State T  Aging 

2001::2                   b025-0b54-0106 --         GE1/0/2       REACH D  29 

FE80::B225:BFF:FE54:106   b025-0b54-0106 --         GE1/0/2       REACH D  18 

The output shows that Host A has obtained IPv6 global unicast address 2001::2. 

# View the IPv6 addresses assigned by the DHCPv6 server on Switch B. 

[SwitchB] display ipv6 dhcp server ip-in-use 

Pool: 1 

 IPv6 address                                Type      Lease expiration 

 4001::2                                     Auto(C)   Sep 30 14:05:49 2021 

# View information about the neighbors of GigabitEthernet 1/0/2 on Switch B. 

[SwitchB] display ipv6 neighbors interface gigabitethernet 1/0/2 

Type: S-Static    D-Dynamic    O-Openflow     R-Rule    IS-Invalid static 

IPv6 address              MAC address    VLAN/VSI   Interface     State T  Aging 

4001::2                   b043-5415-0406 --         GE1/0/2       REACH D  3 

FE80::B243:54FF:FE15:406  b043-5415-0406 --         GE1/0/2       REACH D  44 

Содержание DHCP

Страница 1: ...oduced or transmitted in any form or by any means without prior written consent of New H3C Technologies Co Ltd Except for the trademarks of New H3C Technologies Co Ltd any trademarks that may be menti...

Страница 2: ...nfiguration 5 Procedure 5 Verifying the configuration 7 Configuration files 7 Related documentation 8 Configuring DHCP snooping 9 Introduction 9 Network configuration 9 Procedure 9 Verifying the confi...

Страница 3: ...The IP addresses of VLAN interface 5 VLAN interface 6 and VLAN interface 7 on the switch are 192 168 5 254 24 192 168 6 254 24 and 192 168 7 254 24 respectively For the hosts in subnet 192 168 5 0 24...

Страница 4: ...cific IP addresses such as DNS server IP addresses from dynamic IP address assignment Switch dhcp server forbidden ip 192 168 5 100 Switch dhcp server forbidden ip 192 168 6 100 Switch dhcp server for...

Страница 5: ...2021 Auto C 662e 3030 3033 2d45 7568 6572 1e The output shows that the DHCP server can assign IP addresses and other network settings to the clients on subnets 192 168 5 0 24 192 168 6 0 24 and 192 16...

Страница 6: ...igabitEthernet1 0 5 port link mode bridge port access vlan 5 interface GigabitEthernet1 0 6 port link mode bridge port access vlan 6 interface GigabitEthernet1 0 7 port link mode bridge port access vl...

Страница 7: ...network to meet the following requirements The DHCP clients run on subnets 192 168 5 0 24 and 192 168 6 0 24 and the DHCP server IP address is 192 168 7 100 24 Switch A acts as the DHCP relay agent f...

Страница 8: ...ddress to VLAN 5 VLAN 6 and VLAN 7 respectively SwitchA interface vlan interface 5 SwitchA Vlan interface5 ip address 192 168 5 1 255 255 255 0 SwitchA Vlan interface5 quit SwitchA interface vlan inte...

Страница 9: ...rt access vlan 5 interface GigabitEthernet1 0 3 port link mode bridge port access vlan 6 Switch A dhcp enable vlan 5 to 7 interface Vlan interface5 ip address 192 168 5 1 255 255 255 0 dhcp select rel...

Страница 10: ...rnet1 0 2 port link mode bridge port access vlan 7 Related documentation DHCP configuration in the Layer 3 IP services configuration guide for the device DHCP commands in the Layer 3 IP services comma...

Страница 11: ...erver The DHCP snooping device records clients IP to MAC bindings by reading DHCP ACK messages received from the trusted port and the DHCPREQUEST messages Figure 3 Network diagram Procedure Enable glo...

Страница 12: ...k the DHCP snooping entry recorded for the client Configuration files dhcp snooping enable interface GigabitEthernet1 0 1 port link mode bridge dhcp snooping trust interface Ten GigabitEthernet1 0 2 p...

Страница 13: ...connectivity Figure 4 Network diagram Procedure 1 Configure Switch A Create VLAN 1 and assign GigabitEthernet 1 0 2 to VLAN 1 SwitchA system view SwitchA vlan 1 SwitchA vlan1 port gigabitethernet 1 0...

Страница 14: ...the next hop of the route is 3001 2 SwitchA ipv6 route static 4001 64 3001 2 Save the configuration SwitchA save force 2 Configure Switch B Create VLAN 2 and assign GigabitEthernet 1 0 1 to VLAN 2 Swi...

Страница 15: ...n View the IPv6 addresses assigned by the DHCPv6 server on Switch A SwitchA display ipv6 dhcp server ip in use Pool 1 IPv6 address Type Lease expiration 2001 2 Auto C Sep 30 11 45 07 2021 View informa...

Страница 16: ...ver apply pool 1 allow hint rapid commit ipv6 address 2001 1 64 ipv6 nd autoconfig managed address flag undo ipv6 nd ra halt interface Vlan interface2 ipv6 address 3001 1 64 interface GigabitEthernet1...

Страница 17: ...a halt interface GigabitEthernet1 0 1 port link mode bridge port access vlan 2 interface GigabitEthernet1 0 2 port link mode bridge port access vlan 3 ipv6 route static 2001 64 3001 1 Related document...

Отзывы: