ospf与rip双点双向重分布
- 格式:docx
- 大小:106.90 KB
- 文档页数:7
Ospf与rip 双点双向充分部
拓扑图如下:
在如上拓扑图中做双点双向重分布,会存在一下问题:
1.在路由器R1、R2的路由表中,R3环回口的3.3.3.0可能通过左边rip学到,也可能通过
右边ospf学到。
原因分析:R2通过rip学到3.3.3.0后,通过重分布,3.3.3.0进入右边ospf区域中,R1上会通过两个方向学到3.3.3.0(1从左边rip,2从右边ospf),此时R1会根据管理距离(即AD)比较,rip默认管理距离120,ospf默认管理距离110.因此,R1会把从右边ospf 学到的3.3.3.0加入路由表中,因此,R1的路由表中3.3.3.0 的路由前面是O而不是R。
2.在R3上,ospf区域中的所有路由都会负载均衡。这些路由包括:1.1.1.0 ,14.1.1.0,
4.4.4.0,24.1.1.0,2.2.2.0.而实际上我们只需要对4..4.4.0做负载均衡。其它的都会浪费
资源。比如R1上的环回口1.1.1.0,R3可以走R3->R2->R4->R1,也可以走R3->R1,很明显前面的路径是次优路径。
原因分析:因为R1,R2上都有ospf整个区域内的完整路由,而重分布进rip时,对于R3来说,ospf区域的路由的metric都是1,因此在R3上会对ospf区域中的所有路由负载均衡。
3 同R3上的情况一样,R4也会对rip中的所有路由负载均衡,原因同上。
1.问题1:在R1、R2上修改ospf的AD>120或修改rip的AD<110。
2.问题2、3:在R1、R2上修改相应路由的metric。
如下为R1、R2、R3、R4上的完整配置:
hostname R1
interface Loopback0
ip address 1.1.1.1 255.255.255.0
ipospf network point-to-point
!
interface Serial0/0
ip address 13.1.1.1 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
ip address 14.1.1.1 255.255.255.0
serial restart-delay 0
!
interface Serial0/2
noip address
shutdown
serial restart-delay 0
!
interface Serial0/3
noip address
shutdown
serial restart-delay 0
!
interface FastEthernet1/0
noip address
shutdown
duplex auto
speed auto
!
routerospf 1
router-id 11.1.1.1
log-adjacency-changes
redistribute rip metric 1000 metric-type 1 subnets route-map intoospf network 1.1.1.0 0.0.0.255 area 0
network 14.1.1.0 0.0.0.255 area 0
distance 125 22.2.2.2 0.0.0.0 1
!
version 2
redistributeospf 1 metric 5 route-map intorip network 13.0.0.0
no auto-summary
!
noip http server
ip classless
!
!
!
ip access-list standard r1
permit 2.2.2.0
permit 24.1.1.0
!
access-list 1 permit 3.3.3.0
access-list 1 permit 23.1.1.0
access-list 23 permit 23.1.1.0
route-mapintoospf permit 10
matchip address 23
set metric 1100
!
route-mapintoospf permit 20
!
route-mapintorip permit 10
matchip address r1
set metric 8
!
route-mapintorip permit 20
hostname R2
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
ipospf network point-to-point
!
interface Serial0/0
ip address 24.1.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
ip address 23.1.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial0/2
noip address
shutdown
serial restart-delay 0
!
interface Serial0/3
noip address
shutdown
serial restart-delay 0
!
interface FastEthernet1/0
noip address
shutdown
duplex auto
speed auto
!
routerospf 1
router-id 22.2.2.2
log-adjacency-changes
redistribute rip metric 1000 metric-type 1 subnets route-map intoospf network 2.2.2.0 0.0.0.255 area 0
network 24.1.1.0 0.0.0.255 area 0
distance 125 11.1.1.1 0.0.0.0 1
!
router rip
version 2
redistributeospf 1 metric 5 route-map intorip
network 23.0.0.0
no auto-summary
!
noip http server
ip classless
!
!
!
ip access-list standard r2
permit 1.1.1.0
permit 14.1.1.0
!