mesi协议怎么实现_「实战」大型网络中各种路由协议怎么实现互联互通,一分钟了解下...

一、路由重分布

1、当许多运行多路由的网络要集成到一起时,必须在这些不同的路由选择协议之间共享路由信息。在路由选择协议之间交换路 由信息的 过程被称 为路由重分布

2、路由重分布为在同一个互联网络中高效地支持多种路由协议提供了可能,执行路由重分布的路由器被称为边界路由器,因为它们位于两个或多个自治系统的边界上。路由重分布时计量单位和管理距离是必须要考虑的。

二、RIP、EIGRP 和 OSPF 重分布

1.目的

(1)种子度量值的配置

(2)路由重分布参数的配置

(3)静态路由重分布

(4)RIP 和 EIGRP 的重分布

(5)EIGRP 和 OSPF 的重分布

(6)重分布路由的查看和调试

2.拓扑

1fd525d17c459752593da822f61daaac.png

3.实验步骤

(1)步骤 1:配置路由器 R1

R1(config)# router rip

R1(config-router)# version 2

R1(config-router)# no auto-summary

R1(config-router)# network 192.168.12.0

R1(config-router)# redistribute static metric 3 //重分布静态路由

R1(config)#ip route 0.0.0.0 0.0.0.0 Serial0/0/1

ip route 0.0.0.0 0.0.0.0 Serial0/0/1

【注意】

在向 RIP 区域重分布路由的时候,必须指定度量值,或者通过“ default-metric”命

令设置缺省种子度量值,因为 RIP 默认种子度量值为无限大,但是只有重分布静态特殊,可

以不指定种子度量值。

(2)步骤 2:配置路由器 R2

R2(config)# router eigrp 1

R2(config-router)# no auto-summary

R2(config-router)# network 192.168.23.0

R2(config-router)# redistribute rip metric 1000 100 255 1 1500

//将 RIP 重分布到 EIGRP 中

【提示】

因为 EIGRP 的度量相对复杂,所以重分布时需要分别指定带宽、延迟、可靠性、负载以

及 MTU 参数的值。

R2(config)# router rip

R2(config-router)# version 2

R2(config-router)# no auto-summary

R2(config-router)# network 192.168.12.0

R2(config-router) #redistribute eigrp 1 //将 EIGRP 重分布到 RIP 中

R2(config-router)# default-metric 4 //配置默认种子度量值

【注意】

在“ redistribute”命令中用参数“ metric”指定的种子度量值优先于路由模式下使

用“ default-metric”命令设定的缺省的种子度量值。

(3)步骤 3:配置路由器 R3

R3(config)# router eigrp 1

R3(config-router)# no auto-summary

R3(config-router)# network 3.3.3.0 0.0.0.255

R3(config-router)# network 192.168.23.0

R3(config-router)# redistribute ospf 1 metric 1000 100 255 1 1500

//将 OSPF 重分布到 EIGRP 中

R3(config-router)# distance eigrp 90 150 //配置 EIGRP 默认管理距离

R3(config)# router ospf 1

R3(config-router)# router-id 3.3.3.3

R3(config-router)# network 192.168.34.0 0.0.0.255 area 0

R3(config-router)# redistribute eigrp 1 metric 30 metric-type 1 subnets

//将 EIGRP 重分布到 OSPF 中

R3(config-router)#d efault-information originate always

(4)步骤 4:配置路由器 R4

R4(config)# router ospf 1

R4(config-router)# router-id 4.4.4.4

R4(config-router)# network 4.4.4.0 0.0.0.255 area 0

R4(config-router)# network 192.168.34.0 0.0.0.255 area 0

4.实验调试

(1)在 R1 上查看路由表:

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, 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 0.0.0.0 to network 0.0.0.0

C 192.168.12.0/24 is directly connected, Serial0/0/0

3.0.0.0/24 is subnetted, 1 subnets

R 3.3.3.0 [120/4] via 192.168.12.2, 00:00:08, Serial0/0/0

4.0.0.0/32 is subnetted, 1 subnets

R 4.4.4.4 [120/4] via 192.168.12.2, 00:00:08, Serial0/0/0

C 202.96.134.0/24 is directly connected, Serial0/0/1

R 192.168.23.0/24 [120/4] via 192.168.12.2, 00:00:08, Serial0/0/0

R 192.168.34.0/24 [120/4] via 192.168.12.2, 00:00:08, Serial0/0/0

R 192.168.23.0/24 [120/4] via 192.168.12.2, 00:00:08, Serial0/0/0

R 192.168.34.0/24 [120/4] via 192.168.12.2, 00:00:08, Serial0/0/0

S* 0.0.0.0/0 is directly connected, Serial0/0/1

以上输出表明路由器 R1 通过 RIPv2 学到从路由器 R2 重分布进 RIP 的路由。

(2)在 R2 上查看路由表:

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, 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 192.168.12.1 to network 0.0.0.0

C 192.168.12.0/24 is directly connected, Serial0/0/0

3.0.0.0/24 is subnetted, 1 subnets

D 3.3.3.0 [90/2297856] via 192.168.23.3, 00:00:21, Serial0/0/1

