双路由器组网互通(HCIE2020-路由交换专家-配置OSPFv3双进程路由互通)

小编:迷魂冰 更新时间:2022-12-08 00:23

1.1.1 关于本实验

本章主要阐述如何在一台路由器上同时运行两个不同的OSPFv3进程,并实现路由互通的过程。

1.1.2 实验目的

掌握配置OSPFv3双进程路由互通。

1.1.3 实验组网介绍

双路由器组网互通(HCIE2020-路由交换专家-配置OSPFv3双进程路由互通)

1.1.4 实验规划

在R1、R2和R3上启用OSPFv3路由协议。R1和R3间运行OSPFv3 2,R2和R3之间运行OSPFv3 3两个不同进程,实现两个PC可以互相通信。

双路由器组网互通(HCIE2020-路由交换专家-配置OSPFv3双进程路由互通)

1.2 实验任务配置

1.2.1 配置思路

1. 配置PC1、PC2、R1、R2及R3的IPv6地址,使直连设备可以进行相互通信;

2. 在R1、R3上配置OSPFv3 2进程,在R2、R3上配置OSPFv3 3进程;

3. 在R3上的两个OSPFv3进程分别引入另一组OSPFv3进程,使得整个网络互通,PC1能够与PC2互访。

1.2.2 配置步骤

步骤 1 在路由器上开启IPv6功能,配置IPv6地址。

# 在R1上开启IPv6功能,配置IPv6地址。

system-view Enter system view, return user view with Ctrl+Z. [Huawei]sysname R1 [R1]interface GigabitEthernet 0/0/1 [R1-GigabitEthernet0/0/1]ipv6 enable [R1-GigabitEthernet0/0/1]ipv6 address 2000::1 64 [R1-GigabitEthernet0/0/1]quit [R1]interface GigabitEthernet 0/0/2 [R1-GigabitEthernet0/0/2]ipv6 enable [R1-GigabitEthernet0/0/2]ipv6 address [R1-GigabitEthernet0/0/2]quit [R1]

# 在R2上开启IPv6功能,配置IPv6地址。

system-view Enter system view, return user view with Ctrl+Z. [Huawei]sysname R2 [R2]interface GigabitEthernet 0/0/1 [R2-GigabitEthernet0/0/1]ipv6 enable [R2-GigabitEthernet0/0/1]ipv6 address 2001::2 64 [R2-GigabitEthernet0/0/1]quit [R2]interface GigabitEthernet 0/0/2 [R2-GigabitEthernet0/0/2]ipv6 enable [R2-GigabitEthernet0/0/2]ipv6 address 2004::1 64 [R2-GigabitEthernet0/0/2]quit [R2]

# 在R3上开启IPv6功能,配置IPv6地址。

system-view Enter system view, return user view with Ctrl+Z. [Huawei]sysname R3 [R3]interface GigabitEthernet 0/0/1 [R3-GigabitEthernet0/0/1]ipv6 enable [R3-GigabitEthernet0/0/1]ipv6 address 2000::2 64 [R3-GigabitEthernet0/0/1]quit [R3]interface GigabitEthernet 0/0/2 [R3-GigabitEthernet0/0/2]ipv6 enable [R3-GigabitEthernet0/0/2]ipv6 address 2001::1 64 [R3-GigabitEthernet0/0/2]quit [R3]

# 配置PC1的IPv6地址。

双路由器组网互通(HCIE2020-路由交换专家-配置OSPFv3双进程路由互通)

# 测试PC1与R1之间的链路。

PC>ping 2003::1 Ping 2003::1: 32 data bytes, Press Ctrl_C to break From 2003::1: bytes=32 seq=1 hop limit=64 time=16 ms From 2003::1: bytes=32 seq=2 hop limit=64 time=31 ms From 2003::1: bytes=32 seq=3 hop limit=64 time<1 ms From 2003::1: bytes=32 seq=4 hop limit=64 time=16 ms From 2003::1: bytes=32 seq=5 hop limit=64 time=16 ms --- 2003::1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 0/15/31 ms PC>

# 配置PC2的IPv6地址。

