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

相关推荐
aml258__12 小时前
一、Cisco(OSPF邻居认证机制实验:明文与加密MD5对比)251211
网络·php·路由器·思科·ospf·端口认证·明文/md5
Logic10112 小时前
《计算机组网技术》第3版第6单元:实训-小型校园网网络解决方案的设计与实施详细步骤与思路解析
网络工程·vlan·交换机·校园网·网络规划·组网技术·实训报告
羑悻的小杀马特4 天前
【仿RabbitMQ实现消息队列项目】交换机智能路由、队列流量隔离、绑定信息精准定向、消息可靠投递——四模块协同打造低耦合消息系统!
linux·rabbitmq·项目·消息·交换机·队列·绑定信息
sea_baby5 天前
虚拟交换机发展历程
网络·虚拟化·交换机
交换机路由器测试之路5 天前
什么是网络直径
网络·以太网·交换机·通信
交换机路由器测试之路7 天前
什么是CSMA/CD
网络·路由器·以太网·交换机
交换机路由器测试之路7 天前
什么是以太网
运维·网络·网络协议·路由器·以太网·交换机
robur8 天前
H3C V7路由器升级软件时提示无足够存储空间
网络·路由器·升级·h3c
交换机路由器测试之路1 个月前
交换机路由器基础(四)--TCPIP四层模型及常见协议技术
网络·网络协议·路由器·交换机·tcp/ip模型
Fanmeang1 个月前
华为交换机VLAN技术详解:从基础到高级应用
运维·网络·华为·vlan·交换机·mux vlan