1.分部办公路由正常情况走办公路由器,出现异常走业务路由。
2.分部业务路由正常情况走业务路由器,出现异常走办公路由。
1.R1-R4作为核心层,启用OSPF进程1,设置为 area 0.
2.R3-R7作为汇聚层,启用OSPF进程2,设置为 area 1.
3.在R3和R4做OSPF重发布,采用router-policy路由策略,干涉OSPF选路。
4.在R3上抓取总部办公路由,加大COST值,在进程2引入进程1时调用,
在R4上抓取分部办公路由,加大COST值,在进程1引入进程2时调用。
5.R4上操作类同。
6.修改环回OSPF类型为broadcast,修改接口链路COST值,避免出现负载分担。
1.R3_OSPF配置
ospf 1 router-id 3.3.3.3 import-route ospf 2 type 1 route-policy fbyewu area 0.0.0.0 network 10.1.13.0 0.0.0.255 network 10.1.34.0 0.0.0.255 # ospf 2 router-id 3.3.3.3 import-route ospf 1 route-policy zbyewu area 0.0.0.1 network 10.1.35.0 0.0.0.255 network 10.1.36.0 0.0.0.255
route-policy zbyewu permit node 10 if-match ip-prefix zbyewu apply cost 10 # route-policy zbyewu permit node 20 # route-policy fbyewu permit node 10 if-match ip-prefix fbyewu apply cost 10 # route-policy fbyewu permit node 20 # ip ip-prefix zbyewu index 10 permit 10.1.2.0 24 ip ip-prefix zbyewu index 20 permit 10.1.4.0 24 ip ip-prefix fbyewu index 10 permit 10.2.2.0 24 ip ip-prefix fbyewu index 20 permit 10.2.4.0 24
3.R4_OSPF配置
ospf 1 router-id 4.4.4.4 import-route ospf 2 type 1 route-policy fbbg area 0.0.0.0 network 10.1.24.0 0.0.0.255 network 10.1.34.0 0.0.0.255 # ospf 2 router-id 4.4.4.4 import-route ospf 1 route-policy zbbg area 0.0.0.1 network 10.1.45.0 0.0.0.255 network 10.1.47.0 0.0.0.255
4.R4_ 路由策略
# route-policy zbbg permit node 10 if-match ip-prefix zbbg apply cost 10 # route-policy zbbg permit node 20 # route-policy fbbg permit node 10 if-match ip-prefix fbbg apply cost 10 # route-policy fbbg permit node 20 # ip ip-prefix zbbg index 10 permit 10.1.1.0 24 ip ip-prefix zbbg index 20 permit 10.1.3.0 24 ip ip-prefix fbbg index 10 permit 10.2.1.0 24 ip ip-prefix fbbg index 20 permit 10.2.3.0 24