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

一、实验拓扑:
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,如何解决?
解决:R4在RIP进程下调小AD值,修改为:109;不带ACL会使得12.1.1.0网段AD值也被修改,带ACL可以单独修改24.1.1.0网段;
4、②R4在RIP进程里重分发OSPF:
Note:一般高优先级到低优先级不会有问题,但是低到高有是有问题的;

5、③R1在RIP进程里重分发OSPF:

6、④R4在OSPF进程里重分发RIP:
问题:R1到12.1.1.0网段的路径:R3——>R1——>R4,如何解决?
解决:
方法1:R1在OSPF进程下调大AD值,修改为:121;不带ACL会使得所有OSPF路由条目都变为121,带ACL可以单独修改网段;
方法2:R1在OSPF进程下部署distance ospf external 130 ,这个只是更改外部进来路由的AD值

三、命令部署:
1、将R1的f1/0接口、R3的f0/0,f1/0接口、R4的f1/0,接口环回口修改为P-T-P模式:
R1(config-if)#int f1/0
R1(config-if)#ip ospf network point-to-point

R3(config)#int f0/0
R3(config-if)#ip ospf network point-to-point
R3(config-if)#int f1/0
R3(config-if)#ip ospf network point-to-point

R4(config)#int f1/0
R4(config-if)#ip ospf network point-to-point
2、重分发:
①R1在OSPF进程里重分发RIP:
R1(config)#router ospf 110
R1(config-router)#redistribute rip subnets

解决:R4在RIP进程部署命令修改AD值:
R4(config)#router rip
R4(config-router)#distance 109 24.1.1.2 255.255.255.255

②R4在RIP进程里重分发OSPF:
R4(config)#router rip
R4(config-router)#redistribute ospf 110 metric 11

③R1在RIP进程里重分发OSPF
R1(config)#router rip
R1(config-router)#redistribute ospf 110 metric 11

④R4在OSPF进程里重分发RIP
R4(config)#router ospf 110
R4(config-router)#redistribute rip subnets
解决:R1在RIP进程部署命令修改AD值:
方法1:R1部署
R1(config)#router ospf 110
R1(config-router)#distance 121 4.4.4.4 255.255.255.255
方法2:R4部署
R1(config)#router ospf 110
R1(config-router)#no distance 121 0.0.0.0 255.255.255.255
R1(config-router)#distance ospf external 130

3、R2、R3有很多负载均衡,分别在R1、R4部署调整方法:
R1(config)#access-list 13 permit 13.1.1.0 0.0.0.255
R1(config-route-map)#route-map otr permit 10
R1(config-route-map)#match ip address 13
R1(config-route-map)#set metric 5
R1(config-route-map)#route-map otr permit 1000

R1(config)#access-list 34 permit 34.1.1.0 0.0.0.255
R1(config)#route-map otr permit 20
R1(config-route-map)#match ip address
R1(config-route-map)#set metric 12

R1(config)#access-list 40 permit 4.4.4.0 0.0.0.255
R1(config)#route-map otr permit 30
R1(config-route-map)#match ip address
R1(config-route-map)#set metric 12

R1(config)#router rip
R1(config-router)#redistribute ospf 110 route-map otr //重分发时调用

R4(config)#access-list 12 permit 12.1.1.0 0.0.0.255
R4(config)#access-list 10 permit 1.1.1.0 0.0.0.255
R4(config)#access-list 24 permit 24.1.1.0 0.0.0.255

R4(config)#route-map rto permit 12
R4(config-route-map)#match ip address 12
R4(config-route-map)#set metric 21

R4(config-route-map)#route rto permit 10
R4(config)#route-map rto permit 10
R4(config-route-map)#match ip address 10
R4(config-route-map)#set metric 21

R4(config-route-map)#route-map rto permit 24
R4(config-route-map)#match ip address 24
R4(config-route-map)#set metric 19
R4(config-route-map)#route-map rto permit 1000
R4(config)#router ospf 110
R4(config-router)#redistribute rip subnets route-map rto
四、验证:
1、做完①问题:
R4#show ip route
O E2 2.2.2.0 [110/20] via 34.1.1.3, 00:00:13, FastEthernet1/0
3.0.0.0/32 is subnetted, 1 subnets
R4部署命令后:
R4#show ip route
R 1.1.1.0 [109/2] via 24.1.1.2, 00:00:18, FastEthernet0/0
R 2.2.2.0 [109/1] via 24.1.1.2, 00:00:18, FastEthernet0/0
R 12.1.1.0 [109/1] via 24.1.1.2, 00:00:21, FastEthernet0/0
13.0.0.0/24 is subnetted, 1 subnets

