通信网络
实验拓扑
R1、R2为IPv6路由器,双方使用GE0/0/0口互联
实验需求
R1、R2按照图示完成接口IP地址的配置;
R1、R2运行OSPFv3,要求R1与R2的Loopback0接口能够互相通信。
配置及实现
R1的配置如下:
[R1] ipv6 [R1] ospfv3 1 #创建OSPFv3进程,并配置router-id为1.1.1.1 [R1-ospfv3-1] router-id 1.1.1.1 [R1] interface gigabitEthernet0/0/0 [R1-GgabitEthernet0/0/0] ipv6 enable [R1-GgabitEthernet0/0/0] ipv6 address 2001:1 64 [R1-GgabitEthernet0/0/0] ospfv3 1 area 0 #接口激活OSPFv3,加入区域0 [R1] interface loopback 0 [R1-LoopBack0] ipv6 enable [R1-LoopBack0] ipv6 address 2001:FFFF 128 [R1-LoopBack0] ospfv3 1 area 0 #接口激活OSPFv3,加入区域0
R2的配置如下:
[R2] ipv6 [R2] ospfv3 1 [R2-ospfv3-1] router-id 2.2.2.2 [R2] interface gigabitEthernet0/0/0 [R2-GgabitEthernet0/0/0] ipv6 enable [R2-GgabitEthernet0/0/0] ipv6 address 2001:2 64 [R2-GgabitEthernet0/0/0] ospfv3 1 area 0 [R2] interface loopback0 [R2-LoopBack0] ipv6 enable [R2-LoopBack0] ipv6 address 2001:FFFF 128 [R2-LoopBack0] ospfv3 1 area 0
完成配置后,两台PC即可互相通信。下面做一些简单的查看和验证:
[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 0035 GE0/0/0 0
上面的输出是R1的OSPFv3邻居表,可以看到R1有一个OSPFv3的邻居,也就是R2(2.2.2.2),并且该邻居的状态为Full,再来看一下邻居的详细信息:
[R1] display ospfv3 peer verbose OSPFv3 Process (1) Neighbor 2.2.2.2 is Full, interface address FE80:FCFF2E46 In the area 0.0.0.0 via interface GE0/0/0 DR Priority is 1 DR is 1.1.1.1 BDR is 2.2.2.2 Options is 0x000013 (-|R|-|-|E|V6) Dead timer due in 0037 Neighbour is up for 0003 Database Summary Packets List 0 Link State Request List 0 Link State Retransmission List 0 Neighbour Event: 14 Neighbour If Id : 0x3
接下去查看一下R1的IPv6路由表:
[R1] display ipv6 routing-table protocol ospfv3 Public Routing Table : OSPFv3 Summary Count : 3 OSPFv3 Routing Table's Status : < Active > Summary Count : 1 Destination : 2001:FFFF PrefixLength : 128 NextHop : FE80:FCFF2E46 Preference : 10 Cost : 1 Protocol : OSPFv3 RelayNextHop : :: TunnelID : 0x0 Interface : GigabitEthernet0/0/0 Flags : D [ 此处省略部分输出 ]
R1已经学习到了2001:FFFF/128的OSPF路由,同样,R2也学习到了2001:FFFF/128的路由。
现在来测试一下R1与R2的Loopback0接口的IP连通性:
[R1] ping ipv6 -a 2001:FFFF 2001:FFFF PING 2001:FFFF : 56 data bytes, press CTRL_C to break Reply from 2001:FFFF bytes=56 Sequence=1 hop limit=64 time = 30 ms Reply from 2001:FFFF bytes=56 Sequence=2 hop limit=64 time = 20 ms Reply from 2001:FFFF bytes=56 Sequence=3 hop limit=64 time = 20 ms Reply from 2001:FFFF bytes=56 Sequence=4 hop limit=64 time = 20 ms Reply from 2001:FFFF bytes=56 Sequence=5 hop limit=64 time = 20 ms --- 2001:FFFF ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 20/22/30 ms
编辑:黄飞
全部0条评论
快来发表一下你的评论吧 !