双路由器组网互通(HCIE2020-路由交换专家-配置OSPFv3双进程路由互通)

# 测试PC2与R2之间的链路。

PC>ping 2004::1 Ping 2004::1: 32 data bytes, Press Ctrl_C to break From 2004::1: bytes=32 seq=1 hop limit=64 time=31 ms From 2004::1: bytes=32 seq=2 hop limit=64 time=15 ms From 2004::1: bytes=32 seq=3 hop limit=64 time=16 ms From 2004::1: bytes=32 seq=4 hop limit=64 time=16 ms From 2004::1: bytes=32 seq=5 hop limit=64 time<1 ms --- 2004::1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 0/15/31 ms PC>

步骤 2 配置OSPFv3协议

# 在R1上配置OSPFv3 2进程。

[R1]ospfv3 2 [R1-ospfv3-2]router-id 10.10.10.10 [R1-ospfv3-2]quit [R1]interface GigabitEthernet 0/0/1 [R1-GigabitEthernet0/0/1]ospfv3 2 area 0 [R1-GigabitEthernet0/0/1]quit [R1]

# 在R2上配置OSPFv3 3进程。

[R2]ospfv3 3 [R2-ospfv3-3]router-id 20.20.20.20 [R2-ospfv3-3]quit [R2]interface GigabitEthernet 0/0/1 [R2-GigabitEthernet0/0/1]ospfv3 3 area 0 [R2-GigabitEthernet0/0/1]quit [R2] [R2]interface GigabitEthernet 0/0/2 [R2-GigabitEthernet0/0/2]ospfv3 3 area 0 [R2-GigabitEthernet0/0/2]quit [R2]

# 在R3上配置OSPFv3。

[R3]ospfv3 2 [R3-ospfv3-2]router-id 31.31.31.31 [R3-ospfv3-2]quit [R3] [R3]ospfv3 3 [R3-ospfv3-3]router-id 32.32.32.32 [R3-ospfv3-3]quit [R3] [R3]interface GigabitEthernet 0/0/1 [R3-GigabitEthernet0/0/1]ospfv3 2 area 0 [R3-GigabitEthernet0/0/1]quit [R3]interface GigabitEthernet 0/0/2 [R3-GigabitEthernet0/0/2]ospfv3 3 area 0 [R3-GigabitEthernet0/0/2]quit

# 在R3上查看OSPFv3邻居建立情况。

[R3]display ospfv3 peer OSPFv3 Process (2) OSPFv3 Area (0.0.0.0) Neighbor ID Pri State Dead Time Interface Instance ID 10.10.10.10 1 Full/DR 00:00:39 GE0/0/1 0 OSPFv3 Process (3) OSPFv3 Area (0.0.0.0) Neighbor ID Pri State Dead Time Interface Instance ID 20.20.20.20 1 Full/DR 00:00:39 GE0/0/2 0 [R3]

# 在R3的OSPFv3进程2中引入OSPFv3进程3的路由。

[R3]ospfv3 2 [R3-ospfv3-2]import-route ospfv3 3 [R3-ospfv3-2]quit [R3] # 在R3的OSPFv3进程3中引入OSPFv3进程2的路由。 [R3]ospfv3 3 [R3-ospfv3-3]import-route ospfv3 2 [R3-ospfv3-3]quit [R3]

1.3 结果验证

1.3.1 检查配置结果

# 在R1上查看IPv6 OSPFv3路由表,R1顺利学习到R2的全部路由条目。

