思科配置路由器,四台主机互相ping通

一、如图配置

PC4和PC5用来配置路由器,各ip、接口如图所示。

二、配置各主机ip、子网掩码SNM、默认网关DGW

(一)、PC0

(二)、PC1

(三)、PC2

(四)、PC3

三、 配置路由器Router0

(期间报错是打错了字母)

复制代码
Router>en
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname MyRouter0
MyRouter0(config)#interface fa0/0
MyRouter0(config-if)#ip address 172.1.1.3 255.255.255.0
MyRouter0(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

MyRouter0(config-if)#ex
MyRouter0(config)#int fa0/1
MyRouter0(config-if)#ip address 192.168.1.1 255.255.255.0
MyRouter0(config-if)#no shutdown

MyRouter0(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

MyRouter0(config-if)#ex
MyRouter0(config)#ip route 172.2.2.0 255.255.255.0 192.168.1.2 
MyRouter0(config)#end
MyRouter0#
%SYS-5-CONFIG_I: Configured from console by console

四、配置路由器Router1

复制代码
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname MyRouter1
MyRouter1(config)#int f0/0
MyRouter1(config-if)#ip add 172.2.2.3 255.255.255.0
MyRouter1(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

MyRouter1(config-if)#ex
MyRouter1(config)#int fa0/1
MyRouter1(config-if)#ip add 192.168.1.2 255.255.255.0
MyRouter1(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

MyRouter1(config-if)#ex
MyRouter1(config)#ip route 172.1.1.0 255.255.255.0 192.168.1.1
MyRouter1(config)#end
MyRouter1#
%SYS-5-CONFIG_I: Configured from console by console

MyRouter1#

五、 命令总结

复制代码
confgure terminal  
hostname MyRouter0  
int f0/0  
ip address 172.1.1.3 255.255.255.0  
no shutdown   
ex   
int f0/1 
ip add 192.168.1.1 255.255.255.0 
no shut  
ex  
ip route 172.2.2.0 255.255.255.0 192.168.1.2   

六、ping效果


七、参考视频

计算机网络实验11-静态路由实验_哔哩哔哩_bilibili

相关推荐
云计算练习生6 天前
实验二:eNSP PC&路由器 IP地址与子网掩码配置
路由器·ensp·网络技术·ip地址配置
j7~7 天前
【仿 RabbitMQ 项目】发布订阅消息队列 (篇八):交换机数据管理模块,分层类设计、SQLite 回调原理与代码实现
服务器·网络·数据库·消息队列·交换机·交换机数据管理·sqlite回调原理
星恒讯工业路由器2 个月前
家庭无线组网方式全解析:从单路由到FTTR,哪种适合你?
网络·物联网·智能路由器·路由器·家庭组网·ac+ap·mesh组网
xiaoxiangsiyan2 个月前
企业园区局域网交换技术完整版手册主打华为设备
运维·网络·学习·华为·路由·交换机·企业网
爱刷碗的苏泓舒3 个月前
网络通信入门:交换机、路由器与防火墙的角色、关系、功能和使用场景
网络·智能路由器·网络通信·防火墙·交换机
Shell运维手记3 个月前
交换机(二层交换机)完整工作原理
运维·网络·网络协议·macos·交换机
humors2213 个月前
新手笔记本/路由/手机安全问题小记
安全·华为·电脑·手机·路由器·笔记本·tplink
爱刷碗的苏泓舒3 个月前
网络通信入门:静态 IP、动态 IP、路由器、交换机与手机热点
网络·智能手机·路由器·网络通信·交换机·手机热点·终端调试
星恒讯工业路由器3 个月前
VLAN在工业网络中为何越来越重要
网络·信息与通信·vlan·交换机·工业网络·网络隔离
承接电子控制相关项目4 个月前
时间敏感网络的未来趋势
网络·tsn·vlan·交换机·pvid·tsn发展趋势