RIP, OSPF, EIGRP在网络中的再分发_第1张图片
实验步骤:
R1/R2/R5的frame relay链路参与ospf area 0
R5/R6的s2/1链路参与EIGRP 100
R2的l0接口参与area 20
R2/R4的frame relay链路参与area 4
R1/R3的frame relay链路运行rip v2,不允许多余的接口发送rip路由
在R1实施rip和ospf的双向再发布
在R5实施eigrp到ospf的双向再发布
R4的L1口配置4.4.5.4/32,参与ospf 40
配置实例
R1
conf t
int l 0
ip ad 1.1.1.1 255.255.255.255
int s2/0
ip ad 10.1.5.1 255.255.255.0
encap f
no arp f
no frame inver
frame map ip 10.1.5.5 105 b
frame map ip 10.1.5.2 105 b
ip ospf priority 0
no shut
exit
int s 2/1
ip ad 10.1.1.1 255.255.255.0
encap f
no arp f
no frame inver
frame map ip 10.1.1.3 113 b
no shut
exit
router rip
ver 2
no au
net 10.0.0.0
passive-interface s2/0
redistribute ospf 1 metric 5
router ospf 1
router-id 1.1.1.1
net 10.1.5.1 0.0.0.0 a 0
net 1.1.1.1 0.0.0.0 a 0
nei 10.1.5.5
redistribute rip metric 100 metric-type 1 subnets
end
 
R2
conf t
int l 0
ip ad 2.2.2.2 255.255.255.255
int s2/0
ip ad 10.1.5.2 255.255.255.0
encap f
no frame inver
no arp frame
frame map ip 10.1.5.5 205 b
frame map ip 10.1.5.1 205 b
ip ospf priority 0
no shut
exit
int s2/1
ip ad 10.1.2.2 255.255.255.0
encap f
no arp f
no frame inver
frame map ip 10.1.2.4 214 b
no shut
ip ospf network point-to-point
exit
router ospf 1
router-id 2.2.2.2
net 10.1.5.2 0.0.0.0 a 0
net 2.2.2.2 0.0.0.0 a 20
net 10.1.2.2 0.0.0.0 a 4
nei 10.1.5.5
area 4 virtual-link 4.4.4.4
end
 
 
R3
conf t
int  l 0
ip ad 3.3.3.3 255.255.255.255
int s2/1
ip ad 10.1.1.3 255.255.255.0
encap f
no arp f
no frame inver
frame map ip 10.1.1.3 311 b
no shut
exit
router rip
ver 2
no au
net 3.0.0.0
net 10.0.0.0
end

R4
conf t
int l 0
ip ad 4.4.4.4 255.255.255.255
int l 1
ip ad 4.4.5.4 255.255.255.255
int s 2/1
ip ad 10.1.2.4 255.255.255.0
encap f
no arp f
no frame inver
frame map ip 10.1.2.2 412 b
no shut
ip ospf network point-to-point
router ospf 1
router-id 4.4.4.4
net 4.4.4.4 0.0.0.0 a 4
net 10.1.2.4 0.0.0.0 a 4
net 4.4.5.4 0.0.0.0 a 40
area 4 virtual-link 2.2.2.2
end

R5
conf t
int l 0
ip ad 5.5.5.5 255.255.255.255
int s2/0
ip ad 10.1.5.5 255.255.255.0
encap f
no arp f
no frame inver
frame map ip 10.1.5.1 501 b
frame map ip 10.1.5.2 502 b
no shut
int s2/1
ip ad 10.1.6.5 255.255.255.0
encap f
no arp f
no frame inver
frame map ip 10.1.6.6 516 b
no shut
router ospf 1
router-id 5.5.5.5
nei 10.1.5.1
nei 10.1.5.2
net 10.1.5.5 0.0.0.0 a 0
net 5.5.5.5 0.0.0.0 a 0
redistribute eigrp 100 subnets metric 100 metric-type 1
exit
router eigrp 100
no auto
net 10.1.6.5 0.0.0.0
redistribute ospf 1 metric 10000 100 255 1 1500
end

