一.实验要求
1.R1的环回并没有宣告进0SPF网络,需要通过
重发布导入到0SPF网络。
2.保证全网可达,且没有路由回馈以及选路不
佳。
二.实验步骤
1.配置ip
r1
r2
r3
r4
2.在R1上将1.1.1.1环回引入ospf中
[r1]ospf 1
[r1-ospf-1]import-route direct
3.匹配前缀列表
[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
4.在R2、R3上配置重发布操作
[r2-ospf-1]import-route rip 1
[r2-ospf-1]q
[r2-ospf-1]import-route ospf 1
[r3-ospf-1]import-route rip 1
[r3-ospf-1]rip
[r3-ospf-1]q
[r3-ospf-1]import-route ospf 1
5.检查是否通信
6.创建列表,使ospf列表优先
r3:
[r3]ip ip-prefix aa permit 1.1.1.1 24
[r3]route-policy aa permit node 20
[r3-route-policy]if-match ip-prefix aa
[r3-route-policy]apply preference 90
[r3-route-policy]q
[r3]ospf 1
[r3-ospf-1]preference ase route-policy aa
r2:
[r2]ip ip-prefix aa permit 1.1.1.0 24
[r2]route-policy aa permit node 10
[r2-route-policy]if-match ip-prefix aa
[r2-route-policy]apply preference 92
[r2-route-policy]q
[r2]ospf 1
[r3-ospf-1]preference ase route-policy aa
7.偏移列表
[r4]acl 2000
[r4-acl-basic-2000]rule permit source 192.168.12.0 0
[r4-acl-basic-2000]q
[r4]acl 2001
[r4-acl-basic-2001]rule permit source 192.168.13.0 0
[r4-acl-basic-2001]q
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]rip metricin 2001 5
[r4-GigabitEthernet0/0/0]q
[r4]int g0/0/1
[r4-GigabitEthernet0/0/1]rip metricin 2000 5
[r4-GigabitEthernet0/0/1]q
8.过滤策略
r2:
[r2]ip ip-prefix bb permit 0.0.0.0 0 less-equal 32
[r2]ospf 1
[r2-ospf-1]filter-policy ip-prefix bb export
r3:
[r3]ip ip-prefix bb permit 0.0.0.0 0 less-equal 32
[r3]ospf 1
[r3-ospf-1]filter-policy ip-prefix bb export
三.实验结果