CCNP课程实验-07-OSPF_TS

发布时间:2024年01月04日

实验条件

网络拓朴

在这里插入图片描述

环境配置

R1

router ospf 89
 router-id 1.1.1.1

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
 ip ospf 89 area 1
interface Ethernet0/0
 ip address 12.1.1.1 255.255.255.0
 ip ospf authentication message-digest
 ip ospf message-digest-key 1 md5 SPOTO
 ip ospf 89 area 0
interface Ethernet0/1
 ip address 13.1.1.1 255.255.255.0
 ip ospf 89 area 0

R2

router ospf 89
 router-id 2.2.2.2
 area 1 range 4.4.4.0 255.255.255.0
router ospf 1

interface Loopback0
 ip address 2.2.2.2 255.255.255.255
 ip ospf 89 area 0
interface Ethernet0/0
 ip address 12.1.1.2 255.255.255.0
 ip ospf 89 area 0
interface Ethernet0/1
 ip address 24.1.1.2 255.255.255.0
 ip ospf 1 area 89
 ip ospf cost 100

R3

interface Loopback0
 ip address 3.3.3.3 255.255.255.255
 ip ospf 89 area 0
interface Ethernet0/0
 ip address 34.1.1.3 255.255.255.0
 ip ospf network point-to-point
 ip ospf 89 area 1
interface Ethernet0/1
 ip address 13.1.1.3 255.255.255.0
 ip ospf hello-interval 11
 ip ospf 89 area 0


router ospf 89
 router-id 3.3.3.3

R4

router ospf 89
 router-id 4.4.4.4
 area 1 stub

interface Loopback0
 ip address 4.4.4.4 255.255.255.255
interface Ethernet0/0
 ip address 34.1.1.4 255.255.255.0
 duplex auto
interface Ethernet0/1
 ip address 24.1.1.4 255.255.255.0
 ip authentication mode eigrp 1234 md5
 ip authentication key-chain eigrp 1234 CCNP

开始排错

查询R1的邻居信息,发现邻居没有建立成功

错点1:R1-R2之间认证不匹配

为R2接口上配置上MD5认证
R2

interface Ethernet0/0
 ip ospf authentication message-digest
 ip ospf message-digest-key 1 md5 SPOTO

查询结果发现邻居建立。

R1(config)#do show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DR         00:00:33    12.1.1.2        Ethernet0/0

错误2:hello包的时间配置不匹配

R3

interface Ethernet0/1
 ip ospf hello-interval 11

取消该时间间隔配置

interface Ethernet0/1
 no ip ospf hello-interval

查询邻居信息

R1(config)#do show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           1   FULL/DR         00:00:33    13.1.1.3        Ethernet0/1
2.2.2.2           1   FULL/DR         00:00:38    12.1.1.2        Ethernet0/0

查询R2邻居信息

R2(config)#do show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   FULL/BDR        00:00:39    12.1.1.1        Ethernet0/0

与R4之间的邻居不正常,继续排错

错误3:R2的e0/1接口区域配置不正确

重新配置

interface Ethernet0/1
 no ip ospf 1 area 89
 ip ospf 89 area 1

错误4:R4的e0/1接口没有配置进OSPF

配置进OSPF

interface Ethernet0/1
 no ip ospf 1 area 89
 ip ospf 89 area 1

查询邻居,发现依然没有建立成功。
发现area1被配置成特殊区域。

router ospf 89
 router-id 4.4.4.4
 area 1 stub

错误5:R2的区域1没有配置成特殊区域

将R2上的area1配置成特殊区域。

R2:
	router ospf 89
	 area 1 stub

邻居成功建立
检查所有的邻居关系。发现还剩下R3-R4之间的邻居关系没有起来,继续排错。

错误6:R4上e/0的接口并没有宣告进OSPF

配置接口进入OSPF

R4:
	interface Ethernet0/0
	 ip ospf 89 area 1

邻居依然没有建立。继续排错。

错误7:R4-R3之间的网络类型不一致

配置R4上E0/0的网络类型

R4:
	interface Ethernet0/0
	 ip ospf 89 area 1

邻居依然没有建立。继续排错。

错误8:R3没有配置区域1为特殊区域

R3:
	router ospf 89
	 area 1 stub

成功排除错误,邻居建立成功。

错误9:R2上的area1的聚合路由

取消聚合路由

R2:
	router ospf 89
	 no area 1 range 4.4.4.0 255.255.255.0

查询R1上的路由表,依然没有出现等价负载均衡。继续排错

R1(config)#do show ip route 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set
......
      4.0.0.0/32 is subnetted, 1 subnets
O IA     4.4.4.4 [110/21] via 13.1.1.3, 00:08:53, Ethernet0/1
......

错误10:R2上的e0/1口开销配置的过大

取消R2上的e0/1口上的开销配置,采用默认值。

R2:
	interface Ethernet0/1
	 no ip ospf cost 100

查看R1上的路由表检查结果

R1(config)#do show ip route 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
C        1.1.1.1 is directly connected, Loopback0
      2.0.0.0/32 is subnetted, 1 subnets
O        2.2.2.2 [110/11] via 12.1.1.2, 05:21:57, Ethernet0/0
      3.0.0.0/32 is subnetted, 1 subnets
O        3.3.3.3 [110/11] via 13.1.1.3, 05:18:12, Ethernet0/1
      4.0.0.0/32 is subnetted, 1 subnets
O IA     4.4.4.4 [110/21] via 13.1.1.3, 04:47:40, Ethernet0/1
                 [110/21] via 12.1.1.2, 00:00:03, Ethernet0/0
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.1.1.0/24 is directly connected, Ethernet0/0
L        12.1.1.1/32 is directly connected, Ethernet0/0
      13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        13.1.1.0/24 is directly connected, Ethernet0/1
L        13.1.1.1/32 is directly connected, Ethernet0/1
      24.0.0.0/24 is subnetted, 1 subnets
O IA     24.1.1.0 [110/20] via 12.1.1.2, 00:00:03, Ethernet0/0
      34.0.0.0/24 is subnetted, 1 subnets
O IA     34.1.1.0 [110/20] via 13.1.1.3, 05:18:12, Ethernet0/1
R1(config)#

目标达成

文章来源:https://blog.csdn.net/Linux7985/article/details/135389543
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。