如何在H3CS5800-32F某一VLAN,如VLAN2中启用分配的一段IPV6地址 如:15ba:db5::/64
请写的详细些,谢谢
设置列表
对齐方式
(0)
最佳答案
· 如图1-8所示,Host、Switch A和Switch B之间通过以太网端口相连,将以太网端口分别加入相应的VLAN里,在VLAN接口上配置IPv6地址,验证它们之间的互通性。
· Switch B有可以到Host的路由。
· 在Host上安装IPv6,根据IPv6邻居发现协议自动配置IPv6地址,有可以到Switch B的路由。
图1-8 IPv6地址配置组网图
交换机上已经创建相应的VLAN接口。
# 手工指定VLAN接口2的全球单播地址。
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ipv6 address 3001::1/64
[SwitchA-Vlan-interface2] quit
# 手工指定VLAN接口1的全球单播地址,并允许其发布RA消息。(缺省情况下,所有的接口不会发布RA消息)
[SwitchA] interface vlan-interface 1
[SwitchA-Vlan-interface1] ipv6 address 2001::1/64
[SwitchA-Vlan-interface1] undo ipv6 nd ra halt
[SwitchA-Vlan-interface1] quit
# 配置VLAN接口2的全球单播地址。
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] ipv6 address 3001::2/64
[SwitchB-Vlan-interface2] quit
# 配置IPv6静态路由,该路由的目的地址为2001::/64,下一跳地址为3001::1。
[SwitchB] ipv6 route-static 2001:: 64 3001::1
在Host上安装IPv6,根据IPv6邻居发现协议自动配置IPv6地址。
# 从Switch A上查看端口Ten-GigabitEthernet 1/0/2的邻居信息。
[SwitchA] display ipv6 neighbors interface ten-GigabitEthernet 1/0/2
Type: S-Static D-Dynamic O-Openflow I-Invalid
IPv6 Address Link Layer VID Interface State T Age
FE80::215:E9FF:FEA6:7D14 0015-e9a6-7d14 1 XGE1/0/2 STALE D 1238
2001::15B:E0EA:3524:E791 0015-e9a6-7d14 1 XGE1/0/2 STALE D 1248
通过上面的信息可以知道Host上获得的IPv6全球单播地址为2001::15B:E0EA:3524:E791。
# 显示Switch A的接口信息,可以看到各接口配置的IPv6全球单播地址。
[SwitchA] display ipv6 interface vlan-interface 2
Vlan-interface2 current state: UP
Line protocol current state: UP
IPv6 is enabled, link-local address is FE80::20F:E2FF:FE00:2
Global unicast address(es):
3001::1, subnet is 3001::/64
Joined group address(es):
FF02::1
FF02::2
FF02::1:FF00:1
FF02::1:FF00:2
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
Hosts use stateless autoconfig for addresses
IPv6 Packet statistics:
InReceives: 25829
InTooShorts: 0
InTruncatedPkts: 0
InHopLimitExceeds: 0
InBadHeaders: 0
InBadOptions: 0
ReasmReqds: 0
ReasmOKs: 0
InFragDrops: 0
InFragTimeouts: 0
OutFragFails: 0
InUnknownProtos: 0
InDelivers: 47
OutRequests: 89
OutForwDatagrams: 48
InNoRoutes: 0
InTooBigErrors: 0
OutFragOKs: 0
OutFragCreates: 0
InMcastPkts: 6
InMcastNotMembers: 25747
OutMcastPkts: 48
InAddrErrors: 0
InDiscards: 0
OutDiscards: 0
[SwitchA] display ipv6 interface vlan-interface 1
Vlan-interface1 current state: UP
Line protocol current state: UP
IPv6 is enabled, link-local address is FE80::20F:E2FF:FE00:1C0
Global unicast address(es):
2001::1, subnet is 2001::/64
Joined group address(es):
FF02::1
FF02::2
FF02::1:FF00:1
FF02::1:FF00:1C0
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 advertisements are sent every 600 seconds
ND router advertisements live for 1800 seconds
Hosts use stateless autoconfig for addresses
IPv6 Packet statistics:
InReceives: 272
InTooShorts: 0
InTruncatedPkts: 0
InHopLimitExceeds: 0
InBadHeaders: 0
InBadOptions: 0
ReasmReqds: 0
ReasmOKs: 0
InFragDrops: 0
InFragTimeouts: 0
OutFragFails: 0
InUnknownProtos: 0
InDelivers: 159
OutRequests: 1012
OutForwDatagrams: 35
InNoRoutes: 0
InTooBigErrors: 0
OutFragOKs: 0
OutFragCreates: 0
InMcastPkts: 79
InMcastNotMembers: 65
OutMcastPkts: 938
InAddrErrors: 0
InDiscards: 0
OutDiscards: 0
# 显示Switch B的接口信息,可以看到接口配置的IPv6全球单播地址。
[SwitchB] display ipv6 interface vlan-interface 2
Vlan-interface2 current state: UP
Line protocol current state: UP
IPv6 is enabled, link-local address is FE80::20F:E2FF:FE00:1234
Global unicast address(es):
3001::2, subnet is 3001::/64
Joined group address(es):
FF02::1
FF02::2
FF02::1:FF00:1
FF02::1:FF00:1234
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
Hosts use stateless autoconfig for addresses
IPv6 Packet statistics:
InReceives: 117
InTooShorts: 0
InTruncatedPkts: 0
InHopLimitExceeds: 0
InBadHeaders: 0
InBadOptions: 0
ReasmReqds: 0
ReasmOKs: 0
InFragDrops: 0
InFragTimeouts: 0
OutFragFails: 0
InUnknownProtos: 0
InDelivers: 117
OutRequests: 83
OutForwDatagrams: 0
InNoRoutes: 0
InTooBigErrors: 0
OutFragOKs: 0
OutFragCreates: 0
InMcastPkts: 28
InMcastNotMembers: 0
OutMcastPkts: 7
InAddrErrors: 0
InDiscards: 0
OutDiscards: 0
# 在Host上使用Ping测试和Switch A及Switch B的互通性;在Switch B上使用Ping测试和Switch A及Host的互通性。
在Ping链路本地地址时,需要使用-i参数来指定链路本地地址的接口。
[SwitchB] ping ipv6 -c 1 3001::1
Ping6(56 data bytes) 3001::2 --> 3001::1, press CTRL_C to break
56 bytes from 3001::1, icmp_seq=0 hlim=64 time=4.404 ms
--- Ping6 statistics for 3001::1 ---
1 packet(s) transmitted, 1 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 4.404/4.404/4.404/0.000 ms
[SwitchB] ping ipv6 -c 1 2001::15B:E0EA:3524:E791
Ping6(56 data bytes) 3001::2 --> 2001::15B:E0EA:3524:E791, press CTRL_C to break
56 bytes from 2001::15B:E0EA:3524:E791, icmp_seq=0 hlim=64 time=5.404 ms
--- Ping6 statistics for 2001::15B:E0EA:3524:E791 ---
1 packet(s) transmitted, 1 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 5.404/5.404/5.404/0.000 ms
从Host上也可以ping通Switch B和Switch A,证明它们是互通的。
(0)
建议查看DHCPv6的的配置手册:http://www.h3c.com/cn/d_201708/1022893_30005_0.htm#_Toc489984608
参考如下:
(1) 配置DHCPv6服务器
# 配置VLAN接口2的IPv6地址。取消设备发布RA消息的抑制。配置被管理地址的配置标志位为1,即主机通过DHCPv6服务器获取IPv6地址。配置其他信息配置标志位为1,即主机通过DHCPv6服务器获取除IPv6地址以外的其他信息。
[Switch] interface vlan-interface 2
[Switch-Vlan-interface2] ipv6 address 1::1/64
[Switch-Vlan-interface2] undo ipv6 nd ra halt
[Switch-Vlan-interface2] ipv6 nd autoconfig managed-address-flag
[Switch-Vlan-interface2] ipv6 nd autoconfig other-flag
[Switch-Vlan-interface2] quit
# 配置前缀池1,包含的前缀为2001:0410::/32,分配的前缀长度为48。
[Switch] ipv6 dhcp prefix-pool 1 prefix 2001:0410::/32 assign-len 48
# 创建地址池1。
# 配置地址池1网段为1::/64,与VLAN接口2地址所属的网段相同。
[Switch-dhcp6-pool-1] network 1::/64
# 配置地址池1引用已存在的前缀池1,并设置动态分配前缀的首选生命期为1天,有效生命期为3天。
[Switch-dhcp6-pool-1] prefix-pool 1 preferred-lifetime 86400 valid-lifetime 259200
# 在地址池1中配置静态绑定前缀:绑定的前缀为2001:0410:0201::/48,绑定的客户端DUID为00030001CA0006A40000,并设置首选生命期为1天,有效生命期为3天。
# 配置为客户端分配的DNS服务器地址为2:2::3。
[Switch-dhcp6-pool-1] dns-server 2:2::3
# 配置为客户端分配的域名为***.***。
[Switch-dhcp6-pool-1] domain-name ***.***
# 配置为客户端分配的SIP服务器地址为2:2::4,域名为***.***。
[Switch-dhcp6-pool-1] sip-server address 2:2::4
[Switch-dhcp6-pool-1] sip-server domain-name ***.***
[Switch-dhcp6-pool-1] quit
# 配置VLAN接口2工作在DHCPv6服务器模式,并在该接口使能期望前缀分配和前缀快速分配功能,并将优先级设置为最高。
[Switch] interface vlan-interface 2
[Switch-Vlan-interface2] ipv6 dhcp select server
[Switch-Vlan-interface2] ipv6 dhcp server allow-hint preference 255 rapid-commit
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论