ospf与rip双点双向重分发实验-实现负载均衡

本次实验,路由器,思科的网络设备
拓扑如下(比较简单):

首先是动态路由协议配置及ip配置
-----------1
en
conf t
router ospf 1
router-id 1.1.1.1
netw 192.168.12.1 0.0.0.0 area 0
exit
router rip
ver 2
no aut
netwo 192.168.14.0
exit
--------------2
en
conf t
int l0
ip add 2.2.2.2 255.255.255.0
ip ospf net point-to-po
router ospf 1
router-id 2.2.2.2
network 192.168.12.2 0.0.0.0 area 0
netwo 192.168.23.2 0.0.0.0 area 0
netw 2.2.2.0 0.0.0.255 area 0
exit
---------------3
en
conf t
router ospf 1
router-id 3.3.3.3
netw 192.168.23.3 0.0.0.0 area 0
exit
router rip
ver 2
no aut
netwo 192.168.34.0
exit
--------4
en
conf t
router rip
ver 2
no aut
netw 192.168.34.0
netwo 192.168.14.0
netwo 4.4.4.0
exit
ip 地址配置:2.2.2.2是R2 4.4.4.4是R4
主要查看3和1路由器中路由表的变化

接下来是重发布,首先将AD值小的ospf重发布到AD值大的RIP中去
====================================ospf-rip

-------------------1
en
conf t
router rip
redistribute ospf 1 metric 2
end
wr
------------------3
en
conf t
router rip
red ospf 1 met 2
end
wr

====================================
其次将rip重发布到ospf中去
=====================================rip-ospf

---------------------1
en
conf t
router ospf 1
red rip subn
end
wr

---------------------3
R3#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  2.0.0.0/24 is subnetted, 1 subnets

O 2.2.2.0 [110/65] via 192.168.23.2, 00:19:37, Serial1/1
4.0.0.0/24 is subnetted, 1 subnets
O E2 4.4.4.0 [110/20] via 192.168.23.2, 00:06:34, Serial1/1
O 192.168.12.0/24 [110/128] via 192.168.23.2, 00:19:37, Serial1/1
O E2 192.168.14.0/24 [110/20] via 192.168.23.2, 00:06:34, Serial1/1
192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.23.0/24 is directly connected, Serial1/1
L 192.168.23.3/32 is directly connected, Serial1/1
192.168.34.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.34.0/24 is directly connected, Serial1/0
L 192.168.34.3/32 is directly connected, Serial1/0

====1上进行重发布,发现3上路由表出现了次优路径的情况,去忘4.4.4.0网段
然后3上修改AD值
++++++

en
conf t
acc 4 per 4.4.4.0
router rip
dista 100 192.168.34.4 0.0.0.0 4
end

+++++
R3#
R3#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  2.0.0.0/24 is subnetted, 1 subnets

O 2.2.2.0 [110/65] via 192.168.23.2, 00:21:53, Serial1/1
4.0.0.0/24 is subnetted, 1 subnets
R 4.4.4.0 [100/1] via 192.168.34.4, 00:00:19, Serial1/0
O 192.168.12.0/24 [110/128] via 192.168.23.2, 00:21:53, Serial1/1
O E2 192.168.14.0/24 [110/20] via 192.168.23.2, 00:08:50, Serial1/1
192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.23.0/24 is directly connected, Serial1/1
L 192.168.23.3/32 is directly connected, Serial1/1
192.168.34.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.34.0/24 is directly connected, Serial1/0
L 192.168.34.3/32 is directly connected, Serial1/0
R3#
R3#
再次查看路由表,发现次优路径问题在
上已经修正
但因为是双点双向重发布,所以3上也需要配置重发布
-+-+-+-+-+-+-++--
en
conf t
router ospf 1
red rip subn
end
wr

配置完成后,查看R1的路由表
R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  2.0.0.0/24 is subnetted, 1 subnets

O 2.2.2.0 [110/65] via 192.168.12.2, 00:27:10, Serial1/0
4.0.0.0/24 is subnetted, 1 subnets
O E2 4.4.4.0 [110/20] via 192.168.12.2, 00:00:18, Serial1/0
192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.12.0/24 is directly connected, Serial1/0
L 192.168.12.1/32 is directly connected, Serial1/0
192.168.14.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.14.0/24 is directly connected, Serial1/1
L 192.168.14.1/32 is directly connected, Serial1/1
O 192.168.23.0/24 [110/128] via 192.168.12.2, 00:27:34, Serial1/0
O E2 192.168.34.0/24 [110/20] via 192.168.12.2, 00:00:18, Serial1/0
R1#
R1#
R1#