4.0.0.0/32 is subnetted, 1 subnets

D EX 4.4.4.4 [170/3097600] via 192.168.23.3, 00:00:21, Serial0/0/1

C 192.168.23.0/24 is directly connected, Serial0/0/1

D EX 192.168.34.0/24 [170/3097600] via 192.168.23.3, 00:00:21, Serial0/0/1

R* 0.0.0.0/0 [120/3] via 192.168.12.1, 00:00:05, Serial0/0/0

D EX 192.168.34.0/24 [170/3097600] via 192.168.23.3, 00:00:21, Serial0/0/1

R* 0.0.0.0/0 [120/3] via 192.168.12.1, 00:00:05, Serial0/0/0

以上输出表明从路由器 R1 上重分布进 RIP 的默认路由被路由器 R2 学习到,路由代码为

“ R*”;在路由器 R3 上重分布进来的 OSPF 路由也被路由器 R2 学习到,路由代码为“ D EX”,

这也说明 EIGRP 能够识别内部路由和外部路由,默认的时候,内部路由的管理距离是 90,

外部路由的管理距离是 170。

(3)在 R3 上查看路由表:

R3# 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, 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 192.168.23.2 to network 0.0.0.0

D EX 192.168.12.0/24 [150/3097600] via 192.168.23.2, 00:13:43, Serial0/0/1

3.0.0.0/24 is subnetted, 1 subnets

C 3.3.3.0 is directly connected, Loopback0

4.0.0.0/32 is subnetted, 1 subnets

O 4.4.4.4 [110/65] via 192.168.34.4, 00:13:43, Serial0/0/0

C 192.168.23.0/24 is directly connected, Serial0/0/1

C 192.168.34.0/24 is directly connected, Serial0/0/0

D*EX 0.0.0.0/0 [150/3097600] via 192.168.23.2, 00:06:08, Serial0/0/1

以上输出表明,从路由器 R2 上重分布进 EIGRP 的路由被路由器 R3 学习到,路由代码为

“ D*EX”,同时 EIGRP 外部路由的管理距离被修改成 150。

(4)在 R4 上查看路由表:

R4# 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, 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 192.168.34.3 to network 0.0.0.0

O E1 192.168.12.0/24 [110/94] via 192.168.34.3, 00:25:26, Serial0/0/0

3.0.0.0/24 is subnetted, 1 subnets

O E1 3.3.3.0 [110/94] via 192.168.34.3, 00:25:26, Serial0/0/0

4.0.0.0/24 is subnetted, 1 subnets

C 4.4.4.0 is directly connected, Loopback0

O E1 192.168.23.0/24 [110/94] via 192.168.34.3, 00:25:26, Serial0/0/0

C 192.168.34.0/24 is directly connected, Serial0/0/0

O*E2 0.0.0.0/0 [110/1] via 192.168.34.3, 00:25:26, Serial0/0/0

以上输出表明,从路由器 R3 上重分布进 OSPF 的路由被路由器 R4 学习到,路由代码为

“ O E1”;同时学到由 R3 注入的路由代码为“ O E2”的默认路由。

(5) show ip protocols

R3# show ip protocols

Routing Protocol is " eigrp 1" // 运行 AS 为 1 的 EIGRP 进程

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Default networks flagged in outgoing updates

Default networks accepted from incoming updates

EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0

EIGRP maximum hopcount 100

EIGRP maximum metric variance 1

Redistributing: eigrp 1, ospf 1 (internal, external 1 & 2, nssa-external 1 & 2)

//将 OSPF 进程 1 重分布 EIGRP 中

EIGRP NSF-aware route hold timer is 240s

Automatic network summarization is not in effect

Maximum path: 4

Routing for Networks:

3.3.3.0/24

192.168.23.0

Routing Information Sources:

Gateway Distance Last Update

192.168.23.2 90 00:51:05

Distance: internal 90 external 150

Routing Protocol is " ospf 1" //运行 OSPF 进程,进程号为 1

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Router ID 3.3.3.3

It is an autonomous system boundary router //自治系统边界路由器(ASBR)

Redistributing External Routes from,

eigrp 1 with metric mapped to 30, includes subnets in redistribution

Redistributing External Routes from,

eigrp 1 with metric mapped to 30, includes subnets in redistribution

//将 EIGRP1 重分布 OSPF 中

Number of areas in this router is 1. 1 normal 0 stub 0 nssa

Maximum path: 4

Routing for Networks:

192.168.34.0 0.0.0.255 area 0

Routing Information Sources:

Gateway Distance Last Update

4.4.4.4 110 00:58:42

3.3.3.3 110 00:58:42

Distance: (default is 110)

以上输出表明路由器 R3 运行 EIGRP 和 OSPF 两种路由协议,而且实现了双向重分布。

以下是华为数通路由交换方向完整技术分享,欢迎对华为网络技术感兴趣的小伙伴们订阅。

【可在专栏中进行查看订阅】

华为新版HCIA数通路由交换

华为新版HCIP数通路由交换

华为新版HCIE数通路由交换

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
提供的源码资源涵盖了安卓应用、小程序、Python应用和Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值