思科配置路由器,四台主机互相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

相关推荐
林中伊人11 天前
家庭路由器wifi设置LAN2LAN和LAN2WAN
网络·路由器
Fanmeang11 天前
DHCP Snooping各种场景实验案例
运维·网络·安全·华为·交换机·dhcp·dhcp snooping
半路_出家ren12 天前
VRRP(虚拟路由器冗余协议)、虚拟路由器、master路由器、backup路由器
网络·网络安全·路由器·网络设备·vrrp·master路由器·backup路由器
蒜白14 天前
22--交换安全与端口隔离完全指南:MAC地址的奇幻漂流
mac·网络工程师·交换机
蒜白16 天前
27--当路由器学会“防狼术“:华为设备管理面安全深度解剖(完整战备版)
网络·安全·网络工程师·交换机
suzhou_speeder21 天前
交换机与路由器的区别:深入解析
运维·网络·智能路由器·交换机·poe·以太联
Fanmeang22 天前
ISIS-2 邻居建立关系
运维·网络·华为·智能路由器·路由器·isis·邻居关系
suzhou_speeder1 个月前
以太联—Intellinet 562133 6端口PoE++交换机:为多场景网络升级赋能
运维·网络·交换机·poe·poe交换机
张白夕1 个月前
【华三】路由器交换机忘记登入密码或super密码的重启操作
路由器·交换机·华三·忘记console密码·忘记super密码
learning-striving1 个月前
eNSP中路由器的CON/AUX接口、GE Combo接口、Mini USB接口、USB接口、WAN侧uplink接口、FE接口、GE接口介绍
网络·智能路由器·接口·路由器·ensp