Redistribution Between EIGRP and OSPF

本文涉及的产品
云数据库 Redis 版,社区版 2GB
推荐场景:
搭建游戏排行榜
简介:

 

 

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




















本文转自zhang25yun51CTO博客,原文链接:http://blog.51cto.com/1585654/1144119 ,如需转载请自行联系原作者


相关实践学习
基于Redis实现在线游戏积分排行榜
本场景将介绍如何基于Redis数据库实现在线游戏中的游戏玩家积分排行榜功能。
云数据库 Redis 版使用教程
云数据库Redis版是兼容Redis协议标准的、提供持久化的内存数据库服务,基于高可靠双机热备架构及可无缝扩展的集群架构,满足高读写性能场景及容量需弹性变配的业务需求。 产品详情:https://www.aliyun.com/product/kvstore     ------------------------------------------------------------------------- 阿里云数据库体验:数据库上云实战 开发者云会免费提供一台带自建MySQL的源数据库 ECS 实例和一台目标数据库 RDS实例。跟着指引,您可以一步步实现将ECS自建数据库迁移到目标数据库RDS。 点击下方链接,领取免费ECS&RDS资源,30分钟完成数据库上云实战!https://developer.aliyun.com/adc/scenario/51eefbd1894e42f6bb9acacadd3f9121?spm=a2c6h.13788135.J_3257954370.9.4ba85f24utseFl
相关文章
|
4月前
|
网络协议 算法 数据库
OSPF总结
该文章为OSPFv2版本的一些总结,暂时没有OSPFv3
OSPF总结
|
10月前
|
网络协议 安全 数据库
浅谈OSPF
浅谈OSPF
70 0
|
网络协议 数据库 网络架构
OSPF路由协议二
一.OSPF邻接关系的建立 在OSPF协议中邻居关系就是指在两台路由器中进行完两次Hello报文交互之后,建立起来的关系叫邻居关系。 在OSPF协议中邻居关系就是指在两台路由器中进行完链路状态数据库(LSDB)同步之后,建立起来的关系叫邻居关系。
85 0
|
存储 负载均衡 网络协议
OSPF详解(二)
十六、OSPF区域1、 区域0:汇总每个区域的网络拓扑到其他区域。所有的域间通信量必须通过骨干区域,非骨干区域不能直接交换数据包。2、 路由器类型:IR、BR、ABR、ASBR3、 IR:所有接口都属于同一区域的路由器。4、 BR:至少有一个接口是与骨干area0相连的路由器。Area0不一定是骨干区域,但骨干区域–定是area0,要成为骨干必须有一个邻接关系在里面5、 ABR:连接其他区域到骨干区域,至少一个接口属于骨干区域。6、 ASBR: OSPF域外部的通信量进入0SPF域的网络路由器。7、 0SPF的虚链路:一条通过非骨干区域连接到骨干区域的链路。通过非骨干区域修复分段efreshT
|
人工智能 网络协议 算法
OSPF详解(一)
一、OSPF的五种包Hellow:发现邻居建立邻接关系DBD:检查路由器的数据库之间是否同步LSR:向另外一台设备请求特定的链路状态LSU:发送链路状态信息LSACK:确认多段的发送信息二、OSPF的三张表1、 邻居列表:列出每台路由器全部已经建立邻接关系的邻居路由器2、 链路状态数据库:列出网络中其他路由器的信息,由此显示了全网的网络拓扑3、 路由表:列出通过SPF算法计算出到达每个相连网络的最佳路径三、OSPF的特点1、 区域概念,有效减少路由条目对CPU和内存占用,将拓扑变动局限在本区域内,详细的LSA泛洪控制2、 邻接关系。OSPF协议定义了一些路由器类型和网络全相同时,就以自身为根,
|
网络协议 数据库 网络架构
OSPF路由协议
1、OSPF的基本概念 2、OSPF邻接关系的建立 3、OSPF的应用环境 4、O应用环SPF的基本配置命令
OSPF路由协议
|
存储 网络协议 数据库
|
算法 网络架构 负载均衡
|
网络协议 数据库 数据安全/隐私保护
|
算法 网络协议 数据安全/隐私保护