Redistribution Between EIGRP and OSPF

 

 

1按拓扑配置IP地址

2启用EIGRP

R1(config)#router eigrp 1

R1(config-router)#no auto-summary 

R1(config-router)#network 172.16.0.0

R1(config-router)#network 192.168.48.0

R1(config-router)#network 192.168.49.0

R1(config-router)#network 192.168.50.0

R1(config-router)#network 192.168.51.0

R1(config-router)#network 192.168.70.0


R2(config)#router eigrp 1

R2(config-router)#no auto-summary 

R2(config-router)#network 172.16.0.0


3查看eigrp邻居


R1(config-router)#do show ip eig nei

IP-EIGRP neighbors for process 1

H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq

                                            (sec)         (ms)       Cnt Num

0   172.16.12.2             Se1/0             11 00:00:36  108   648  0  3


4查看eigrp拓扑

R1#SHOW IP ROUTE eigrp 

     172.16.0.0/24 is subnetted, 5 subnets

D       172.16.23.0 [90/2681856] via 172.16.12.2, 00:03:03, Serial1/0

D       172.16.2.0 [90/2297856] via 172.16.12.2, 00:03:03, Serial1/0

D       172.16.100.0 [90/2297856] via 172.16.12.2, 00:03:03, Serial1/0


R2#show ip route eigrp 

     172.16.0.0/24 is subnetted, 5 subnets

D       172.16.1.0 [90/2297856] via 172.16.12.1, 00:04:57, Serial1/0

D    192.168.51.0/24 [90/2297856] via 172.16.12.1, 00:04:57, Serial1/0

D    192.168.50.0/24 [90/2297856] via 172.16.12.1, 00:04:57, Serial1/0

D    192.168.49.0/24 [90/2297856] via 172.16.12.1, 00:04:57, Serial1/0

D    192.168.70.0/24 [90/2297856] via 172.16.12.1, 00:04:57, Serial1/0

D    192.168.48.0/24 [90/2297856] via 172.16.12.1, 00:04:57, Serial1/0


5把s1/1设置为被动接口

R2(config)#router eigrp 1

R2(config-router)#no passive-interface s1/1


6在s1/0下汇总r1路由

R1(config)#int s1/0

R1(config-if)#ip summary-address eigrp 192.168.48.0 255.255.254.0


R1(config-if)#do show ip route eig

     172.16.0.0/24 is subnetted, 5 subnets

D       172.16.23.0 [90/2681856] via 172.16.12.2, 00:11:01, Serial1/0

D       172.16.2.0 [90/2297856] via 172.16.12.2, 00:11:01, Serial1/0

D       172.16.100.0 [90/2297856] via 172.16.12.2, 00:11:01, Serial1/0

D    192.168.48.0/23 is a summary, 00:00:11, Null0


在r2,r3上配置ospf


R2#  show ip route ospf

     192.168.30.0/32 is subnetted, 1 subnets

O       192.168.30.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.8.0/32 is subnetted, 1 subnets

O IA    192.168.8.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.25.0/32 is subnetted, 1 subnets

O       192.168.25.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.9.0/32 is subnetted, 1 subnets

O IA    192.168.9.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.10.0/32 is subnetted, 1 subnets

O IA    192.168.10.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.40.0/32 is subnetted, 1 subnets

O       192.168.40.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks

O       172.16.3.1/32 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.11.0/32 is subnetted, 1 subnets

O IA    192.168.11.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.20.0/32 is subnetted, 1 subnets

O       192.168.20.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1

     192.168.35.0/32 is subnetted, 1 subnets

O       192.168.35.1 [110/65] via 172.16.23.3, 00:02:49, Serial1/1


r2 ,r3所有环回接口配置为点到点

R2(config)#int lo100

R2(config-if)#ip ospf network point-to-point 

R2#show ip route ospf

O    192.168.30.0/24 [110/65] via 172.16.23.3, 00:00:24, Serial1/1

O IA 192.168.8.0/24 [110/65] via 172.16.23.3, 00:00:24, Serial1/1

O    192.168.25.0/24 [110/65] via 172.16.23.3, 00:00:24, Serial1/1

O IA 192.168.9.0/24 [110/65] via 172.16.23.3, 00:00:14, Serial1/1

O IA 192.168.10.0/24 [110/65] via 172.16.23.3, 00:00:14, Serial1/1

O    192.168.40.0/24 [110/65] via 172.16.23.3, 00:00:24, Serial1/1

     172.16.0.0/24 is subnetted, 6 subnets

O       172.16.3.0 [110/65] via 172.16.23.3, 00:00:24, Serial1/1

O IA 192.168.11.0/24 [110/65] via 172.16.23.3, 00:00:04, Serial1/1

O    192.168.20.0/24 [110/65] via 172.16.23.3, 00:00:24, Serial1/1

O    192.168.35.0/24 [110/65] via 172.16.23.3, 00:00:24, Serial1/1


汇总area 20

R3(config)#router ospf 1

R3(config-router)#area 20 range 192.168.8.0 255.255.252.0


R2# show 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


O    192.168.30.0/24 [110/65] via 172.16.23.3, 00:02:26, Serial1/1

