双点重发布实验

双点重发布实验

拓扑图

在这里插入图片描述

实验目的
  1. 使用双点双向重发布
  2. 所有路由器进行最佳选路
  3. 存在备份路径,不得出现环路和路由回馈
实验步骤
1.配置IP
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.12.1 24
[R1-GigabitEthernet0/0/0]int g 0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.13.1 24
[R1-GigabitEthernet0/0/1]int l 0
[R1-LoopBack0]ip add 1.1.1.1 24
 
[R2]int g 0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.12.2 24
[R2-GigabitEthernet0/0/0]int g 0/0/1
[R2-GigabitEthernet0/0/1]ip add 192.168.24.2 24
 
[R3]int g 0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.13.3 24
[R3-GigabitEthernet0/0/0]int g 0/0/1
[R3-GigabitEthernet0/0/1]ip add 192.168.34.3 24
 
[R4]int g 0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.24.4 24
[R4-GigabitEthernet0/0/0]int g 0/0/1
[R4-GigabitEthernet0/0/1]ip add 192.168.34.4 24
2.配置OSPF
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]a 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
[R2-ospf-1]a 0
[R2-ospf-1-area-0.0.0.0]network 192.168.12.2 0.0.0.0
 
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]a 0
[R3-ospf-1-area-0.0.0.0]network 192.168.13.3 0.0.0.0
3.配置RIP
[R2]rip 1
[R2-rip-1]version 2
[R2-rip-1]network 192.168.24.0
 
[R3]rip 1
[R3-rip-1]version 2
[R3-rip-1]network 192.168.34.0
 
[R4]rip 1
[R4-rip-1]version 2
[R4-rip-1]network 192.168.24.0
[R4-rip-1]network 192.168.34.0
4.将R1环回加入OSPF
[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
[R1-route-policy]q
[R1]ospf 1
[R1-ospf-1]import-route direct route-policy aa
5.R2 R3进行双向重发布
[R2]ospf 1
[R2-ospf-1]import-route rip 1
[R2-ospf-1]q
[R2]rip 1
[R2-rip-1]import-route ospf 1
 
[R3]ospf 1
[R3-ospf-1]import-route rip 1
[R3-ospf-1]q
[R3]rip 1
[R3-rip-1]import-route ospf 1
6.对R4选路进行优化
[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 90
[R2-route-policy]q
[R2]ospf 1
[R2-ospf-1]preference ase route-policy aa
 
[R3]ip ip-prefix aa permit 1.1.1.0 24
[R3]route-policy aa permit node 10
[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

[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 g 0/0/0
[R4-GigabitEthernet0/0/0]rip metricin 2001 5
[R4-GigabitEthernet0/0/0]q
[R4]int g 0/0/1
[R4-GigabitEthernet0/0/1]rip metricin 2000 5
7.对R1优化
[R2]ip ip-prefix bb deny 192.168.34.0 24
[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]ip ip-prefix bb deny 192.168.24.0 24
[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 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值