最佳答案
DHCPv6客户端Switch从DHCPv6服务器获取IPv6地址,以及网络配置参数:DNS服务器地址、域名后缀、SIP服务器地址和SIP服务器域名。
DHCPv6客户端根据获取到的网络配置参数自动创建DHCPv6选项组1。
图4-1 DHCPv6客户端申请地址及网络参数配置组网图
进行下面的配置前,需要先完成DHCPv6服务器的配置。
# 配置VLAN接口2作为DHCPv6客户端获取IPv6地址及网络参数,配置DHCPv6客户端支持地址快速分配功能,并配置根据获取到的网络配置参数自动创建DHCPv6选项组1。
<Switch> system-view
[Switch] interface vlan-interface 2
[Switch-Vlan-interface2] ipv6 address dhcp-alloc rapid-commit option-group 1
[Switch-Vlan-interface2] quit
# 显示DHCPv6客户端的信息。可以看出DHCPv6客户端已经成功从DHCPv6服务器获取IPv6地址及网络参数。
[Switch] display ipv6 dhcp client
Vlan-interface2:
Type: Stateful client requesting address
State: OPEN
Client DUID: 0003000100e002000000
Preferred server:
Reachable via address: FE80::2E0:1FF:FE00:18
Server DUID: 0003000100e001000000
IA_NA: IAID 0x00000642, T1 50 sec, T2 80 sec
Address: 1:1::2/128
Preferred lifetime 100 sec, valid lifetime 200 sec
Will expire on Mar 27 2014 at 08:06:57 (198 seconds left)
DNS server addresses:
2000::FF
Domain name:
***.***
SIP server addresses:
2:2::4
SIP server domain names:
***.***
# 在DHCPv6客户端上开启DHCPv6服务器功能后,显示动态创建的DHCPv6选项组1的信息。
[Switch] display ipv6 dhcp option-group 1
DHCPv6 option group: 1
DNS server addresses:
Type: Dynamic (DHCPv6 address allocation)
Interface: Vlan-interface2
2000::FF
Domain name:
Type: Dynamic (DHCPv6 address allocation)
Interface: Vlan-interface2
***.***
SIP server addresses:
Type: Dynamic (DHCPv6 address allocation)
Interface: Vlan-interface2
2:2::4
SIP server domain names:
Type: Dynamic (DHCPv6 address allocation)
Interface: Vlan-interface2
***.***
# 查看获取到的IPv6地址。
[Switch] display ipv6 interface brief
*down: administratively down
(s): spoofing
Interface Physical Protocol IPv6 Address
Vlan-interface2 up up 1:1::2
DHCPv6客户端Switch从DHCPv6服务器获取IPv6前缀,以及网络配置参数:DNS服务器地址、域名后缀、SIP服务器地址和SIP服务器域名等。
DHCPv6客户端Switch根据获取到的前缀自动创建IPv6前缀1,根据获取到的网络配置参数自动创建DHCPv6选项组1。
图4-2 DHCPv6客户端申请前缀及网络参数配置组网图
进行下面的配置前,需要先完成DHCPv6服务器的配置。
# 在客户端连接到DHCPv6服务器的VLAN接口2上配置IPv6地址。
<Switch> system-view
[Switch] interface vlan-interface 2
[Switch-Vlan-interface2] ipv6 address 1::2/48
# 配置VLAN接口2作为DHCPv6客户端获取IPv6前缀及网络参数,配置根据获取到的前缀自动创建IPv6前缀1,根据获取到的网络配置参数自动创建DHCPv6选项组1,并配置DHCPv6客户端支持前缀快速分配功能。
[Switch-Vlan-interface2] ipv6 dhcp client pd 1 rapid-commit option-group 1
[Switch-Vlan-interface2] quit
# 显示DHCPv6客户端的信息。可以看出DHCPv6客户端已经成功从DHCPv6服务器获取IPv6前缀及网络参数。
[Switch] display ipv6 dhcp client
Vlan-interface2:
Type: Stateful client requesting prefix
State: OPEN
Client DUID: 0003000100e002000000
Preferred server:
Reachable via address: FE80::2E0:1FF:FE00:18
Server DUID: 0003000100e001000000
IA_PD: IAID 0x00000642, T1 50 sec, T2 80 sec
Prefix: 12:34::/48
Preferred lifetime 100 sec, valid lifetime 200 sec
Will expire on Feb 4 2014 at 15:37:20(80 seconds left)
DNS server addresses:
2000::FF
Domain name:
***.***
SIP server addresses:
2:2::4
SIP server domain names:
***.***
# 显示动态创建的IPv6前缀1的信息。
[Switch] display ipv6 prefix 1
Number: 1
Type : Dynamic
Prefix: 12:34::/48
Preferred lifetime 100 sec, valid lifetime 200 sec
# 在DHCPv6客户端上开启DHCPv6服务器功能后,显示动态创建的DHCPv6选项组1的信息。
[Switch] display ipv6 dhcp option-group 1
DHCPv6 option group: 1
DNS server addresses:
Type: Dynamic (DHCPv6 prefix allocation)
Interface: Vlan-interface2
2000::FF
Domain name:
Type: Dynamic (DHCPv6 prefix allocation)
Interface: Vlan-interface2
***.***
SIP server addresses:
Type: Dynamic (DHCPv6 prefix allocation)
Interface: Vlan-interface2
2:2::4
SIP server domain names:
Type: Dynamic (DHCPv6 prefix allocation)
Interface: Vlan-interface2
***.***
DHCPv6客户端Switch从DHCPv6服务器同时获取IPv6地址、IPv6前缀,以及网络配置参数:DNS服务器地址、域名后缀、SIP服务器地址和SIP服务器域名等。
DHCPv6客户端Switch根据获取到的前缀自动创建IPv6前缀1,根据获取到的网络配置参数自动创建DHCPv6选项组1。
图4-3 DHCPv6客户端同时申请地址、前缀及网络参数配置组网图
进行下面的配置前,需要先完成DHCPv6服务器的配置。
# 在客户端连接到DHCPv6服务器的VLAN接口2上配置IPv6地址。
<Switch> system-view
[Switch] interface vlan-interface 2
[Switch-Vlan-interface2] ipv6 address 1::2/48
# 配置VLAN接口2作为DHCPv6客户端获取IPv6前缀及网络参数,配置根据获取到的前缀自动创建IPv6前缀1,根据获取到的网络配置参数自动创建DHCPv6选项组1,并配置DHCPv6客户端支持前缀快速分配功能。
[Switch-Vlan-interface2] ipv6 dhcp client stateful prefix 1 rapid-commit option-group 1
[Switch-Vlan-interface2] quit
# 显示DHCPv6客户端的信息。可以看出DHCPv6客户端已经成功从DHCPv6服务器获取IPv6前缀及网络参数。
[Switch] display ipv6 dhcp client
Vlan-interface2:
Type: Stateful client requesting address and prefix
State: OPEN
Client DUID: 0003000100e002000000
Preferred server:
Reachable via address: FE80::2E0:1FF:FE00:18
Server DUID: 0003000100e001000000
IA_NA: IAID 0x00000642, T1 50 sec, T2 80 sec
Address: 1:1::2/128
Preferred lifetime 100 sec, valid lifetime 200 sec
Will expire on Mar 27 2014 at 08:02:00 (199 seconds left)
IA_PD: IAID 0x00000642, T1 50 sec, T2 80 sec
Prefix: 12:34::/48
Preferred lifetime 100 sec, valid lifetime 200 sec
Will expire on Mar 27 2014 at 08:02:00 (199 seconds left)
DNS server addresses:
2000::FF
Domain name:
***.***
SIP server addresses:
2:2::4
SIP server domain names:
***.***
# 查看获取到的IPv6地址。
[Switch] display ipv6 interface brief
*down: administratively down
(s): spoofing
Interface Physical Protocol IPv6 Address
Vlan-interface2 up up 1:1::2
# 显示动态创建的IPv6前缀1的信息。
[Switch] display ipv6 prefix 1
Number: 1
Type : Dynamic
Prefix: 12:34::/48
Preferred lifetime 100 sec, valid lifetime 200 sec
# 在DHCPv6客户端上开启DHCPv6服务器功能后,显示动态创建的DHCPv6选项组1的信息。
[Switch] display ipv6 dhcp option-group 1
DNS server addresses:
Type: Dynamic (DHCPv6 address and prefix allocation)
Interface: Vlan-interface2
2000::FF
Domain name:
Type: Dynamic (DHCPv6 address and prefix allocation)
Interface: Vlan-interface2
***.***
SIP server addresses:
Type: Dynamic (DHCPv6 address and prefix allocation)
Interface: Vlan-interface2
2:2::4
SIP server domain names:
Type: Dynamic (DHCPv6 address and prefix allocation)
Interface: Vlan-interface2
***.***
以上三条display命令可以看到客户端获取到的地址信息、前缀信息和网络参数。
· DHCPv6客户端Switch A通过DHCPv6无状态配置获取域名服务器、域名等信息;
· Switch B作为网关,周期性发布RA消息。
图4-4 DHCPv6无状态配置组网图
进行下面的配置前,需要先完成DHCPv6服务器的配置。
(1) 配置网关Switch B
# 配置VLAN接口2的IPv6地址。
<SwitchB> system-view
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] ipv6 address 1::1 64
# 配置RA消息中O标志位为1。
[SwitchB-Vlan-interface2] ipv6 nd autoconfig other-flag
# 配置允许发送RA消息。
[SwitchB-Vlan-interface2] undo ipv6 nd ra halt
(2) 配置DHCPv6客户端Switch A
# 在VLAN接口2上使能IPv6地址无状态自动配置功能。
<SwitchA> system-view
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ipv6 address auto
执行此命令后,如果VLAN接口2下未配置地址,Switch A会自动生成链路本地地址,并主动发送RS(Router Solicitation,路由器请求)报文,请求网关Switch B立即回应RA报文。
如果收到的RA报文中M标志位为0、O标志位为1,Switch A就会启动DHCPv6客户端无状态配置。
# 可以通过display ipv6 dhcp client命令查看当前客户端的配置信息,如果从服务器成功获取了配置,将会有类似的显示信息。
[SwitchA-Vlan-interface2] display ipv6 dhcp client interface vlan-interface 2
Vlan-interface2:
Type: Stateless client
State: OPEN
Client DUID: 00030001000fe2ff0000
Preferred server:
Reachable via address: FE80::213:7FFF:FEF6:C818
Server DUID: 0003000100137ff6c818
DNS server addresses:
1:2:4::5
1:2:4::7
Domain name:
***.***
# 可以通过display ipv6 dhcp client statistics命令查看当前客户端的统计信息。
[SwitchA-Vlan-interface2] display ipv6 dhcp client statistics
Interface : Vlan-interface2
Packets received : 1
Reply : 1
Advertise : 0
Reconfigure : 0
Invalid : 0
Packets sent : 5
Solicit : 0
Request : 0
Renew : 0
Rebind : 0
Information-request : 5
Release : 0
Decline : 0
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论