display ipv6 routing-table protocol ospfv3 Public Routing Table : OSPFv3 Summary Count : 4 OSPFv3 Routing Table's Status : < Active > Summary Count : 2 Destination : 2001:: PrefixLength : 64 NextHop : FE80::2E0:FCFF:FEE3:7EE4 Preference : 150 Cost : 1 Protocol : OSPFv3ASE RelayNextHop : :: TunnelID : 0x0 Interface : GigabitEthernet0/0/1 Flags : D Destination : 2004:: PrefixLength : 64 NextHop : FE80::2E0:FCFF:FEE3:7EE4 Preference : 150 Cost : 1 Protocol : OSPFv3ASE RelayNextHop : :: TunnelID : 0x0 Interface : GigabitEthernet0/0/1 Flags : D OSPFv3 Routing Table's Status : < Inactive > Summary Count : 2 Destination : 2003:: PrefixLength : 64 NextHop : :: Preference : 10 Cost : 1 Protocol : OSPFv3 RelayNextHop : :: TunnelID : 0x0 Interface : GigabitEthernet0/0/2 Flags : Destination : 2000:: PrefixLength : 64 NextHop : :: Preference : 10 Cost : 1 Protocol : OSPFv3 RelayNextHop : :: TunnelID : 0x0 Interface : GigabitEthernet0/0/1 Flags :

# 在R2上查看IPv6 OSPFv3路由表,R2顺利学习到R1的全部路由条目。

display ipv6 routing-table protocol ospfv3 Public Routing Table : OSPFv3 Summary Count : 4 OSPFv3 Routing Table's Status : < Active > Summary Count : 2 Destination : 2003:: PrefixLength : 64 NextHop : FE80::2E0:FCFF:FEE3:7EE5 Preference : 150 Cost : 1 Protocol : OSPFv3ASE RelayNextHop : :: TunnelID : 0x0 Interface : GigabitEthernet0/0/1 Flags : D Destination : 2000:: PrefixLength : 64 NextHop : FE80::2E0:FCFF:FEE3:7EE5 Preference : 150 Cost : 1 Protocol : OSPFv3ASE RelayNextHop : :: TunnelID : 0x0 Interface : GigabitEthernet0/0/1 Flags : D OSPFv3 Routing Table's Status : < Inactive > Summary Count : 2 Destination : 2001:: PrefixLength : 64 NextHop : :: Preference : 10 Cost : 1 Protocol : OSPFv3 RelayNextHop : :: TunnelID : 0x0 Interface : GigabitEthernet0/0/1 Flags : Destination : 2004:: PrefixLength : 64 NextHop : :: Preference : 10 Cost : 1 Protocol : OSPFv3 RelayNextHop : :: TunnelID : 0x0 Interface : GigabitEthernet0/0/2 Flags :

# 在PC1上访问PC2,结果如下。

PC>ping 2004::2 Ping 2004::2: 32 data bytes, Press Ctrl_C to break From 2004::2: bytes=32 seq=1 hop limit=252 time=62 ms From 2004::2: bytes=32 seq=2 hop limit=252 time=16 ms From 2004::2: bytes=32 seq=3 hop limit=252 time=31 ms From 2004::2: bytes=32 seq=4 hop limit=252 time=31 ms From 2004::2: bytes=32 seq=5 hop limit=252 time=16 ms --- 2004::2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 16/31/62 ms PC>

1.3.2 R1的配置

# sysname R1 # ipv6 # ospfv3 2 router-id 10.10.10.10 # interface GigabitEthernet0/0/1 ipv6 enable ipv6 address 2000::1/64 ospfv3 2 area 0.0.0.0 # interface GigabitEthernet0/0/2 ipv6 enable ipv6 address 2003::1/64 ospfv3 2 area 0.0.0.0 # return

1.3.3 R2的配置

# sysname R2 # ipv6 # ospfv3 3 router-id 20.20.20.20 # interface GigabitEthernet0/0/1 ipv6 enable ipv6 address 2001::2/64 ospfv3 3 area 0.0.0.0 # interface GigabitEthernet0/0/2 ipv6 enable ipv6 address 2004::1/64 ospfv3 3 area 0.0.0.0 # return

1.3.4 R3的配置

# sysname R3 # ipv6 # ospfv3 2 router-id 31.31.31.31 import-route ospfv3 3 # ospfv3 3 router-id 32.32.32.32 import-route ospfv3 2 # interface GigabitEthernet0/0/1 ipv6 enable ipv6 address 2000::2/64 ospfv3 2 area 0.0.0.0 # interface GigabitEthernet0/0/2 ipv6 enable ipv6 address 2001::1/64 ospfv3 3 area 0.0.0.0 # return