@ [TOC]#双点双向引入带来的次优路劲和环路问题:
实验拓扑:
拓扑描述:
- R1,R2之间运行静态,R2,R3,R4运行OSPF,R3,R4,R5运行RIP
实验需求:
- 在R2上利用前缀列表精确匹配环回口路由并引入至RIP
- 将R2上利用filter-policy将环回口引入至OSPF时,只允许OSPF域内学到双数路由
- 在R3, R4上进行双向路由重分发
- 在R3,R4上对10.0.X.0 / 24进行自动汇总,请请避免环路
实验步骤:
-
配置IP地址,ping直连检验连通性(略)
-
配置OSPF(取R2配置)
[R2]ospf 1 router-id 2.2.2.2 [R2-ospf-1]area 0 [R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0 [R2-ospf-1-area-0.0.0.0]network 10.0.23.2 0.0.0.0 [R2-ospf-1-area-0.0.0.0]network 10.0.24.2 0.0.0.0
-
查看R2的ospf邻居表:
[R2]dis ospf peer brief OSPF Process 1 with Router ID 2.2.2.2 Peer Statistic Information ---------------------------------------------------------------------------- Area Id Interface Neighbor id State 0.0.0.0 GigabitEthernet0/0/1 10.0.23.3 Full 0.0.0.0 GigabitEthernet0/0/2 4.4.4.4 Full ---------------------------------------------------------------------------- [R2] #状态为full,邻接关系建立成功
-
配置RIP(取R5配置):
[R5]rip 1 [R5-rip-1]undo summary [R5-rip-1]version 2 [R5-rip-1]network 10.0.0.0
-
查看R5的RIP邻居表
[R5]dis rip 1 neighbor --------------------------------------------------------------------- IP Address Interface Type Last-Heard-Time --------------------------------------------------------------------- 10.0.35.3 GigabitEthernet0/0/0 RIP 0:0:20 Number of RIP routes : 1 10.0.45.4 GigabitEthernet0/0/1 RIP 0:0:21 Number of RIP routes : 1 [R5] #rip邻居建立成功。
-
在R5上配置前缀列表精确引入外部路由:
[R5]ip ip-prefix 1 index 10 permit 20.0.0.0 22 greater-equal 22 less-equal 24 --匹配前缀为20.0.0.0/22 中掩码为22-24中的四个网段 #我们这一下子匹配了四个,跟题目要求的不符合,往下看
-
在在R5上配置两个环回口地址为20.0.3.1,20.0.4.1后,查看R4 RIP路由表
[R4]dis ip routing-table protocol rip Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Public routing table : RIP Destinations : 6 Routes : 6 RIP routing table status : <Active> Destinations : 5 Routes : 5 Destination/Mask Proto Pre Cost Flags NextHop Interface 10.0.35.0/24 RIP 100 1 D 10.0.45.5 GigabitEthernet 0/0/1 20.0.0.0/24 RIP 100 1 D 10.0.45.5 GigabitEthernet 0/0/1 20.0.1.0/24 RIP 100 1 D 10.0.45.5 GigabitEthernet 0/0/