思科路由器rip配置
路由器是网络连接不可或缺的组成部分,如果您对路由器设置和使用感到困惑,本文将为您提供一步一步的操作指南。
本文内容目录一览:
请教思科路由器配置问题?
注释后的配置命令如下:
Building configuration...
Current configuration:1381 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!//开启三层交换机的路由功能
Ip routing
!
!
!
!//将连接访问口层的端口配置为连接,并将二层的工作端口转换为三层的工作端口
interface FastEthernet0/1
no switchport
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!//将连接层的端口配置为将2层的端口转换为3层端口
Interface FastEthernet0/2
no switchport
ip address 192.168.3.1 255.255.255.0
duplex auto
speed auto
!
Interface Fast Ethernet 0/3
!
Interface Fast Ethernet 0/4
!
Interface Fast Ethernet 0/5
!
Interface Fast Ethernet 0/6
!
Interface Fast Ethernet 0/7
!
Interface Fast Ethernet 0/8
!
Interface Fast Ethernet 0/9
!
Interface Fast Ethernet 0/10
!
Interface Fast Ethernet 0/11
!
Interface Fast Ethernet 0/12
!
Interface Fast Ethernet 0/13
!
Interface Fast Ethernet 0/14
!
Interface Fast Ethernet 0/15
!
Interface Fast Ethernet 0/16
!
Interface Fast Ethernet 0/17
!
Interface Fast Ethernet 0/18
!
Interface Fast Ethernet 0/19
!
Interface Fast Ethernet 0/20
!
Interface Fast Ethernet 0/21
!
Interface Fast Ethernet 0/22
!
Interface Fast Ethernet 0/23
!
Interface Fast Ethernet 0/24
!//配置接入核心路由器的端口G0/1
Interface Gigabit Ethernet 0/1
No switchport
Ip address 192.168.10.1 255.255.255.252
duplex auto
speed auto
!
Interface Vlanl
no ip address
shut down
!//使用 RIP版本2路由协议,在 RIP路由中加入三个直接网段
router rip version 2
network 192.168.1.0
network 192.168.3.0
network
如何连接cisco路由器设置
cisco怎么进入路由器设置界面?有网友提到自己不会设置思科的设备,该怎么办?我在网上找了一些教程及命令,需要的朋友可以参考下。
进入思科路由器配置,并安装设置的步骤如下:
连接到控制端口的 方法
(1)连接线缆
连接到控制端口我们需要一根rollover线缆和RJ-45转DB-9的适配器,这一般在思科路由器的产品附件中我们可以见到。
(2)终端仿真软件
PC或者终端必须支持vt100仿真终端,通常我们在Windows OS环境下都使用的是HyperTerminal软件。
(3)将PC连接到路由器上
1、配置终端仿真软件参数,如下图:
2、 2、将rollover线缆的一端连接到路由器的控制端口
3、将rollover线缆的一端连接到RJ-45到DB-9的转换适配器。
4、将DB-9适配器的另一端连接到PC。Cisco路由器的基本配置(以2620为例)
1. 初始安装
第一次安装时系统会自动进入Dialog Setup,依屏幕提示,分别回答路由器名称、加密超级登录密码、超级登录密码、远程登录密码、动态路由协议以及各个接口的配置后,保存配置。在出现路由器名称后,打入enable命令,键入超级登录密码,出现路由器名称(这里假设路由器名称为Cisco2620),待出现Cisco2620#提示符后,表示已经进入特权模式,此时就可以进行路由器的配置了。
2. 配置路由器
键入config terminal,出现提示符Cisco2620(config)#,进入配置模式。
(1) 设置密码
Cisco2620(config)#enable secret 123123:设置特权模式密码为123123
Cisco2620(config)#line console 0: 进入Console口配置模式
Cisco2620(config-line)#password 123123:设置Console口密码为123123
Cisco2620(config-line)#login:使console口配置生效
Cisco2620(config-line)#line vty 0 5:切换至远程登录口
Cisco2620(config-line)#password 123123:设置远程登录密码为123123
Cisco2620(config-line)#login:使配置生效
(2) 设置快速以太网口
Cisco2620(config)#interface fastFastethernet 0/0:进入端口配置模式
Cisco2620(config-if)#ip address 192.168.1.6 255.255.255.0:设置IP地址及掩码
Cisco2620(config-if)#no shutdown: 开启端口
Cisco2620(config-if)#exit:从端口配置模式中退出
(3) 设置同步串口
Cisco2620(config)#interface serial 0/0:进入同步串口设置
Cisco2620(config-if)#ip unnumbered fastFastethernet 0/0:同步串口使用与快速以太网口相同的IP地址
Cisco2620(config-if)#encapsulation ppp: 把数据链路层协议设为PPP
(4) 设置16口Modem拨号模块,使用内部DHCP服务为拨入用户分配地址
Cisco2620(config)#interface Group-Async1
Cisco2620(config-if)# ip unnumbered FastEthernet0/0
Cisco2620(config-if)# encapsulation ppp
Cisco2620(config-if)# ip tcp header-compression passive:启用被动IP包头压缩
Cisco2620(config-if)# async mode dedicated:只在异步模式下工作
Cisco2620(config-if)# peer default ip address dhcp:将IP地址请求转发至DHCP服务器
Cisco2620(config-if)# ppp authentication chap:将认证设为CHAP
Cisco2620(config-if)# group-range 33 48:拨号组包括16个口
Cisco的16AM模块提供了高密度的模拟电路接入方式,不在办公大楼的员工可以用Modem拨号联入局域网、登录服务器,实现远程办公。
peer default ip address dhcp命令可以使拨入的工作站通过局域网内的DHCP服务器动态地获得IP地址,节约了IP地址资源,同时还接收了在DHCP服务器上配置的参数,比如DNS服务器的IP地址,并配合全局模式下配置的指向防火墙的静态路由,使工作站同时也可以通过防火墙访问Internet。
Cisco2620(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.4:设置到防火墙的静态路由
(5) 对16AM模块物理特性的设置
Cisco2620(config)#line 33 48: 进入Modem 口线模式
Cisco2620(config-line)# session-timeout 30:超时设为30分钟
Cisco2620(config-line)# autoselect during-login:自动登录
Cisco2620(config-line)# autoselect ppp:自动选择PPP协议
Cisco2620(config-line)# login local:允许本地口令检查
Cisco2620(config-line)# modem InOut:允许拨入拨出
Cisco2620(config-line)# transport input all:指定传输协议
Cisco2620(config-line)# stopbits 1:设置一位停止位
Cisco2620(config-line)# flowcontrol hardware:设置硬件流控制
(6) 添加拨号用户的用户名和密码
Cisco2620(config)#username shixuegang password abc123:增加用户名shixuegang,口令为abc123
(7) 启用rip路由
Cisco2620(config)#router rip:启用rip路由
Cisco2620(config-rout)#version 2:第二版本
Cisco2620(config-rout)#network xxx.xxx.xxx.xxx:指定要转发数据包的网络号
Cisco2620路由器故障判断和故障排除
1. 判断以太端口故障
对于以太端口故障的诊断,可以用show interface fastFastethernet 0/0(对于以太端口0的诊断)命令,它用来检查一条链路的状态,可能出现的结果如下:
如果以太网端口工作正常,则出现如下显示:Fastethernet 0/0 is up, line protocol is up;
如果存在连接故障,比如路由器未接到LAN上,则出现:Fastethernet 0/0 is up, line protocol is down;
如果接口出现故障,则出现:Fastethernet 0/0 is down, line protocol is down (disable) ;
接口被人为地关闭,则出现:Fastethernet 0/0 is administratively down, line protocol is down;
此外,当怀疑端口有物理性故障时,可用show version命令,该命令将显示出物理性正常的端口,而出现物理性故障的端口将不被显示出来。
2. 判断同步串行端口故障
我们可以用show interface serial 0/0命令检查一条链路的状态,如出现Serial 0/0 is up, line protocol is up字样,则表示工作正常;如出现serial 0/0 is up, line protocol is down字样,则表示端口无物理故障,但上层协议未通(IP、IPX、X25等,此时应查看路由器的配置命令,检查地址是否匹配);如出现Serial 0/0 is down, line protocol is down (disable) 字样,则表示端口出现物理性故障,此时应更换端口;如出现Serial 0/0 is down, line protocol is down字样,则表示DCE设备(Modem/DTU)未送来载波/时钟信号;如出现Serial 0/0 is administratively down, line protocol is down字样,则表示接口被人为地关闭,可在配置状态中interface_mode下去掉shutdown命令。
3. 判断模拟线路故障
可以先用电话直接拨打路由器中继线号码,听见啸叫声则说明线路正常,反之则应先查看电话线路。排除线路故障后如依然无法正常工作,就应查看路由器关于16AM模块的配置命令,确定配置命令无误后,可采取如下方法:
将模块重新良好接地;
升级路由器IOS版本;
更换16AM模块。
Cisco2620路由器的密码恢复和灾难性恢复
在使用路由器的过程中,经常会出现忘记密码的情况。同时,在操作过程中有时会因为一些不可预料的原因,使路由器内部的版本映像文件受到损坏,使路由器无法正常工作,导致路由器退回到监控状态,而使用常用的版本拷贝命令无法更新版本。这两个问题都是在日常维护中较为常见的问题。
1. 密码恢复
(1) 将路由器的Console口和计算机串口相连,启动计算机超级终端,开启路由器电源,在开机60秒内按ctrl+break 使路由器进入rom monitor 状态,并出现如下提示符:
rommon1
(2) 重新配置组态寄存器。
rommon1confreg
当出现do you wish to change the configuration (y/n) 时选择y,当出现enable ignore system configuration information(y/n) 时选择y。
(3) 重新启动路由器。
rommon1reset
(4) 启动后进入特权模式,执行如下命令使原来的配置信息有效。
router(config)#config mem
(5) 可以进一步查看密码或更改密码。
2. 版本的灾难性恢复
Cisco2620提供了两种灾难性恢复版本的方法:tftpdnld和xmodem方式。
(1) tftpdnld方式
将计算机串口和路由器Console口相连,计算机网口与路由器以太口(一定要与第一个以太口)相连。
启动TFTP服务器,将要下载的版本放于指定目录下面。
开启路由器电源,由于没有有效版本,路由器启动后将直接进入监控模式。
Rommon1
按如下命令设置参数。
Rommon2IP_ADDRESS=192.168.1.6: 将192.168.1.6地址配置到路由器的第一个以太端口
Rommon3IP_SUBNET_MASK=255.255.255.0:设置掩码
Rommon4DEFAULT_GATEWAY=192.168.1.7:指定TFTP服务器地址
Rommon5TFTP_FILE=c2600-i-mz.121-3.T:指定IOS文件名
Rommon6tftpdnld:下载IOS文件
组态配置寄存器
Rommon7confreg
当出现do you wish to change the configuration y/n时选择y,当出现 change the boot charaterist y/n时选择y,选择参数2。其他的选项选n。
启动版本
Rommon8 reset以上内容来自互联网,希望对大家有所帮助。
cisco Switching-三层交换配置RIP动态路由
在三层交换机上配置RIP路由协议,以三层交换机代替路由器。
通过RIP实现路由间通信
动态路由协议配置灵活,路由器会发送自身的路由信息给其他路由器,同时也会接收其他路由器发来的路由信息建立自己的路由表。这样在路由器上就不必像静态路由那样为每个目标地址都配置路由,因为路由器可以通过协议学习这些路由。网络拓扑改变,路由信息也会自动更新,无需管理员干预。
Switch(config)#interface f0/6
Switch(config-if)#no switchport
Switch(config-if)#ip address 192.168.6.1 255.255.255.0
Switch(config-if)#no shutdown
RIP路由协议在配置network时,只需要配置该路由器所直连的主类网络,不与该路由器直连的网络不需要包含在network中。
RIP默认工作在第一版本下,但是RIP-V1是有类路由协议,而且通过广播的方式进行路由更新,无论是功能上还是效率上都有一些缺陷,这些缺陷RIP-V2可以弥补。在使用时建议采用RIP-V2而不是RIP-V1。
tarenasw-3L(config)#router rip
tarenasw-3L(config-router)#version 2
tarenasw-3L(config-router)#no auto-summary
tarenasw-3L(config-router)#network 192.168.1.0
tarenasw-3L(config-router)#network 192.168.2.0
tarenasw-3L(config-router)#network 192.168.3.0
tarenasw-3L(config-router)#network 192.168.4.0
tarenasw-3L(config-router)#network 192.168.5.0
tarenasw-3L(config-router)#network 192.168.6.0
tarena-router(config)#router rip
tarena-router(config-router)#version 2
tarenasw-3L(config-router)#no auto-summary
tarena-router(config-router)#network 192.168.6.0
tarena-router(config-router)#network 192.168.7.0
注意以R开头的路由,这些路由表示通过RIP协议从其他运行RIP的路由器学习过来的路由。每条路由都写明了目标网络、下一跳IP地址以及从自己哪个端口发出去。
tarenasw-3L#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - 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 - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, Vlan1
C 192.168.2.0/24 is directly connected, Vlan2
C 192.168.3.0/24 is directly connected, Vlan3
C 192.168.4.0/24 is directly connected, Vlan4
C 192.168.5.0/24 is directly connected, Vlan5
C 192.168.6.0/24 is directly connected, FastEthernet0/6
R 192.168.7.0/24 [120/1] via 192.168.6.2, 00:00:12, FastEthernet0/6 0
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - 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 - ODR
P - periodic downloaded static route
Gateway of last resort is not set
R 192.168.1.0/24 [120/1] via 192.168.6.1, 00:00:25, FastEthernet0/0
R 192.168.2.0/24 [120/1] via 192.168.6.1, 00:00:25, FastEthernet0/0
R 192.168.3.0/24 [120/1] via 192.168.6.1, 00:00:25, FastEthernet0/0
R 192.168.4.0/24 [120/1] via 192.168.6.1, 00:00:25, FastEthernet0/0
R 192.168.5.0/24 [120/1] via 192.168.6.1, 00:00:25, FastEthernet0/0
C 192.168.6.0/24 is directly connected, FastEthernet0/0
C 192.168.7.0/24 is directly connected, FastEthernet0/1
5.在PC上测试到五个VLAN中主机的通信
PCipconfig
FastEthernet0 Connection:(default port)
Link-local IPv6 Address.........: FE80::2E0:8FFF:FE14:BB43
IP Address......................: 192.168.7.1
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.7.254
SERVERping 192.168.1.10
Pinging 192.168.1.10 with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time=0ms TTL=126
Reply from 192.168.1.1: bytes=32 time=0ms TTL=126
Reply from 192.168.1.1: bytes=32 time=0ms TTL=126
Reply from 192.168.1.1: bytes=32 time=1ms TTL=126
Ping statistics for 192.168.1.1:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
PC ping 192.168.2.1
Pinging 192.168.2.10 with 32 bytes of data:
Reply from 192.168.2.1: bytes=32 time=0ms TTL=126
Reply from 192.168.2.1: bytes=32 time=0ms TTL=126
Reply from 192.168.2.1: bytes=32 time=0ms TTL=126
Reply from 192.168.2.1: bytes=32 time=0ms TTL=126
Ping statistics for 192.168.2.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
PC ping 192.168.3.1
Pinging 192.168.3.10 with 32 bytes of data:
Reply from 192.168.3.1: bytes=32 time=1ms TTL=126
Reply from 192.168.3.1: bytes=32 time=0ms TTL=126
Reply from 192.168.3.1: bytes=32 time=0ms TTL=126
Reply from 192.168.3.1: bytes=32 time=0ms TTL=126
Ping statistics for 192.168.3.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
PC
31% /misc/nfsdir SERVER
SERVERping 192.168.3.10
Pinging 192.168.3.10 with 32 bytes of data:
Reply from 192.168.4.1: bytes=32 time=1ms TTL=126
Reply from 192.168.4.1: bytes=32 time=0ms TTL=126
Reply from 192.168.4.1: bytes=32 time=0ms TTL=126
Reply from 192.168.4.1: bytes=32 time=0ms TTL=126
Ping statistics for 192.168.4.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
31% /misc/nfsdir
SERVERping 192.168.5.1
Pinging 192.168.5.1 with 32 bytes of data:
Reply from 192.168.5.1: bytes=32 time=1ms TTL=126
Reply from 192.168.5.1: bytes=32 time=0ms TTL=126
Reply from 192.168.5.1: bytes=32 time=0ms TTL=126
Reply from 192.168.5.1: bytes=32 time=0ms TTL=126
Ping statistics for 192.168.5.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
31% /misc/nfsdir
无论你是新手还是有经验的用户,设置和优化你的路由器和WiFi网络都可以帮助你获得更快的速度和更可靠的连接。