HCIP 第四天
1.进行基础配置 左边RIP 右边OSPF
在R2和R4上进行重发布
[Huawei]ospf 100
[Huawei-ospf-100]import-route rip 1
[Huawei]rip 1
[Huawei-rip-1]import-route ospf 100
2.使用路由策略进行优化
1、偏移列表----在rip或EIGRP工作时,基于控制层面的流量,在其进出时进行增加;可以叠加生效;只能使用ACL来抓取流量; 华为都可以
[R2]ip ip-prefix xx permit 4.4.4.4 32
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]rip metricout ip-prefix xx 5
2、分发列表—在控制层面流量的进出的接口上限制条目的传递; ACL和前缀列表均可使用
[R2]ip ip-prefix xx deny 14.1.1.0 24
[R2]ip ip-prefix xx permit 0.0.0.0 0 less-equal 32
[R2]rip 1
[R2-rip-1]filter-policy ip-prefix xx export g0/0/0
3、route-map 主要在重发布、PBR(强制下一跳)、BGP选路时提供策略可以搭配ACL和前缀列表工作
[Huawei]ip ip-prefix hh permit 12.1.1.0 24
[Huawei]route-policy oo deny node 10
Info: New Sequence of this List.
[Huawei-route-policy]if-match ip-prefix hh
[Huawei-route-policy]quit
[Huawei]route-policy oo permit node 20
Info: New Sequence of this List.
[Huawei-route-policy]quit
[Huawei]rip 1
[Huawei-rip-1]import-route ospf 100 route-policy oo
修改cost值
[Huawei]ip ip-prefix vv permit 3.3.3.3 32
[Huawei]route-policy ww permit node 10
Info: New Sequence of this List.
[Huawei-route-policy]if-match ip-prefix vv
[Huawei-route-policy]apply cost 5
[Huawei]ospf 100
[Huawei-ospf-100]import-route rip 1 route-policy ww
查看R1 R3 路由表