美文网首页
路由器的基本配置与静态路由

路由器的基本配置与静态路由

作者: ERROR505 | 来源:发表于2019-11-10 13:44 被阅读0次

一、实验要求

给你一个C类网络192.168.1.0/24,要求你进行子网划分
然后给相应的设备配置相应的IP地址,然后在路由器上配置静态路由实现各网络之间可以相互通信。

二、实验拓扑图

拓扑图.png

三、实验操作代码及注释

Router>enable     //进入特权模式
Router#config t   //进去全局配置模式
Router(config)#hostname R3   //将主机名改为R3
R3(config)#int fa0/0  //端口设置模式
R3(config-if)#ip address 192.168.1.62 255.255.255.224//配置接口ip地址
R3(config-if)#no shutdown (路由器的接口默认没有开启)//开启接口
R3(config-if)#exit  //退出
R3(config)#int s2/0
R3(config-if)#ip add 192.168.1.1 255.255.255.252
R3(config-if)#no sh
R3(config-if)#exit
R3#copy running-config startup-config //把配置保存
或
R3#write memory  //把配置保存
R3#show ip route  //查看路由表
R3(config)#ip route 192.168.1.64 255.255.255.192 192.168.1.2//配置路由
R3(config)#ip route 192.168.1.128 255.255.255.128 192.168.1.2
R3(config)#ip route 192.168.1.4 255.255.255.252 192.168.1.2

其他命令可自行百度,配置好后在主机输入ping命令来验证是否能正常通信。

相关文章

网友评论

      本文标题:路由器的基本配置与静态路由

      本文链接:https://www.haomeiwen.com/subject/mvqabctx.html