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

相关推荐
交换机路由器测试之路21 小时前
交换机专题:什么是ALS(激光器自动关断)
运维·网络·以太网·交换机·节能
xixixi777772 天前
无网通信——不依赖传统集中式蜂窝网络(如4G/5G基站)或互联网基础设施(如光纤、路由器) 的通信方式
网络·路由器·数据安全·通信·卫星通信·无网通信
工程师华哥9 天前
【零基础学网络】AAA原理详解 + 实战配置(华为设备版)
网络安全·路由器·网络工程师·运维工程师·aaa·华为数通认证·路由交换技术
小楼v11 天前
消息队列的核心概念与应用(RabbitMQ快速入门)
java·后端·消息队列·rabbitmq·死信队列·交换机·安装步骤
我的大老婆14 天前
【Windows 共享打印机纯干货】跨路由器/跨网段访问打印机、两条宽带两个路由器共享一台打印机、外网/局域网外访问DMZ打印机、192.168.1.107 主机访问192.168.2.105 打印机
windows·经验分享·计算机网络·路由器·共享打印机·跨网段共享打印机·dmz主机
李小白杂货铺14 天前
家庭宽带正确设置IPv6的方法
路由器·光猫·家庭宽带·设置ipv6·正确方法·桥接模式自动设置·非桥接模式手动设置
LeeYLong19 天前
浅谈无线AP/路由未来发展趋势
wifi·路由器·通信·射频
晚风(●•σ )21 天前
【华为 ICT & HCIA & eNSP 习题汇总】——题目集28
网络·计算机网络·华为·路由器·ensp·交换机
Mya1535927378723 天前
BX&Mya MM20-Z6Z6Z6Z6SBH 以太网媒体模块
plc·交换机·控制器模块·现货库存·价格优惠·mm20
乐维_lwops24 天前
Zabbix监控华为交换机教程
zabbix·交换机