要在核心开启一个ipv6的地址池,然后让客户端获取到ipv6的地址,可以发份具体的案例来看看吗
(0)
最佳答案
如下
https://www.h3c.com/cn/d_201901/1150642_30005_0.htm#_Toc494217484
动态分配IPv6地址典型配置举例
· 作为DHCPv6服务器的Switch A为网段1::1:0:0:0/96和1::2:0:0:0/96的客户端动态分配IPv6地址;
· Switch A的两个VLAN接口Vlan-interface10和Vlan-interface20的地址分别为1::1:0:0:1/96和1::2:0:0:1/96;
· 1::1:0:0:0/96网段内的地址租约时长为172800秒(2天),有效时长为345600秒(4天),域名后缀为***.***,DNS服务器地址为1::1:0:0:2/96;
· 1::2:0:0:0/96网段内的地址租约时长为432000秒(5天),有效时长为864000秒(10天),域名后缀为***.***,DNS服务器地址为1::2:0:0:2/96。
图2-5 DHCPv6组网图
(1) 配置DHCPv6 server各接口的IPv6地址。取消设备发布RA消息的抑制。配置被管理地址的配置标志位为1,即主机通过DHCPv6服务器获取IPv6地址。配置其他信息配置标志位为1,即主机通过DHCPv6服务器获取除IPv6地址以外的其他信息。
<SwitchA> system-view
[SwitchA] interface vlan-interface 10
[SwitchA-Vlan-interface10] ipv6 address 1::1:0:0:1/96
[SwitchA-Vlan-interface10] undo ipv6 nd ra halt
[SwitchA-Vlan-interface10] ipv6 nd autoconfig managed-address-flag
[SwitchA-Vlan-interface10] ipv6 nd autoconfig other-flag
[SwitchA-Vlan-interface10] quit
[SwitchA] interface vlan-interface 20
[SwitchA-Vlan-interface20] ipv6 address 1::2:0:0:1/96
[SwitchA-Vlan-interface20] undo ipv6 nd ra halt
[SwitchA-Vlan-interface20] ipv6 nd autoconfig managed-address-flag
[SwitchA-Vlan-interface20] ipv6 nd autoconfig other-flag
[SwitchA-Vlan-interface20] quit
(2) 配置DHCPv6服务
# 配置接口Vlan-interface10和Vlan-interface20工作在DHCPv6服务器模式。
[SwitchA] interface vlan-interface 10
[SwitchA-Vlan-interface10] ipv6 dhcp select server
[SwitchA-Vlan-interface10] quit
[SwitchA] interface vlan-interface20
[SwitchA-Vlan-interface20] ipv6 dhcp select server
[SwitchA-Vlan-interface20] quit
# 配置不参与自动分配的IPv6地址,以避免分配DNS服务器的地址。
[SwitchA] ipv6 dhcp server forbidden-address 1::1:0:0:2
[SwitchA] ipv6 dhcp server forbidden-address 1::2:0:0:2
# 配置DHCPv6地址池1,为1::1:0:0:0/96网段的客户端分配IPv6地址等参数。
[SwitchA-dhcp6-pool-1] network 1::1:0:0:0/96 preferred-lifetime 172800 valid-lifetime 345600
[SwitchA-dhcp6-pool-1] domain-name ***.***
[SwitchA-dhcp6-pool-1] dns-server 1::1:0:0:2
[SwitchA-dhcp6-pool-1] quit
# 配置DHCPv6地址池2,为1::2:0:0:0/96网段的客户端分配IPv6地址等参数。
[SwitchA-dhcp6-pool-2] network 1::2:0:0:0/96 preferred-lifetime 432000 valid-lifetime 864000
[SwitchA-dhcp6-pool-2] domain-name ***.***
[SwitchA-dhcp6-pool-2] dns-server 1::2:0:0:2
[SwitchA-dhcp6-pool-2] quit
配置完成后,1::1:0:0:0/96和1::2:0:0:0/96网段的客户端可以从DHCPv6服务器Switch A申请到相应网段的IPv6地址和网络配置参数。通过display ipv6 dhcp server ip-in-use命令可以查看DHCPv6服务器为客户端分配的IPv6地址。
(0)
您好,请知:
以下是DHCPV6的配置案例及链接,请参考:
https://zhiliao.h3c.com/Theme/details/131084
组网说明:
本案例采用H3C HCL模拟器来模拟IPV6 DHCPv6典型组网配置。要求PC能够通过DHCP的方式获取到IPV6地址。
配置思路:
1、按照网络拓扑图正确配置IP地址
2、R1开启DHCP功能,并配置DHCPv6
R1:
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysname R1
[R1]int gi 0/0
[R1-GigabitEthernet0/0]ipv6 address 1::1 64
[R1-GigabitEthernet0/0]undo ipv6 nd ra halt
[R1-GigabitEthernet0/0]ipv6 nd autoconfig managed-address-flag
[R1-GigabitEthernet0/0]ipv6 nd autoconfig other-flag
[R1-GigabitEthernet0/0]quit
[R1]ipv6 dhcp prefix-pool 1 prefix 1::/64 assign-len 64
[R1]ipv6 dhcp pool 1
[R1-dhcp6-pool-1]network 1::/64
[R1-dhcp6-pool-1]gateway-list 1::1
[R1-dhcp6-pool-1]prefix-pool 1 preferred-lifetime 86400 valid-lifetime 259200
[R1-dhcp6-pool-1]dns-server 2::1
[R1-dhcp6-pool-1]quit
[R1]int gi 0/0
[R1-GigabitEthernet0/0]ipv6 dhcp select server
[R1-GigabitEthernet0/0]ipv6 dhcp server allow-hint preference 255 rapid-commit
[R1-GigabitEthernet0/0]quit
查看R1的IPV6显示信息:
PC已通过DHCP获取到IPV6地址:
(0)
暂无评论
您好,参考链接
H3C S5560-SI系列以太网交换机 配置指导-Release 3116-6W100_三层技术-IP业务配置指导_IPv6基础配置-新华三集团-H3C
· 如图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上查看端口GigabitEthernet 1/0/2的邻居信息。
[SwitchA] display ipv6 neighbors interface 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 GE1/0/2 STALE D 1238
2001::15B:E0EA:3524:E791 0015-e9a6-7d14 1 GE1/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,证明它们是互通的。
无法Ping通对端的IPv6地址。
· 在任意视图下使用display ipv6 interface命令检查接口配置的IPv6地址是否正确,接口状态是否为up。
· 在用户视图下使用debugging ipv6 packet命令打开IPv6报文调试开关,根据调试信息进行判断。
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论