2、做完④问题:
R1#show ip route
O E2 2.2.2.0 [110/20] via 13.1.1.3, 00:01:04, FastEthernet1/0
O E2 24.1.1.0 [110/20] via 13.1.1.3, 00:01:05, FastEthernet1/0

R1部署方法1命令后:
R1#show ip route
34.0.0.0/24 is subnetted, 1 subnets
O 34.1.1.0 [121/2] via 13.1.1.3, 00:00:51, FastEthernet1/0
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
2.0.0.0/24 is subnetted, 1 subnets
R 2.2.2.0 [120/1] via 12.1.1.2, 00:00:10, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [121/2] via 13.1.1.3, 00:00:51, FastEthernet1/0
4.0.0.0/24 is subnetted, 1 subnets
O 4.4.4.0 [121/3] via 13.1.1.3, 00:00:51, FastEthernet1/0
24.0.0.0/24 is subnetted, 1 subnets
R 24.1.1.0 [120/1] via 12.1.1.2, 00:00:11, FastEthernet0/0
12.0.0.0/24 is subnetted, 1 subnets
R1部署方法2命令后:
R1#show ip route //正在选路
O E2 2.2.2.0 [130/20] via 13.1.1.3, 00:00:18, FastEthernet1/0
3.0.0.0/32 is subnetted, 1 subnets
O E2 24.1.1.0 [130/20] via 13.1.1.3, 00:00:20, FastEthernet1/0
12.0.0.0/24 is subnetted, 1 subnets

R1#show ip route //选路完毕
R 2.2.2.0 [120/1] via 12.1.1.2, 00:00:00, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
R 24.1.1.0 [120/1] via 12.1.1.2, 00:00:01, FastEthernet0/0
12.0.0.0/24 is subnetted, 1 subnets
3、R1、R4未做部署前,R2、R3负载均衡路由:
R2#show ip route
R 34.1.1.0 [120/11] via 24.1.1.4, 00:00:09, FastEthernet1/0
[120/11] via 12.1.1.1, 00:00:22, FastEthernet0/0

R 4.4.4.0 [120/11] via 24.1.1.4, 00:00:11, FastEthernet1/0
[120/11] via 12.1.1.1, 00:00:24, FastEthernet0/0

R 13.1.1.0 [120/11] via 24.1.1.4, 00:00:12, FastEthernet1/0
[120/11] via 12.1.1.1, 00:00:25, FastEthernet0/0
R3#show ip route
O E2 1.1.1.0 [110/20] via 34.1.1.4, 00:28:06, FastEthernet1/0
[110/20] via 13.1.1.1, 00:28:06, FastEthernet0/0

O E2 24.1.1.0 [110/20] via 34.1.1.4, 00:07:43, FastEthernet1/0
[110/20] via 13.1.1.1, 00:07:43, FastEthernet0/0

O E2 12.1.1.0 [110/20] via 34.1.1.4, 00:28:22, FastEthernet1/0
[110/20] via 13.1.1.1, 00:28:22, FastEthernet0/0
R1、R4分别部署命令后:
R2#show ip route
R 34.1.1.0 [120/11] via 24.1.1.4, 00:00:04, FastEthernet1/0
R 4.4.4.0 [120/11] via 24.1.1.4, 00:00:04, FastEthernet1/0
R 13.1.1.0 [120/5] via 12.1.1.1, 00:00:14, FastEthernet0/0

R3#show ip route
O E2 1.1.1.0 [110/20] via 13.1.1.1, 00:02:00, FastEthernet0/0
O E2 24.1.1.0 [110/19] via 34.1.1.4, 00:02:01, FastEthernet1/0
O E2 12.1.1.0 [110/20] via 13.1.1.1, 00:02:03, FastEthernet0/0
58-高级路由:双点双向重分发

猜你喜欢

转载自blog.51cto.com/13856092/2138507