计算机网络配置——路由器的配置
一、实验目的和任务
- 学习路由器的基本工作原理;
- 进行路由器命令的操作练习;
- 进行路由策略的设置。
二、实验原理介绍
重点:路由器和交换机的区别;
路由器功能——实现网络互连,包括存储、转发、寻径;
1、路由器的工作过程
2、路由器的配置模式
1)普通用户模式;
2)特权用户模式;
3)全局配置模式;
4)接口配置模式;
5)路由协议配置模式;
二、路由器的基本配置
实现如下图所示的网络拓扑配置:
三、设计代码(或原理图)、仿真波形及分析
网络拓扑结构如下图所示:
![](/assets/blank.gif)
R2配置如下:(有解释)
Would you like to enter the initial configuration dialog? [yes/no]: nPress RETURN to get started!Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2 //命名
R2(config)#int f0/0 //进入以太网接口
R2(config-if)#ip add 192.168.1.1 255.255.255.0 //给接口fa0/0设置网关 子网掩码
R2(config-if)#no shutdown //激活接口R2(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upR2(config-if)#ex
R2(config)#int s0/0/0 //串行接口
R2(config-if)#clock rate 64000 //设置波特率(路由器没锁定时可自由设置)
This command applies only to DCE interfaces
R2(config-if)#ip add 192.168.6.1 255.255.255.0 //给接口s0/0/0设置网关 子网掩码
R2(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
R2(config-if)#ex
R2(config)#ip route 192.168.2.0 255.255.255.0 192.168.6.2 //设置静态路由
R2(config)#end //配置结束
R2#
%SYS-5-CONFIG_I: Configured from console by consoleR2#sh ip int brief //查看接口配置
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 192.168.6.1 YES manual down down
Serial0/0/1 unassigned YES unset administratively down down
Vlan1 unassigned YES unset administratively down downR2#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, FastEthernet0/0//*******在配置R3时,R2会[自动]执行下面部分指令*****//
R2#
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface Serial0/0/0
R2(config-if)#
R2(config-if)#exit
R2(config)#interface FastEthernet0/1
R2(config-if)#
R2(config-if)#exit
R2(config)#interface Serial0/0/1
R2(config-if)#
R2(config-if)#exit
R2(config)#interface Serial0/0/0
R2(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to upR2(config-if)#end
R2(config-if)#end
R2#
%SYS-5-CONFIG_I: Configured from console by console//******配置完R3后,回到R2执行下面命令,即可到静态路由表*********//
R2#sh ip route //查看路由表
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, FastEthernet0/0 //前面地址为目的网络,后面Fa...为通往目的网络的接口
S 192.168.2.0/24 [1/0] via 192.168.6.2
C 192.168.6.0/24 is directly connected, Serial0/0/0R2#
//Codes表示路由项生成的方式,C表示直连路由;S表示静态路由;R表示RIP协议生成;O表示OPSF协议生成。R2>en
R2#sh int f0/0 //查看具体接口的信息
FastEthernet0/0 is up, line protocol is up (connected)Hardware is Lance, address is 0010.11e0.9d01 (bia 0010.11e0.9d01) //接口物理地址Internet address is 192.168.1.1/24 //接口IP地址MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, //BW为带宽;DLY为延时reliability 255/255, txload 1/255, rxload 1/255Encapsulation ARPA, loopback not setFull-duplex, 100Mb/s, media type is RJ45ARP type: ARPA, ARP Timeout 04:00:00, Last input 00:00:08, output 00:00:05, output hang neverLast clearing of "show interface" counters neverInput queue: 0/75/0 (size/max/drops); Total output drops: 0Queueing strategy: fifoOutput queue :0/40 (size/max)5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 5 bits/sec, 0 packets/sec12 packets input, 1536 bytes, 0 no bufferReceived 0 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort0 input packets with dribble condition detected12 packets output, 1212 bytes, 0 underruns0 output errors, 0 collisions, 1 interface resets0 babbles, 0 late collision, 0 deferred0 lost carrier, 0 no carrier0 output buffer failures, 0 output buffers swapped out
R3配置如下:(解释类同R2)
Would you like to enter the initial configuration dialog? [yes/no]: nPress RETURN to get started!Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#hostname R3
R3(config)#int f0/0
R3(config-if)#ip addr 192.168.2.1 255.255.255.0
R3(config-if)#no shutdownR3(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upR3(config-if)#int s0/0/0
R3(config-if)#ip addr 192.168.6.2 255.255.255.0
R3(config-if)#no shutdownR3(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to upR3(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to upR3(config-if)#ex
R3(config)#ip route 192.168.1.0 255.255.255.0 192.168.6.1
R3(config)#end
R3#
%SYS-5-CONFIG_I: Configured from console by consoleR3#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.2.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 192.168.6.2 YES manual up up
Serial0/0/1 unassigned YES unset administratively down down
Vlan1 unassigned YES unset administratively down down
R3#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setS 192.168.1.0/24 [1/0] via 192.168.6.1
C 192.168.2.0/24 is directly connected, FastEthernet0/0
C 192.168.6.0/24 is directly connected, Serial0/0/0R3#
PC0连接PC1:
PC1连接PC0:
四、实验结论与心得
- 注意
由于新加入的路由器没有串行接口,故需要手动添加,步骤如下:
1.先把路由器的电源关掉。
2.把物理串口拖动到路由器接口处。
3.启动步骤1中的电源,然后进入CLI配置页面,等待初始化完成,点击确定即可。
- 路由器配置文件保存类似交换机,在这里不作介绍,可参考文章:计算机网络配置——交换机的配置
计算机网络配置——路由器的配置相关推荐
- 计算机网络实验——路由器基本配置
记录一次计算机网络实验,关于路由器的基本配置. 1.启动PC机,并连接到路由器 (1)启动PC机. (2)打开浏览器,并输入相关地址. (3)选择路由器,进入Telnet模式连接到路由器.路由器此时在 ...
- 计算机网络实验——路由器的配置静态与RIP配置
前言 由于几个资料和老师给的ppt说的都不清楚,自己也没想到什么很巧妙的归纳方法,写个总结记录一下. 想必静态路由配置的过程中唯一的难点就是ip route这个指令,其他的什么添加接口,设置ip啥的都 ...
- 思科模拟器操作(配置交换机、配置路由器、配置但比交换机、配置三层路由器)
思科模拟器操作 普通模式 往下进 enable 特权模式 往下进 conf t 全局模式 往下进 int f 0/1 接口模式 退出到上层模式 exit 退回特权 ctrl +z 配置交换机 特权模式 ...
- php为什么需要配置路由器,laravel 配置路由 api和web定义的路由的区别详解
1.路由经过中间件方面不同 打开kerenl.php就可以看到区别 protected $middlewareGroups = [ 'web' => [ \App\Http\Middleware ...
- 计算机网络之『路由器的配置』
路由器的配置 路由器的命令行界面配置 路由器的配置方式 与交换机一样,路由器自身没有输入/输出设备,需要通过其它计算机登录到路由器后才能配置. 根据配置路由器所需的计算机与路由器的连接方式,路由器的配 ...
- cli命令行配置路由器_2.3.3 使用CLI执行基本路由器配置
2.3.3 使用CLI执行基本路由器配置 基本的路由器配置包括:用于识别身份的主机名.用于安全保护的口令,以及用于连接的接口IP地址.使用copy running-config startup-co ...
- 计算机网络---DHCP和自动配置
什么是DHCP DHCP(动态主机配置协议)是一个局域网的网络协议,客户机 / 服务器协议.指的是由服务器控制一段IP地址范围,客户机登录服务器时就可以自动获得服务器分配的IP地址和子网掩码.默认情况 ...
- 计算机网络实验:CISCO IOS 路由器基本配置
目录 CCNA6安装过程: 使用界面: 实验:静态路由配置 实验:动态路由的配置 实验:配置VLAN 思考题 实验任务: 5.2 实验要求 使用 Router eSIM v1.1 模拟器 来模拟路由器 ...
- 计算机网络实验1·**路由器基本配置**
计算机网络实验1·路由器基本配置 由于防盗链机制图片无法查看,可以点此链接. https://xz2k2i3v0u.feishu.cn/docs/doccnQ565BQ2ZTDDjXy08scUxqb ...
最新文章
- 矩阵相乘取共轭_正交矩阵学习小结
- 02python 中的线程
- 每日两SQL(4),欢迎交流~
- myid文件到底是否需要自己手动配置
- 计算机控制系统的概念构成,计算机控制系统复习
- IOS8模拟器设置中文输入
- 解决Linux系统find: ‘/run/user/1000/gvfs’: 权限不够
- python获取按钮点击后的数据_django表单中的按钮怎么获取数据
- 开幕倒计时3天 | 2019中国大数据技术大会(BDTC)邀您一同共赴大数据+AI盛宴!...
- linux 触屏设备 无法处理touchevent_一次通讯干扰处理
- Android studio 报错Failed to open zip file解决方法
- html形状圆形,html – 使用CSS的圆形标记形状
- 适合数码家电行业用的进销存,一个软件顶一百个人工不是梦
- 中国气候分布矢量图_如何用30行代码构建气候图
- 计算机网络课后习题概略
- JSON.stringify(value [, replacer] [, space])
- office2003正版验证
- 泥壁鲁(80后 Kevin Yang from ChengDu) 银河帝国 海岛帝国 2012-4月 北美销售额 114w$ IOS(国内前10)...
- 在北京做外包,月薪2万,还想提升,怎么办
- 开发大数据“读心术”,易车深挖用户价值