您的位置:首页 > 电脑网络 > 电脑配件 > 双点双向重发布(OSPF+EIGRP)

双点双向重发布(OSPF+EIGRP)

luyued 发布于 2011-04-25 13:08   浏览 N 次  


en

conf t

no ip do lo

line con 0

exec-t 0

logg sy

ho R //在各个路由器上标上标号

基本配置:

R1>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

int s1/0

Ip add 192.168.12.1 255.255.255.0

no shu

int s1/1

ip add 192.168.13.1 255.255.255.0

no shu

int lo 0

ip add 1.1.1.1 255.255.255.255

R2:>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

int s1/0

ip add 192.168.12.2 255.255.255.0

no shu

int f0/0

ip add 192.1.1.2 255.255.255.0

no shu


R3:>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

int s1/1

ip add 192.168.13.3 255.255.255.0

no shu

int f0/0

ip add 192.1.1.3 255.255.255.0

no shu

R5:>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

int lo0

ip add 5.5.5.5 255.255.255.0

int f0/0

ip add 192.1.1.5 255.255.255.0

no shu

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

要求:R5和R1的loopback口通过重宣告直连引进路由协议。R2和R3做双点双向重宣告,最终R5到1.1.1.1 以及R1到5.5.5.5都可以负载均衡。

通过两种方法实现:

方法一、修改协议管理距离

方法二、不修改管理距离通过路由过滤实现。

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

R1上重宣告直连

router ospf 1

log-adjacency-changes

redistribute connected subnets

network 192.168.12.0 0.0.0.255 area 0

network 192.168.13.0 0.0.0.255 area 0

R5上重宣告直连

router eigrp 1

redistribute connected

network 192.1.1.0

no auto-summary

R2;

router os 1

net 192.168.12.0 0.0.0.255 a 0

re eig 1 su

router eig 1

net 192.1.1.0

re os 1 me 10000 100 255 1 1500

R3;

router os 1

net 192.168.13.0 0.0.0.255 a 0

re eig 1 su

router eig 1

net 192.1.1.0

re os 1 me 10000 100 255 1 1500

刚配置完双点双向重发布时R1\R5上的show ip route分别为:

C 192.168.12.0/24 is directly connected, Serial1/0

1.0.0.0/32 is subnetted, 1 subnets

C 1.1.1.1 is directly connected, Loopback0

C 192.168.13.0/24 is directly connected, Serial1/1

5.0.0.0/24 is subnetted, 1 subnets

O E2 5.5.5.0 [110/20] via 192.168.12.2, 00:01:03, Serial1/0

O E2 192.1.1.0/24 [110/20] via 192.168.12.2, 00:01:03, Serial1/0

[110/20] via 192.168.13.3, 00:01:03, Serial1/1

---------------------------------------------------------------------

D EX 192.168.12.0/24 [170/284160] via 192.1.1.3, 00:00:10, FastEthernet0/0

[170/284160] via 192.1.1.2, 00:00:10, FastEthernet0/0

1.0.0.0/32 is subnetted, 1 subnets

D EX 1.1.1.1 [170/284160] via 192.1.1.3, 00:00:10, FastEthernet0/0

[170/284160] via 192.1.1.2, 00:00:10, FastEthernet0/0

D EX 192.168.13.0/24 [170/284160] via 192.1.1.3, 00:00:10, FastEthernet0/0

[170/284160] via 192.1.1.2, 00:00:10, FastEthernet0/0

5.0.0.0/24 is subnetted, 1 subnets

C 5.5.5.0 is directly connected, Loopback0

C 192.1.1.0/24 is directly connected, FastEthernet0/0

方法一:修改协议管理距离。

在R2上配置:

router eigrp 1

redistribute ospf 1 metric 10000 100 255 1 1500

network 192.1.1.0

no auto-summary


router ospf 1

log-adjacency-changes

redistribute eigrp 1 subnets

network 192.168.12.0 0.0.0.255 area 0

distance 180 0.0.0.0 255.255.255.255 1

access-list 1 permit 5.5.5.0 0.0.0.255

在R3上配置:

router eigrp 1

redistribute ospf 1 metric 10000 100 255 1 1500

network 192.1.1.0

no auto-summary

router ospf 1

log-adjacency-changes

redistribute eigrp 1 subnets

network 192.168.13.0 0.0.0.255 area 0

distance 180 0.0.0.0 255.255.255.255 1

access-list 1 permit 5.5.5.0 0.0.0.255


配置后R1\R5上的show ip route为: //实现了1.1.1.1和5.5.5.5双向的负载均衡

C 192.168.12.0/24 is directly connected, Serial1/0

1.0.0.0/32 is subnetted, 1 subnets

C 1.1.1.1 is directly connected, Loopback0

C 192.168.13.0/24 is directly connected, Serial1/1

5.0.0.0/24 is subnetted, 1 subnets

O E2 5.5.5.0 [110/20] via 192.168.12.2, 00:00:05, Serial1/0

[110/20] via 192.168.13.3, 00:00:05, Serial1/1

O E2 192.1.1.0/24 [110/20] via 192.168.12.2, 00:00:05, Serial1/0

[110/20] via 192.168.13.3, 00:00:05, Serial1/1

-----------------------------------------------------------------

D EX 192.168.12.0/24 [170/284160] via 192.1.1.3, 00:00:02, FastEthernet0/0

[170/284160] via 192.1.1.2, 00:00:02, FastEthernet0/0

1.0.0.0/32 is subnetted, 1 subnets

D EX 1.1.1.1 [170/284160] via 192.1.1.3, 00:00:02, FastEthernet0/0

[170/284160] via 192.1.1.2, 00:00:02, FastEthernet0/0

D EX 192.168.13.0/24 [170/284160] via 192.1.1.2, 00:00:02, FastEthernet0/0

[170/284160] via 192.1.1.3, 00:00:02, FastEthernet0/0

5.0.0.0/24 is subnetted, 1 subnets

C 5.5.5.0 is directly connected, Loopback0

C 192.1.1.0/24 is directly connected, FastEthernet0/0


方法二:使用路由过滤(分发列表)

将之前改动过的AD值no掉。

在R2上:

router ospf 1

log-adjacency-changes

redistribute eigrp 1 subnets

network 192.168.12.0 0.0.0.255 area 0

distribute-list 1 in Serial1/0

!

!

access-list 1 deny 5.5.5.0 0.0.0.255

access-list 1 permit any

在R3上:

router ospf 1

log-adjacency-changes

redistribute eigrp 1 subnets

network 192.168.12.0 0.0.0.255 area 0

distribute-list 1 in Serial1/0

!

!

access-list 1 deny 5.5.5.0 0.0.0.255

access-list 1 permit any

图文资讯
广告赞助商