环球观速讯丨教你配置简单的静态路由
2023-02-09 04:01:32    互联网

欢迎来到学习啦。这篇教你配置简单的静态路由是学习啦小编特地为大家整理的,希望对大家有所帮助!

为了更有说服力和便于理解我用CPT(Cisco Packet Tracer)演示了一下。

拓扑图如下图所示:


(相关资料图)

分别有四个网段,10.0.0.0/8、112.237.228.0/24、192.168.10.0/24、211.86.104.0/24。

静态路由设置如下:

ip route 192.168.10.0 255.255.255.0 112.237.228.1 ip route 211.86.104.0 255.255.255.0 112.237.228.1 ip route 10.0.0.0 255.0.0.0 112.237.228.244 ip route 211.86.104.0 255.255.255.0 192.168.10.1 ip route 112.237.228.0 255.255.255.0 192.168.10.2 ip route 10.0.0.0 255.0.0.0 192.168.10.2

配置如下:

1.PC0的IP配置:

Packet Tracer PC Command Line 1.0

PC>ipconfig

IP Address......................: 10.0.0.3

Subnet Mask.....................: 255.0.0.0

Default Gateway.................: 10.0.0.1

PC>

2.PC1的IP配置:

Packet Tracer PC Command Line 1.0

PC>ipconfig

IP Address......................: 211.86.104.52

Subnet Mask.....................: 255.255.255.0

Default Gateway.................: 211.86.104.254

PC>

3.R1的配置:

Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R1 R1(config)#interface FastEthernet0/1 R1(config-if)#ip address 10.0.0.1 255.0.0.0 R1(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up R1(config-if)#end R1# %SYS-5-CONFIG_I: Configured from console by console R1#conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#int f0/0 R1(config-if)#ip addr 112.237.228.244 255.255.255.0 R1(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up R1(config-if)#end R1# %SYS-5-CONFIG_I: Configured from console by console R1#conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#ip route 192.168.10.0 255.255.255.0 112.237.228.1 R1(config)#ip route 211.86.104.0 255.255.255.0 112.237.228.1 R1(config)#end R1# %SYS-5-CONFIG_I: Configured from console by console R1#

4.R2的配置:

Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R2 R2(config)# R2(config)#interface FastEthernet0/1 R2(config-if)#ip address 112.237.228.1 255.255.255.0 R2(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up R2(config-if)# R2(config-if)#exit R2(config)#interface FastEthernet0/0 R2(config-if)#ip address 192.168.10.2 255.255.255.0 R2(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up R2(config-if)#end R2#conf t Enter configuration commands, one per line. End with CNTL/Z. R2(config)#ip route 10.0.0.0 255.0.0.0 112.237.228.244 R2(config)#ip route 211.86.104.0 255.255.255.0 192.168.10.1 R2(config)#end R2# %SYS-5-CONFIG_I: Configured from console by console R2#

5.R3的配置:

Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R3 R3(config)# R3(config)#interface FastEthernet0/1 R3(config-if)#ip address 192.168.10.1 255.255.255.0 R3(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up R3(config-if)# R3(config-if)#exit R3(config)#interface FastEthernet0/0 R3(config-if)#ip address 211.86.104.254 255.255.255.0 R3(config-if)#no shutdown R3(config-if)# %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up R3>enable R3#conf t Enter configuration commands, one per line. End with CNTL/Z. R3(config)#ip route 112.237.228.0 255.255.255.0 192.168.10.2 R3(config)#ip route 10.0.0.0 255.0.0.0 192.168.10.2 R3(config)#end R3# %SYS-5-CONFIG_I: Configured from console by console R3#

6.使用tracert进行测试:

测试从PC0能否路由到PC1。

结果表明测试成功。

测试从PC1能否路由到PC0。

结果表明测试成功。

关键词: 静态路由

下一篇: 最后一页
上一篇: 快讯:C++面向对象程序设计

环球观速讯丨教你配置简单的静态路由

快讯:C++面向对象程序设计

高三重点班班主任工作总结以及经验分享8篇-当前关注

《小小的海》罗马音+拼音+谐音+假名+翻译(小さな海)

环球热推荐:江苏省张家港市跑出专利赋能“加速度”

2017中国城市商业魅力新一线城市排名榜单

邂逅的反义近义词_邂逅的近义词_环球报资讯

砍43分&20罚18中!卡梅隆-托马斯上脚科6复刻“青蜂侠”配色战靴-全球热资讯

世界滚动:七年级下册地理知识点总结整理大全

f22闪电3 天天观察

出发!湖南救援力量驰援土耳其地震灾区

快看点丨老ig队员齐聚一堂_老ig队员

php编程语言入门知识

焦点热议:涨停雷达:新能源汽车个股异动 华锋股份触及涨停

ST天马2月8日快速上涨

环球观焦点:五四青年节活动主题标语

当前简讯:这两年农民卖粮吃亏吗?真正吃亏的是贸易商,2月8日最新玉米价格

四川肯德基辣椒包要收费了 一包多少钱?_全球观速讯

当前动态:mended_mend

环球观点:神经胶质瘤是恶性的还是良性的_神经胶质瘤是恶性的吗

佛珠多少颗 全球热点

新棍王650 即将发布,价格或将低于25000元?复古大玩具值得一看

今亮点!照烧是什么意思

当前快看:南通市通州区邮编布偶_南通市通州区邮编

【聚看点】【媒体看期市】花生“配齐”风险管理工具见成效

TTIS财税科技产业峰会 每日看点

全球速读:电视剧绝杀剧情介绍

19分惨败!字母24+13大洛爆发,利拉德两人49+10,西部乱成一锅粥 头条

当前时讯:2023忍者必须死3兑换码是什么-礼包兑换码分享

妇女废墟中分娩 婴儿获救母亲去世事件简单介绍|天天看热讯

亚香股份2月7日快速回调 天天新消息

七号宿舍大学生社区

当前快看:万物心选

脑卒中ppt课件最新_脑卒中ppt课件

上市公司重大购并业务的财务问题研究

02月06日18时四川攀枝花昨日疫情新增0例、累计报告阳性感染者确诊21例