我们发现1上也出现了关于4.4.4.0网段的次优路径问题

此时我们将1的来自4.4.4.0的路由的AD值修改
-------1
en
conf t
acc 4 per 4.4.4.0
router rip
dista 100 192.168.14.4 0.0.0.0 4
end

此时我们再次查看1的路由表

R1#show ip route

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  2.0.0.0/24 is subnetted, 1 subnets

O 2.2.2.0 [110/65] via 192.168.12.2, 00:32:27, Serial1/0
4.0.0.0/24 is subnetted, 1 subnets
R 4.4.4.0 [100/1] via 192.168.14.4, 00:00:02, Serial1/1
192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.12.0/24 is directly connected, Serial1/0
L 192.168.12.1/32 is directly connected, Serial1/0
192.168.14.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.14.0/24 is directly connected, Serial1/1
L 192.168.14.1/32 is directly connected, Serial1/1
O 192.168.23.0/24 [110/128] via 192.168.12.2, 00:32:51, Serial1/0
O E2 192.168.34.0/24 [110/20] via 192.168.12.2, 00:05:35, Serial1/0
R1#
R1#
R1#

发现次优路径问题也修正完成
然后查看网络中其他设备的路由表

R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 2.2.2.0/24 is directly connected, Loopback0
L 2.2.2.2/32 is directly connected, Loopback0
4.0.0.0/24 is subnetted, 1 subnets
O E2 4.4.4.0 [110/20] via 192.168.23.3, 00:05:52, Serial1/1
[110/20] via 192.168.12.1, 00:00:19, Serial1/0
192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.12.0/24 is directly connected, Serial1/0
L 192.168.12.2/32 is directly connected, Serial1/0
O E2 192.168.14.0/24 [110/20] via 192.168.12.1, 00:18:17, Serial1/0
192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.23.0/24 is directly connected, Serial1/1
L 192.168.23.2/32 is directly connected, Serial1/1
O E2 192.168.34.0/24 [110/20] via 192.168.23.3, 00:05:52, Serial1/1
R2#
R2#
R2#
R2#

R3#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  2.0.0.0/24 is subnetted, 1 subnets

O 2.2.2.0 [110/65] via 192.168.23.2, 00:31:12, Serial1/1
4.0.0.0/24 is subnetted, 1 subnets
R 4.4.4.0 [100/1] via 192.168.34.4, 00:00:01, Serial1/0
O 192.168.12.0/24 [110/128] via 192.168.23.2, 00:31:12, Serial1/1
O E2 192.168.14.0/24 [110/20] via 192.168.23.2, 00:18:09, Serial1/1
192.168.23.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.23.0/24 is directly connected, Serial1/1
L 192.168.23.3/32 is directly connected, Serial1/1
192.168.34.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.34.0/24 is directly connected, Serial1/0
L 192.168.34.3/32 is directly connected, Serial1/0
R3#
R3#
R3#
R3#
R3#

R4#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  2.0.0.0/24 is subnetted, 1 subnets

R 2.2.2.0 [120/2] via 192.168.34.3, 00:00:16, Serial1/0
[120/2] via 192.168.14.1, 00:00:18, Serial1/1
4.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 4.4.4.0/24 is directly connected, Loopback0
L 4.4.4.4/32 is directly connected, Loopback0
R 192.168.12.0/24 [120/2] via 192.168.34.3, 00:00:16, Serial1/0
[120/2] via 192.168.14.1, 00:00:18, Serial1/1
192.168.14.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.14.0/24 is directly connected, Serial1/1
L 192.168.14.4/32 is directly connected, Serial1/1
R 192.168.23.0/24 [120/2] via 192.168.34.3, 00:00:16, Serial1/0
[120/2] via 192.168.14.1, 00:00:18, Serial1/1
192.168.34.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.34.0/24 is directly connected, Serial1/0
L 192.168.34.4/32 is directly connected, Serial1/0
R4#
R4#
R4#
R4#

2与4之间的链路实现了负载均衡

感谢观看,希望指出问题,我对这块也只是初学者

原文地址:http://blog.51cto.com/14186275/2351059

时间: 2024-08-02 06:56:40

ospf与rip双点双向重分发实验-实现负载均衡的相关文章

58-高级路由:双点双向重分发

一.实验拓扑:二.实验要求:1.将R1的f1/0.R3的f0/0,f1/0.R4的f1/0,接口环回口修改为P-T-P模式:(加速OSPF速度,因为不需要选举DR.BDR)2.重分发规则:先顺时针重分发,然后逆时针重分发(或者反过来)①R1在OSPF进程里重分发RIP:②R4在RIP进程里重分发OSPF: ③R1在RIP进程里重分发OSPF:④R4在OSPF进程里重分发RIP: 3.①R1在OSPF进程里重分发RIP:问题:R4到24.1.1.0网段的路径:R3-->R1-->R2,如何解决?

