文章介绍:本篇主要介绍在华为交换机中怎么配置DHCPv6无状态下发IPv6地址,主要应用场景是,企业需要使用ipv6进行业务测试,比如谷歌兼容性测试套件CTS,对IPv6网络要求就比较严格,经过调试测试,总结出这篇指导性文章,仅供参考。
一、网络拓扑
二、拓扑说明
- 华为AR路由器作为出口网关对接运营商,配置nat等基础网络配置;
- 华为核心交换机作为用户的网关,配置dhcpv4和dhcpv6,策略路由等基础网络配置;
- 华为无线控制器AC管理无线AP,配置多SSID,提供用户无线接入;
- 加速路由器Router,旁挂核心交换机,路由ipv6地址给华为核心交换机,同时配合华为核心交换机配置的策略路由实现ipv4海外加速需求。
三、华为核心交换机配置
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
ipv6
#
vlan batch 30 40 200 1000
#
dhcp enable
#
acl number 3000
rule 1000 permit ip source 172.16.30.0 0.0.0.255
rule 1001 permit ip source 172.16.40.0 0.0.3.255
#
traffic classifier acl3000 operator or
if-match acl 3000
#
traffic behavior to-router
permit
redirect ip-nexthop 172.16.200.254 track-nqa icmp router
#
traffic policy to-router atomic
classifier acl3000 behavior to-router
#
ip pool vlan30
gateway-list 172.16.30.254
network 172.16.30.0 mask 255.255.255.0
dns-list 223.5.5.5 223.6.6.6
#
ip pool vlan40
gateway-list 172.16.40.254
network 172.16.40.0 mask 255.255.252.0
dns-list 223.5.5.5 223.6.6.6
#
dhcpv6 pool 40fastipv6
address prefix 2059:470:11E:26::/64
excluded-address 2059:470:11E:26::1
dns-server 2001:4860:4860::8888
#
interface Vlanif30
description youxian
ip address 172.16.30.254 255.255.255.0
dhcp select global
#
interface Vlanif40
description wuxain
ipv6 enable
ip address 172.16.40.254 255.255.252.0
ipv6 address 2059:470:11E:26::1/64
undo ipv6 nd ra halt
ipv6 nd autoconfig managed-address-flag
ipv6 nd autoconfig other-flag
dhcp select global
dhcpv6 server 40fastipv6
#
interface Vlanif200
description hulian
ip address 172.16.200.1 255.255.255.0
#
interface Vlanif1000
ipv6 enable
ipv6 address FC00::8000:0:0:2/126
#
interface GigabitEthernet0/0/1
description to-PC
port link-type access
port default vlan 30
stp edged-port enable
traffic-policy to-router inbound
#
interface GigabitEthernet0/0/22
description to-Router
port link-type trunk
port trunk allow-pass vlan 200 1000
#
interface GigabitEthernet0/0/23
description To-AC
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 40
#
interface GigabitEthernet0/0/24
description To-AR
port link-type trunk
port trunk allow-pass vlan 30 40 200 1000
#
ip route-static 0.0.0.0 0.0.0.0 172.16.200.2
#
ipv6 route-static :: 0 Vlanif1000 FC00::8000:0:0:1
#
nqa test-instance icmp router
test-type icmp
destination-address ipv4 172.16.200.254
source-address ipv4 172.16.200.1
frequency 20
probe-count 2
start now
四、Router加速路由器配置
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
set interfaces ethernet eth0 vif 200 address '172.16.200.254/24'
set interfaces ethernet eth0 vif 1000 address 'fc00:0:0:0:8000::1/126'
set interfaces ethernet eth0 vif 1000 ipv6 dup-addr-detect-transmits 1
set interfaces tunnel tun1 address '2059:dc2:2a00:fdff::106/126'
set interfaces tunnel tun1 encapsulation 'sit'
set interfaces tunnel tun1 multicast 'disable'
set interfaces tunnel tun1 parameters
set interfaces tunnel tun1 remote '12.12.12.12'
set interfaces tunnel tun1 source-address '3.3.3.3'
set protocols static route6 2059:470:11e:26::/64 next-hop fc00::8000:0:0:2
set protocols static route6 ::0/0 next-hop 2059:dc2:2a00:fdff::105
五、华为POE交换机配置
- 01
ipv6
六、华为AC无线控制器配置
- 01
- 02
wlan
sta-ipv6-service enable
七、失败截图



八、成功截图

九、ipv6测试网站
十、谷歌兼容性测试套件
兼容性测试套件下载
来源:网络来源