R6
conf t
int l 0
ip ad 6.6.6.6 255.255.255.255
int s2/1
ip ad 10.1.6.6 255.255.255.0
encap f
no arp f
no frame inve
frame map ip 10.1.6.5 615 b
no shut
router eigrp 100
no au
net 6.6.6.6 0.0.0.0
net 10.1.6.6 0.0.0.0
end
 
 
校验
R1#sh ip route
Codes: 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
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/65] via 10.1.5.2, 00:00:40, Serial2/0
     3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/1] via 10.1.1.3, 00:00:11, Serial2/1
     4.0.0.0/32 is subnetted, 2 subnets
O IA    4.4.4.4 [110/129] via 10.1.5.2, 00:00:40, Serial2/0
O IA    4.4.5.4 [110/129] via 10.1.5.2, 00:00:40, Serial2/0
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/65] via 10.1.5.5, 00:00:40, Serial2/0
     6.0.0.0/32 is subnetted, 1 subnets
O E1    6.6.6.6 [110/164] via 10.1.5.5, 00:00:40, Serial2/0
     10.0.0.0/24 is subnetted, 4 subnets
O IA    10.1.2.0 [110/128] via 10.1.5.2, 00:00:40, Serial2/0
C       10.1.1.0 is directly connected, Serial2/1
O E1    10.1.6.0 [110/164] via 10.1.5.5, 00:00:40, Serial2/0
C       10.1.5.0 is directly connected, Serial2/0
 

R2#sh ip route
Codes: 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
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/65] via 10.1.5.1, 00:00:44, Serial2/0
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     3.0.0.0/32 is subnetted, 1 subnets
O E1    3.3.3.3 [110/164] via 10.1.5.1, 00:00:44, Serial2/0
     4.0.0.0/32 is subnetted, 2 subnets
O       4.4.4.4 [110/65] via 10.1.2.4, 00:01:13, Serial2/1
O IA    4.4.5.4 [110/65] via 10.1.2.4, 00:00:44, Serial2/1
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/65] via 10.1.5.5, 00:00:44, Serial2/0
     6.0.0.0/32 is subnetted, 1 subnets
O E1    6.6.6.6 [110/164] via 10.1.5.5, 00:00:44, Serial2/0
     10.0.0.0/24 is subnetted, 4 subnets
C       10.1.2.0 is directly connected, Serial2/1
O E1    10.1.1.0 [110/164] via 10.1.5.1, 00:00:44, Serial2/0
O E1    10.1.6.0 [110/164] via 10.1.5.5, 00:00:44, Serial2/0
C       10.1.5.0 is directly connected, Serial2/0
 
 

R3#sh ip route
Codes: 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
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
R       1.1.1.1 [120/5] via 10.1.1.1, 00:00:13, Serial2/1
     2.0.0.0/32 is subnetted, 1 subnets
R       2.2.2.2 [120/5] via 10.1.1.1, 00:00:13, Serial2/1
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0
     4.0.0.0/32 is subnetted, 2 subnets
R       4.4.4.4 [120/5] via 10.1.1.1, 00:00:13, Serial2/1
R       4.4.5.4 [120/5] via 10.1.1.1, 00:00:13, Serial2/1
     5.0.0.0/32 is subnetted, 1 subnets
R       5.5.5.5 [120/5] via 10.1.1.1, 00:00:13, Serial2/1
     6.0.0.0/32 is subnetted, 1 subnets
R       6.6.6.6 [120/5] via 10.1.1.1, 00:00:13, Serial2/1
     10.0.0.0/24 is subnetted, 4 subnets
R       10.1.2.0 [120/5] via 10.1.1.1, 00:00:16, Serial2/1
C       10.1.1.0 is directly connected, Serial2/1
R       10.1.6.0 [120/5] via 10.1.1.1, 00:00:16, Serial2/1
R       10.1.5.0 [120/1] via 10.1.1.1, 00:00:16, Serial2/1
 
 

