HuaWei ❀ 对接收和发布的路由进行过滤

网友投稿 520 2022-11-24

HuaWei ❀ 对接收和发布的路由进行过滤

HuaWei ❀ 对接收和发布的路由进行过滤

对接收和发布的路由进行过滤

配置接口IP地址:

[r1]int g0/0/0[r1-GigabitEthernet0/0/0]ip address 12.1.1.1 24

配置OSPF协议:

[r1]ospf 100 router-id 1.1.1.1[r1-ospf-100]area 0[r1-ospf-100-area-0.0.0.0]network 13.1.1.0 0.0.0.255[r2]ospf 100 router-id 2.2.2.2[r2-ospf-100]area 0[r2-ospf-100-area-0.0.0.0]network 23.1.1.0 0.0.0.255[r3]ospf 100 router-id 3.3.3.3[r3-ospf-100]area 0[r3-ospf-100-area-0.0.0.0]network 13.1.1.0 0.0.0.255[r3-ospf-100-area-0.0.0.0]network 23.1.1.0 0.0.0.255[r3-ospf-100-area-0.0.0.0]network 34.1.1.0 0.0.0.255[r4]ospf 100 router-id 4.4.4.4[r4-ospf-100]area 0[r4-ospf-100-area-0.0.0.0]network 34.1.1.0 0.0.0.255

配置静态路由并引入OSPF协议中:

[r4]ip route-static 10.1.1.1 24 NULL 0[r4]ip route-static 10.1.2.1 24 NULL 0[r4]ip route-static 10.1.3.1 24 NULL 0[r4]ip route-static 10.1.4.1 24 NULL 0[r4]ospf 100[r4-ospf-100]import-route static

查看原始路由信息:

[r1]display ip routing-table protocol ospf Route Flags: R - relay, D - download to fib------------------------------------------------------------------------------Public routing table : OSPF Destinations : 6 Routes : 6 OSPF routing table status : Destinations : 6 Routes : 6Destination/Mask Proto Pre Cost Flags NextHop Interface 10.1.1.0/24 O_ASE 150 1 D 13.1.1.2 GigabitEthernet0/0/0 10.1.2.0/24 O_ASE 150 1 D 13.1.1.2 GigabitEthernet0/0/0 10.1.3.0/24 O_ASE 150 1 D 13.1.1.2 GigabitEthernet0/0/0 10.1.4.0/24 O_ASE 150 1 D 13.1.1.2 GigabitEthernet0/0/0 23.1.1.0/24 OSPF 10 2 D 13.1.1.2 GigabitEthernet0/0/0 34.1.1.0/24 OSPF 10 2 D 13.1.1.2 GigabitEthernet0/0/0OSPF routing table status : Destinations : 0 Routes : 0

配置前缀列表:

[r4]ip ip-prefix aaa index 5 permit 10.1.1.1 24[r4]ip ip-prefix aaa index 10 permit 10.1.2.1 24[r4]ip ip-prefix aaa index 15 permit 10.1.3.1 24[r4]ospf 100[r4-ospf-100]filter-policy ip-prefix aaa export static[r1]ip ip-prefix aaa index 5 permit 10.1.1.1 24[r1]ospf 100[r1-ospf-100]filter-policy ip-prefix aaa import

查看R3配置后的路由信息:

[r3]display ip routing-table protocol ospf Route Flags: R - relay, D - download to fib------------------------------------------------------------------------------Public routing table : OSPF Destinations : 3 Routes : 3 OSPF routing table status : Destinations : 3 Routes : 3Destination/Mask Proto Pre Cost Flags NextHop Interface 10.1.1.0/24 O_ASE 150 1 D 34.1.1.2 GigabitEthernet0/0/2 10.1.2.0/24 O_ASE 150 1 D 34.1.1.2 GigabitEthernet0/0/2 10.1.3.0/24 O_ASE 150 1 D 34.1.1.2 GigabitEthernet0/0/2OSPF routing table status : Destinations : 0 Routes : 0

查看R1配置后的路由信息:

[r1]display ip routing-table protocol ospf Route Flags: R - relay, D - download to fib------------------------------------------------------------------------------Public routing table : OSPF Destinations : 1 Routes : 1 OSPF routing table status : Destinations : 1 Routes : 1Destination/Mask Proto Pre Cost Flags NextHop Interface 10.1.1.0/24 O_ASE 150 1 D 13.1.1.2 GigabitEthernet0/0/0OSPF routing table status : Destinations : 0 Routes : 0

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:详解MybatisPlus3.4版本之后分页插件的使用
下一篇:HuaWei ❀ 配置GRE Over IPv4
相关文章

 发表评论

暂时没有评论,来抢沙发吧~