一.题目
二.实验思路
在本实验中,双向重发布之后,R2和R3路由表齐全,但是会出现路由不佳的情况
1.更改跳数
2.修改OSPF中环回问题
3.RIP重发布到OSPF中时,需要学会更改cost-type
三.重要配置命令
双向重发布
[r3]rip
[r3-rip-1]import-route ospf 1
[r3]ospf 1
[r3-ospf-1]import-route rip 1
[r3]rip
[r3-rip-1]import-route ospf 1
[r3]ospf 1
[r3-ospf-1]import-route rip 1
解决R3环回发布24位和位的问题
[r3-loopback0]ospf network-type broadcast
路由策略
1.优化R1上的路由
[r2]ip ip-prefix aa permit 3.3.3.0 24 使用前缀列表抓取
[r2]interface GigabitEthernet 0/0/1 控制层面流量传输的接口
[r2-GigabitEthernet0/0/1]rip metricin ip-prefix aa 2 流量入,匹配前缀列表aa,度量加2
[r2]ip ip-prefix aa permit 34.1.1.0 24
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]rip metricin ip-prefix bb 2
[r3]ip ip-prefix aa permit 24.1.1.0 24
[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]rip metricin ip-prefix CC 2
2.优化R4上面的路由
[r2]ip ip-prefix a permit 2.2.2.0 24
[r2]ip ip-prefix b permit 12.1.1.0 24
[r2]route-policy mnwl permit node 30
[r2-route-policy]if-match ip-prefix a 匹配前缀列表
[r2-route-policy]apply cost-type type-1
[r2-route-policy]q
[r2]route-policy mnwl permit node 40
[r2-route-policy]if-match ip-prefix b
[r2-route-policy]apply cost-type type-1
[r2-route-policy]q
[r2]route-policy huawei permit node 50 空表,允许所有;
[r2-route-policy]q
重发布时调用
[r2]ospf 1
[r2-ospf-1]import-route rip 1 route-policy mnwl
[r3]ip ip-prefix a permit 13.1.1.0 24
[r3]route-policy mnwl permit node 30
[r3-route-policy]if-match ip-prefix a 匹配前缀列表
[r3-route-policy]apply cost-type type-1
[r3-route-policy]q
r2]route-policy huawei permit node 50 空表,允许所有;
[r2-route-policy]q
重发布时调用
[r2]ospf 1
[r2-ospf-1]import-route rip 1 route-policy mnwl