栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

GNS3------路由的重发布

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

GNS3------路由的重发布

 第一步:给所有路由器配置好IP和虚接口


R1#
R1#configure terminal
R1(config)#int f0/0
R1(config-if)#ip address 12.12.12.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#ex
R1(config)#
R1(config)#int loopback 1
R1(config-if)#ip address 1.1.1.1 255.255.255.0
R1(config-if)#ex


R2#configure terminal
R2(config)#int loopback 1
R2(config-if)#ip address 2.2.2.2 255.255.255.0
R2(config-if)#
R2(config-if)#ex
R2(config)#int f0/0
R2(config-if)#ip address 12.12.12.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#ex
R2(config)#int f1/0
R2(config-if)#no shutdown
R2(config-if)#ip address 23.23.23.2 255.255.255.0
R2(config-if)#ex
R2(config)#
 

R3#conf
R3#configure t
R3#configure terminal
R3(config)#int loopback 1
R3(config-if)#ip address 3.3.3.3 255.255.255.0
R3(config-if)#ex
R3(config)#int f1/0
R3(config-if)#no shutdown
R3(config-if)#ip address 23.23.23.3 255.255.255.0
R3(config-if)#ex
R3(config)#int loopback 2
R3(config-if)#ip address 4.4.4.4 255.255.255.0
R3(config-if)#ex
R3(config)#
 

第二步:配置ospf和rip

R1(config)#
R1(config)#router ospf 100
R1(config-router)#network 12.12.12.0 0.0.0.255 area 0
R1(config-router)#network 1.1.1.0 0.0.0.255 area 0
R1(config-router)#end
 


R2(config)#router ospf 100
R2(config-router)#NETwork 2.2.2.0 0.0.0.255 area 0
R2(config-router)#network 12.12.12.0 0.0.0.255 area 0
R2(config-router)#ex
R2(config)#
R2(config)#router rip
R2(config)#router rip
R2(config-router)#network 23.23.23.0
R2(config-router)#network 2.2.2.0
R2(config-router)#ex


R3(config)#router rip
R3(config-router)#network 23.23.23.0
R3(config-router)#network 3.3.3.0
R3(config-router)#ex
 

配置好后可以看到只能两两相同,不能全网通。

 

 第三步:开始路由重分布


R2(config)#router rip

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

R2(config-router)#ex

R2(config)#router ospf 100

R2(config-router)#redistribute rip subnets metric 1(没有subnets就会只能重发布无类网络)
R2(config-router)#ex
 

这时只配置了路由的双向重发布,所以可以看到R1上缺少一条4.4.4.4

 

 继续直连重发布:要在R3上配置


R3(config)#router rip

R3(config-router)#redistribute connected metric 1
R3(config-router)#ex
R3(config)#end
 

此时就已经全网通了。

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/511477.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号