O    192.168.25.0/24 [110/65] via 172.16.23.3, 00:02:26, Serial1/1

O    192.168.40.0/24 [110/65] via 172.16.23.3, 00:02:26, Serial1/1

     172.16.0.0/24 is subnetted, 6 subnets

C       172.16.23.0 is directly connected, Serial1/1

C       172.16.12.0 is directly connected, Serial1/0

D       172.16.1.0 [90/2297856] via 172.16.12.1, 00:27:04, Serial1/0

C       172.16.2.0 is directly connected, Loopback0

O       172.16.3.0 [110/65] via 172.16.23.3, 00:02:26, Serial1/1

C       172.16.100.0 is directly connected, Loopback100

O    192.168.20.0/24 [110/65] via 172.16.23.3, 00:02:26, Serial1/1

D    192.168.51.0/24 [90/2297856] via 172.16.12.1, 00:27:04, Serial1/0

D    192.168.50.0/24 [90/2297856] via 172.16.12.1, 00:27:04, Serial1/0

O    192.168.35.0/24 [110/65] via 172.16.23.3, 00:02:27, Serial1/1

D    192.168.70.0/24 [90/2297856] via 172.16.12.1, 00:27:05, Serial1/0

O IA 192.168.8.0/22 [110/65] via 172.16.23.3, 00:00:16, Serial1/1

D    192.168.48.0/23 [90/2297856] via 172.16.12.1, 00:16:15, Serial1/0


eigrp发布往ospf中

R2(config)#router ospf 1

R2(config-router)#redistribute eigrp 1 subnets 

ospf发布往eigrp中

R2(config)#router eigrp 1

R2(config-router)#redistribute ospf 1 metric 10000 100 255 1 1500

R2(config-router)#default-metric 10000 100 255 1 1500

R2(config-router)#redistribute ospf 1

R1#show ip 

*Apr  9 15:34:36.939: %SYS-5-CONFIG_I: Configured from console by console

R1#show 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


D EX 192.168.30.0/24 [170/2195456] via 172.16.12.2, 00:01:35, Serial1/0

D EX 192.168.25.0/24 [170/2195456] via 172.16.12.2, 00:01:35, Serial1/0

D EX 192.168.40.0/24 [170/2195456] via 172.16.12.2, 00:01:35, Serial1/0

     172.16.0.0/24 is subnetted, 6 subnets

D       172.16.23.0 [90/2681856] via 172.16.12.2, 00:32:55, Serial1/0

C       172.16.12.0 is directly connected, Serial1/0

C       172.16.1.0 is directly connected, Loopback0

D       172.16.2.0 [90/2297856] via 172.16.12.2, 00:32:55, Serial1/0

D EX    172.16.3.0 [170/2195456] via 172.16.12.2, 00:01:35, Serial1/0

D       172.16.100.0 [90/2297856] via 172.16.12.2, 00:32:55, Serial1/0

D EX 192.168.20.0/24 [170/2195456] via 172.16.12.2, 00:01:35, Serial1/0

C    192.168.51.0/24 is directly connected, Loopback51

C    192.168.50.0/24 is directly connected, Loopback50

D EX 192.168.35.0/24 [170/2195456] via 172.16.12.2, 00:01:35, Serial1/0

C    192.168.49.0/24 is directly connected, Loopback49

C    192.168.70.0/24 is directly connected, Loopback70

C    192.168.48.0/24 is directly connected, Loopback48

D EX 192.168.8.0/22 [170/2195456] via 172.16.12.2, 00:01:35, Serial1/0

D    192.168.48.0/23 is a summary, 00:22:06, Null0


R1#tclsh

+>(tcl)#foreach address {

+>(tcl)#172.16.1.1

+>(tcl)#192.168.48.1

+>(tcl)#192.168.49.1

+>(tcl)#192.168.50.1

+>(tcl)#192.168.51.1

+>(tcl)#192.168.70.1

+>(tcl)#172.16.12.1

+>(tcl)#172.16.2.1 

+>(tcl)#172.16.100.1

+>(tcl)#172.16.12.2 

+>(tcl)#172.16.23.2

+>(tcl)#172.16.3.1 

+>(tcl)#192.168.20.1

+>(tcl)#192.168.25.1

+>(tcl)#192.168.30.1

+>(tcl)#192.168.35.1

+>(tcl)#192.168.40.1

+>(tcl)#192.168.8.1

+>(tcl)#192.168.9.1

+>(tcl)#192.168.10.1

+>(tcl)#192.168.11.1

+>(tcl)#172.16.23.3 

+>(tcl)#} { ping $address }


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.48.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.49.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.50.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.51.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.70.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.12.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/23/36 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.2.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 4/30/108 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.100.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/44/112 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.12.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 12/30/72 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.23.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 16/49/92 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.3.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 28/77/144 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/31/92 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.25.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/27/64 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.30.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 4/26/64 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.35.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/36/60 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.40.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/29/56 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.8.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 32/70/96 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.9.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 12/78/132 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/37/104 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.11.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/31/72 ms

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.23.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/31/92 ms

 

 

你可能感兴趣的:(between,ospf,EIGRP,Redistribution)