温馨提示:欢迎对技术感兴趣的新手朋友们,希望这些知识点能对大家有帮助。如果有什么不解或疑惑或建议,可留言小编或邮件2355331040@qq.com,我将尽快给予解决。感谢大家的支持和关注,谢谢!!!
学习目标
掌握基本IPv6地址的配置方法
掌握OSPFv3路由协议的配置方法
掌握DHCPv6服务器功能的配置方法
掌握IPv6 display命令的使用
拓扑图
图8.1 部署IPv6网络实验拓扑图请点击输
场景
目前,企业网络还是IPv4网络,但是随着技术的进步与更迭,企业的网络需要从IPv4迁移至IPv6,作为管理员的您首先需要在现有网络上进行IPv6网络的设计改造。在本实验中,您需要部署有状态IPv6地址分配方案以及IPv6路由协议。
操作步骤
步骤一 实验环境准备
如果本任务中您使用的是空配置设备,则从步骤1开始配置。如果使用的设备包含上一个实验的配置,请直接从步骤2开始配置。
<huawei>system-view
[huawei]sysname R1
<huawei>system-view
[huawei]sysname R2
<huawei>system-view
[huawei]sysname R3
步骤二 配置IPv6地址
在路由器的环回接口上配置IPv6全球单播地址,在所有路由器的G0/0/0接口配置本地链路地址。
[R1]ipv6
[R1]interface loopback 0
[R1-LoopBack0]ipv6 enable
[R1-LoopBack0]ipv6 address 2001:1::A 64
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ipv6 enable
[R1-GigabitEthernet0/0/0]ipv6 address fe80::1 link-local
[R2]ipv6
[R2]interface loopback 0
[R2-LoopBack0]ipv6 enable
[R2-LoopBack0]ipv6 address 2001:2::B 64
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ipv6 enable
[R2-GigabitEthernet0/0/0]ipv6 address fe80::2 link-local
[R3]ipv6
[R3]interface loopback 0
[R3-LoopBack0]ipv6 enable
[R3-LoopBack0]ipv6 address 2001:3::C 64
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ipv6 enable
[R3-GigabitEthernet0/0/0]ipv6 address fe80::3 link-local
配置完成后,查看IPv6接口信息。
<R1>display ipv6 interface GigabitEthernet 0/0/0
GigabitEthernet0/0/0 current state : UP
IPv6 protocol current state : UP
IPv6 is enabled, link-local address is FE80::1
No global unicast address configured
Joined group address(es):
FF02::1:FF00:1
FF02::2
FF02::1
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接口可以通过加入多个组播组(如FF02::1和FF02::2)来进行重复地址检测(DAD),证实本地链路地址是独一无二的,以支持无状态地址自动配置(SLAAC)。
步骤三 配置OSPFv3
在路由器上开启OSPFv3进程,并指定R1、R2和R3的路由器ID。然后在接口下使能OSPFv3进程并指定所属区域。
[R1]ospfv3 1
[R1-ospfv3-1]router-id 1.1.1.1
[R1-ospfv3-1]quit
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ospfv3 1 area 0
[R1-GigabitEthernet0/0/0]quit
[R1]interface loopback 0
[R1-LoopBack0]ospfv3 1 area 0
[R2]ospfv3 1
[R2-ospfv3-1]router-id 2.2.2.2
[R2-ospfv3-1]quit
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ospfv3 1 area 0
[R2-GigabitEthernet0/0/0]quit
[R2]interface loopback 0
[R2-LoopBack0]ospfv3 1 area 0
[R3]ospfv3 1
[R3-ospfv3-1]router-id 3.3.3.3
[R3-ospfv3-1]quit
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ospfv3 1 area 0
[R3-GigabitEthernet0/0/0]quit
[R3]interface loopback 0
[R3-LoopBack0]ospfv3 1 area 0
在R1和R3上执行display ospfv3 peer命令,查看OSPFv3的邻居关系。
<R1>display ospfv3 peer
OSPFv3 Process (1)
OSPFv3 Area (0.0.0.0)
Neighbor ID Pri State Dead Time Interface Instance ID
2.2.2.2 1 Full/Backup 00:00:30 GE0/0/0 0
3.3.3.3 1 Full/DROther 00:00:40 GE0/0/0 0
<R3>display ospfv3 peer
OSPFv3 Process (1)
OSPFv3 Area (0.0.0.0)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 1 Full/DR 00:00:32 GE0/0/0 0
2.2.2.2 1 Full/Backup 00:00:38 GE0/0/0 0
可以观察到邻居关系为Full,其中如果1.1.1.1不是DR,可以执行下面的命令重启OSPFv3进程。
<R1>reset ospfv3 1 graceful-restart
使用Ping ipv6检测对端本地链路地址和LoopBack 0接口的全球单播地址是否可达。
<R1>ping ipv6 fe80::3 -i GigabitEthernet 0/0/0
PING fe80::3 : 56 data bytes, press CTRL_C to break
Reply from FE80::3
bytes=56 Sequence=1 hop limit=64 time = 2 ms
Reply from FE80::3
bytes=56 Sequence=2 hop limit=64 time = 2 ms
Reply from FE80::3
bytes=56 Sequence=3 hop limit=64 time = 11 ms
Reply from FE80::3
bytes=56 Sequence=4 hop limit=64 time = 2 ms
Reply from FE80::3
bytes=56 Sequence=5 hop limit=64 time = 2 ms
--- fe80::3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 2/3/11 ms
<R1>ping ipv6 2001:3::C
PING 2001:3::C : 56 data bytes, press CTRL_C to break
Reply from 2001:3::C
bytes=56 Sequence=1 hop limit=64 time = 11 ms
Reply from 2001:3::C
bytes=56 Sequence=2 hop limit=64 time = 6 ms
Reply from 2001:3::C
bytes=56 Sequence=3 hop limit=64 time = 2 ms
Reply from 2001:3::C
bytes=56 Sequence=4 hop limit=64 time = 2 ms
Reply from 2001:3::C
bytes=56 Sequence=5 hop limit=64 time = 6 ms
--- 2001:3::C ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 2/5/11 ms
步骤四 配置DHCPv6分配IPv6地址
在R2上开启DHCPv6服务器功能,为其它设备配置IPv6地址。然后创建IPv6地址池并指定地址池中IPv6地址的前缀和前缀长度,再配置IPv6地址池中不参与自动分配的IPv6地址(通常为网关地址)以及DNS服务器的IPv6地址。
[R2]dhcp enable
[R2] dhcpv6 duid ll
Warning: The DHCP unique identifier should be globally-unique and stable. Are you sure to change it? [Y/N]y
[R2]dhcpv6 pool pool1
[R2-dhcpv6-pool-pool1]address prefix 2001:FACE::/64
[R2-dhcpv6-pool-pool1]dns-server 2001:444e:5300::1
[R2-dhcpv6-pool-pool1]excluded-address 2001:FACE::1
[R2-dhcpv6-pool-pool1]quit
在G0/0/0接口配置IPv6地址为地址池中网关地址,并配置DHCPv6服务器功能和指定的地址池名称。
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ipv6 address 2001:FACE::1 64
[R2-GigabitEthernet0/0/0]dhcpv6 server pool1
在R1和R3上配置DHCPv6客户端功能,并在相应接口下配置通过DHCPv6自动获取IPv6地址功能。
[R1]dhcp enable
[R1] dhcpv6 duid ll
Warning: The DHCP unique identifier should be globally-unique and stable. Are you sure to change it? [Y/N]y
[R1]interface Gigabitethernet 0/0/0
[R1-GigabitEthernet0/0/0]ipv6 address auto dhcp
[R3]dhcp enable
[R3] dhcpv6 duid ll
Warning: The DHCP unique identifier should be globally-unique and stable. Are you sure to change it? [Y/N]y
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ipv6 address auto dhcp
在R2上执行display dhcpv6 pool命令,查看DHCPv6地址池的信息。
<R2>display dhcpv6 pool
DHCPv6 pool: pool1
Address prefix: 2001:FACE::/64
Lifetime valid 172800 seconds, preferred 86400 seconds
2 in use, 0 conflicts
Excluded-address 2001:FACE::1
1 excluded addresses
Information refresh time: 86400
DNS server address: 2001:444E:5300::1
Conflict-address expire-time: 172800
Active normal clients: 2
在R1和R3上执行display ipv6 interface brief命令,查看通过DHCPv6获取的IPv6地址。
[R1]display ipv6 interface brief
*down: administratively down
(l): loopback
(s): spoofing
Interface Physical Protocol
GigabitEthernet0/0/0 up up
[IPv6 Address] 2001:FACE::2
LoopBack0 up up(s)
[IPv6 Address] 2001:1::A
[R3]display ipv6 interface brief
*down: administratively down
(l): loopback
(s): spoofing
Interface Physical Protocol
GigabitEthernet0/0/0 up up
[IPv6 Address] 2001:FACE::3
LoopBack0 up up(s)
[IPv6 Address] 2001:3::C
配置文件
<R1>display current-configuration
<R2>display current-configuration
<R3>display current-configuration
原文来自:微思网络
原文地址:https://mp.weixin.qq.com/s/IF...
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。