R4#sh ip route
Codes: 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
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/129] via 10.1.2.2, 00:01:04, Serial2/1
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/65] via 10.1.2.2, 00:01:04, Serial2/1
     3.0.0.0/32 is subnetted, 1 subnets
O E1    3.3.3.3 [110/228] via 10.1.2.2, 00:01:04, Serial2/1
     4.0.0.0/32 is subnetted, 2 subnets
C       4.4.4.4 is directly connected, Loopback0
C       4.4.5.4 is directly connected, Loopback1
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/129] via 10.1.2.2, 00:01:04, Serial2/1
     6.0.0.0/32 is subnetted, 1 subnets
O E1    6.6.6.6 [110/228] via 10.1.2.2, 00:01:04, Serial2/1
     10.0.0.0/24 is subnetted, 4 subnets
C       10.1.2.0 is directly connected, Serial2/1
O E1    10.1.1.0 [110/228] via 10.1.2.2, 00:01:04, Serial2/1
O E1    10.1.6.0 [110/228] via 10.1.2.2, 00:01:04, Serial2/1
O       10.1.5.0 [110/128] via 10.1.2.2, 00:01:04, Serial2/1
 
 

R5#sh ip route
Codes: 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
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/65] via 10.1.5.1, 00:00:59, Serial2/0
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/65] via 10.1.5.2, 00:00:59, Serial2/0
     3.0.0.0/32 is subnetted, 1 subnets
O E1    3.3.3.3 [110/164] via 10.1.5.1, 00:00:59, Serial2/0
     4.0.0.0/32 is subnetted, 2 subnets
O IA    4.4.4.4 [110/129] via 10.1.5.2, 00:00:59, Serial2/0
O IA    4.4.5.4 [110/129] via 10.1.5.2, 00:00:59, Serial2/0
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback0
     6.0.0.0/32 is subnetted, 1 subnets
D       6.6.6.6 [90/2297856] via 10.1.6.6, 00:14:35, Serial2/1
     10.0.0.0/24 is subnetted, 4 subnets
O IA    10.1.2.0 [110/128] via 10.1.5.2, 00:01:00, Serial2/0
O E1    10.1.1.0 [110/164] via 10.1.5.1, 00:01:00, Serial2/0
C       10.1.6.0 is directly connected, Serial2/1
C       10.1.5.0 is directly connected, Serial2/0
 
 
R6#sh ip route
Codes: 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
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
D EX    1.1.1.1 [170/2195456] via 10.1.6.5, 00:14:36, Serial2/1
     2.0.0.0/32 is subnetted, 1 subnets
D EX    2.2.2.2 [170/2195456] via 10.1.6.5, 00:14:36, Serial2/1
     3.0.0.0/32 is subnetted, 1 subnets
D EX    3.3.3.3 [170/2195456] via 10.1.6.5, 00:14:36, Serial2/1
     4.0.0.0/32 is subnetted, 2 subnets
D EX    4.4.4.4 [170/2195456] via 10.1.6.5, 00:14:36, Serial2/1
D EX    4.4.5.4 [170/2195456] via 10.1.6.5, 00:01:03, Serial2/1
     5.0.0.0/32 is subnetted, 1 subnets
D EX    5.5.5.5 [170/2195456] via 10.1.6.5, 00:14:36, Serial2/1
     6.0.0.0/32 is subnetted, 1 subnets
C       6.6.6.6 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 4 subnets
D EX    10.1.2.0 [170/2195456] via 10.1.6.5, 00:14:38, Serial2/1
D EX    10.1.1.0 [170/2195456] via 10.1.6.5, 00:14:38, Serial2/1
C       10.1.6.0 is directly connected, Serial2/1
D EX    10.1.5.0 [170/2195456] via 10.1.6.5, 00:14:38, Serial2/1