一,实验要求
二,实验操作
loopback 0:
抓取流量并做策略,导入ospf1
[r1]ip ip-prefix aa permit 1.1.1.0 24
[r1]route-policy aa permit node 10
[r1-route-policy]if-match ip-prefix aa
[r1-ospf-1]import-route direct route-policy aa
双向重发布:
R2:
[r2-ospf-1]import-route rip 1
[r2-rip-1]import-route ospf 1
R3:
[r3-ospf-1]import-route rip 1
[r3-rip-1]import-route ospf 1
问题1:
这样操作后,导致R3学习到R1的环回路由是通过rip
原因:rip优先级100优于ospf的150
解决思路:
修改优先级
R3
[r3]ip ip-prefix aa permit 1.1.1.0 24
[r3]route-policy aa permit node 10
[r3-route-policy]if-match ip-prefix aa
[r3-route-policy]apply preference 99
[r3-route-policy]q
[r3-ospf-1]preference ase route-policy aa
R2先进行双向重发布,学习到的1.1.1.0还是从rip
重新双向重发布即可
问题2:
更正问题1后,R4对192.168.12..0和192.168.13.0会形成负载均衡
对192.168.12.0认知的修改:
[r4-acl-basic-2000]rule permit source 192.168.12.0 0.0.0.0
[r4-acl-basic-2000]q
[r4]inter g 0/0/1
[r4-GigabitEthernet0/0/1]rip metricin 2000 2
对192.168.13.0认知的修改:
[r2]ip ip-prefix bb deny 192.168.13.0 24
[r2]ip ip-prefix bb permit 0.0.0.0 0 less-equal 32
[r2-rip-1]filter-policy ip-prefix bb export