OSPF的高级应用之路由重分发与NSSA的配置

在一个大型网络中会出现很多问题,如路由条目过多.LSDB过大.OSPF和其他路由协议如何通信等问题,需要进一步的优化和解决.这次将介绍路由重分发和NSSA区域的概念和配置. 路由重分发及配置 上次介绍了LSA5,可以讲OSPF AS外的路由通告到OSPF系统内,这是如何实现的呢? 路由重分发 路由重分发通常在那些负责从一个自治系统学习路由,然后向另一个自治系统广播的路由器上进行配置.例如:一台路由器既运行OSPF又运行RIP,如果OSPF进程被配置为通告由RIP学到的路由到OSPF自治系统中,那

双点双向重发布

双点双向重发布如图,在拓扑图中,R1,R2,R3,R5运行ospf协议,R1,R3,R4运行isis协议,在R1和R3上面,将isis和ospf双向引入,R5上引入外部路由5.0.0.5/32和5.0.0.5/32.发现在R2上ping这两个环回路由的时候,会出现环路.[R2]tracert 5.0.0.5traceroute to 5.0.0.5(5.0.0.5), max hops: 30 ,packet length: 40,press CTRL_C to break 1 23.0.0.2

双向重分发问题

步骤一: R1 在相应的接口配上IP地址,并创建一个回环口loop 0 1.1.1.1/24 router rip version 2 redistribute connected metric 5(将lo:0 重分发到rip中metric值为5) network 126.126.0.0 no auto-summary R2 在相应的接口配上IP地址 router rip version 2 network 126.126.0.0 no auto-summary router ospf 1 ne

IS-IS协议和RIP协议的路由重分发详细过程

实验步骤: 1.首先配置各个路由器的IP地址,最好把IS-IS或者RIP协议也饿一起配置了,实在不行就再多分一个步骤. 2.在R4上面做路由重分发. 3.查看路由表是否齐全. 4.打开VPCS配置IP地址,测试连通性. 下面是详细配置过程:R1上面的IP地址和IS-IS协议配置,R1只是作为L1类型的IS-IS,配置完成别忘了应用到端口. R2上面的IP地址和IS-IS协议配置,R2作为IS-IS的区域间路由需要配置为L1-L2类型. R3上面的IP地址和IS-IS协议配置,也是作为L1-L2类

简单的ISIS协议的路由重分发实验详解

先为路由器R1.R2.R3.R4配置好接口地址 R1>en R1#conf t R1(config)#int fa0/1 R1(config-if)#ip add 192.168.1.1 255.255.255.0 R1(config-if)#no shut R1(config-if)#int fa0/0 R1(config-if)#ip add 192.168.2.1 255.255.255.0 R1(config-if)#no shut R2>en R2#conf t R2(config)

28、OSPF配置实验之负载均衡

1.负载均衡解析 OSPF只支持等价负载均衡,默认为4条线路负载均衡,最大支持6条线路负载均衡,我们可以在OSPF路由进程下通过maximum-paths 6修改OSPF支持的负载均衡线路数. 2.实验拓扑 3.实验配置 R1配置 interface Loopback0 ip address 1.1.1.1 255.255.255.0 interface Ethernet0/0 ip address 192.168.0.1 255.255.255.0 interface Ethernet0/1

网络聚合CIDR、OSPF、RIP路由重分发配置实例

地址汇总配置实例,拓扑图如下所示:R2连接了多个网段地址(特别是这种连续的IP地址最是应该做网络汇总),同样R4上面也配置了很多的网段信息. R2和R1之间属于OSPF协议的AREA 1区域,R1和R3之间属于AREA 0骨干区域,R3和R4之间使用RIP协议. 四台路由器的loopback 0地址分别为1.1.1.1/32和2.2.2.2/32 和3.3.3.3/32和4.4.4.4/32. 有人跟我说我是不是把博客写的太详细了,其实我也在纠结这个事,因为毕竟太累了,一篇博客要写.要做.要截图

OSPF的rip、ospf、静态重分发及动态重分发配置

动态路由OSPF的rip.ospf.静态重分发及动态重分发实验 实验拓扑如下: R1 ip route 0.0.0.0 0.0.0.0 192.168.20.2 R2 ip route 192.168.10.0 255.255.255.0 192.168.20.1 router ospf 1 network 192.168.30.0 0.0.0.255 area 1 //宣告30网段 redistribute static subnets //重分发静态路由 R3 ip route 0.0.0.