重发布实验

文章描述了路由器r1、r2、r3和r4的网络配置,包括OSPF和RIP路由协议的设置,如router-id、area和network。同时,路由器r1和r2应用了ACL和route-policy来控制路由信息的导入和成本。
摘要由CSDN通过智能技术生成

基础配置:

[r1]int l0
[r1-LoopBack0]ip add 1.1.1.1 24
[r1-LoopBack0]int g0/0/0
[r1-GigabitEthernet0/0/0]ip ad 192.168.12.1 24
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.123.1 24 
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 0 
[r1-ospf-1-area-0.0.0.0]network 192.168.12.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 192.168.13.1 0.0.0.0


[r2]ospf 1 router-id 2.2.2.2
Info: The configuration succeeded. You need to restart the OSPF process to valid
ate the new router ID.
[r2-ospf-1]area 0   
[r2-ospf-1-area-0.0.0.0]network 192.168.12.2 0.00.0.0

[r2]rip 
[r2-rip-1]v 2 
[r2-rip-1]network 192.168.24.0

[r3-ospf-1]ospf 1 rout 3.3.3.3
Info: The configuration succeeded. You need to restart the OSPF process to valid
ate the new router ID.
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 192.168.13.1 0.0.0.0
[r3-ospf-1-area-0.0.0.0]q
[r3-ospf-1]rip 
[r3-rip-1]v 2
[r3-rip-1]network 192.168.34.0
 

[r4]rip
[r4-rip-1] v 2
[r4-rip-1]network 192.168.24.0
[r4-rip-1]network 192.168.34.0

路由策略:

[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.12.1 0
[r1-acl-basic-2000]rule permit source 192.168.13.1 0
[r1-acl-basic-2000]q
[r1]route-policy direct-ospf deny node 10
Info: New Sequence of this List.
[r1-route-policy]if-match acl 2000
[r1]route-policy direct-ospf permit node 20
Info: New Sequence of this List.
[r1-route-policy]ospf 1
[r1-ospf-1]import-route  direct 
 

[r2]acl 2000 
[r2-acl-basic-2000]rule permit source 192.168.13.0 0
[r2-acl-basic-2000]q
[r2]route-policy ospf- rip permit node 10
[r2]route-policy ospf-rip permit node 1
Info: New Sequence of this List.
[r2-route-policy]if-match acl 2000  
[r2-route-policy]apply cost 2  
[r2]route-policy ospf-rip permit node 20
Info: New Sequence of this List.
[r2-route-policy]q
[r2]rip 1
[r2-rip-1]import-route ospf 1 route-policy  ospf-rip
 

路由表:

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值