路由器基本命令_第1页
路由器基本命令_第2页
路由器基本命令_第3页
路由器基本命令_第4页
路由器基本命令_第5页
已阅读5页,还剩41页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、路由器常用命令信息科技中心2011年4月26日路由器如何接入PC1、神码路由器配置专线console;2、配置线的RJ45接口的一端接入路由器CON端口;3、配置线的另一端口接入PC机后面的com1端口。4、打开路由器后面的ON电源开关;配置超级终端1、打开程序附件通讯超级终端;2、超级终端名称可随意输入:如1233、连接时使用COM1端口;4、端口设置:单击“还原为默认值”;5、单击“确定”6、出现光标亮点时回车;登陆路由器1、回车后出现router (router路由默认符)n 用户特权模式,2、routerenable (转全局模式)nrouter# 全局配置模式enable用户模式1、

2、在router后输入enable(或简写ena)nrouterenanrouter#2、router# exit (将从全局模式退回到用户模式)nrouter#exit3、routerenable用户模式3、enable password *密码(为ena用户登陆设置密码)nrouterenablenrouter#conf terminal % Enter configuration commands, one per line. End with CNTL+Z.nrouter(config)#enable password zmdnx(密码zmdnx )nrouter(config)#Exi

3、tnrouter#Configure terminal(简写conf t) 全局配置n例:router#conf terminal % Enter configuration commands, one per line. End with CNTL+Z. router(config)#n_config# 后带的常用参数有 terminal - 设置终端 interface - 配置接口 ip - IP 配置命令 exit - 退出或返回上一级菜单Configure全局配置l _config# 后带的常用参数有 hostname - 设置路由器名字 ping - 测试网络状态 reboot -

4、 重启动路由器 show - 显示配置和状态 write - 保存当前配置 Chinese命令:设置中文帮助n在router#后输入Chinese命令1、 router# chinese2、 router# ?再次查看可用命令,就会出现命令后面有对应的中文字幕描述例如: chinese - 中文帮助信息 clear - 清除屏幕 ?n获得帮助键n?获得当前可用的命令列表nS?显示已知字符开头的命令行nshow ?获得命令参数列表n up 显示以前输入的命令hostnamen在全局配置模式下显示或设置路由器的主机名称,默认为routen例:routerenan Password:n router

5、#conf tnrouter(config)#hostname zmdnxnzmdnx(config)# zmdnx为路由器新名称Ping检查网络的连通性Ping后缀常用参数 -t 一直Ping指定的计算机,直到从键盘按下Control-C中断。nrouterPing 本地地址(检验与本地设备的连通性)nrouter Ping 远端服务器(检查与中心节点的连通性)n例:C:Documents and SettingsAdministratorping 11.125.230.190Pinging 11.125.230.190 with 32 bytes of data:Reply from 11

6、.125.230.190: bytes=32 time=5ms TTL=252Ping检查网络的连通性Reply from 11.125.230.190: bytes=32 time=7ms TTL=252Reply from 11.125.230.190: bytes=32 time=7ms TTL=252Reply from 11.125.230.190: bytes=32 time=6ms TTL=252Ping statistics for 11.125.230.190: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Appro

7、ximate round trip times in milli-seconds: Minimum = 5ms, Maximum = 7ms, Average = 6ms rebootn重启路由系统(在全局模式下)nrouter#reboot Do you want to reboot the router(y/n)?-Y 重启路由器-N 不重启路由器Writen保存设置,在全局模式下保存当前配置,以免断电或重启后恢复为原来的配置。n#writeSaving current configuration.OK!#date在配置模式下改变路由器当前日期及时间nrouterenanrouter#co

8、nf tnRouter(config)#daten当前日期是 2002年1月1日 5时:17分:40秒n请输入新的日期(yyyy-mm-dd):n请输入新的时间(hh:mm:ss):nrouter_config# snmp(远程网络控制配置)nSNMP 简单网络管理协议,用于管理IP网络上结点的协议 nrouter(config)# Snmp-server view default 1.3.6.1 include ;snmp代理在启动时会配置一个初始的视图 default ,对应的OID为1.3.6.1,include表示包含MIB库 1.3.6.1子树下的所有对象。snmp(远程网络控制配置

9、)nrouter(config)# Snmp-server community public ro;设置团体名为public的网管工作者对该路由器的操作树根为可读。nrouter(config)# Snmp-server community hnnx rw;设置团体名为hnnx的网管工作者对该路由器的操作树根为可读可写。 nrouter(config)# EndShutdown关闭端口n例:routeren lrouter#conf t 终端配置lRouter(config)#int FastEthernet0/0nrouter(config-if)# shutdown关闭端口,使接口的lin

10、e状态处于down,此时接口不接收发任何数据。n在配好了ip的时,一般端口默认是没有开启的 nrouteren lrouter#conf t 终端配置l例:router(config)#int FastEthernet0/1 进入端口FastEthernet0/1lrouter(config-if)# shutdown 关闭端口FastEthernet0/1no shutdowm 激活端口nrouteren lrouter#conf t 终端配置l例: router(config)#int FastEthernet0/1 进入端口FastEthernet0/1l例: router(config

11、-if)#no shutdown 激活端口FastEthernet0/1nrouter#shownanhuan#show int FastEthernet0/1 FastEthernet0/1 is up, line protocol is up address is 00e0.0f27.6401 Interface address is 11.125.131.201/28 MTU 1500 bytes, BW 100000 kbit, DLY 10 usec Encapsulation ARPA, loopback not settelnet(打开一个telnet连接)n#telnet A.

12、B.C.D 远端系统的IP地址n#telnet A.B.C.D 远端广域网IP地址n远程登录(远程用户必须设有ena登陆密码)例c: telnet 远程IP地址11.125.230.190上蔡南环IPUser Access VerificationnUsername: zmdnx Password: * (用username zmdnx password 0 *设置的登陆密码) telnet(打开一个telnet连接)Welcome to DCR Multi-Protocol 2650 Series RouternnanhuannnanhuanenanPassword:* (用enable p

13、assword 0 *设置的特权密码)nnanhuan#Show显示配置与状态l#show running-config 显示当前配置信息!version 1.3.2Nservice timestamps log dateservice timestamps debug dateno service password-encryption!hostname nanhuan! username zmdnx password 0 *!#show running-configaaa authentication login default localenable password 0 * level

14、 15!interface FastEthernet0/0 ip address 11.125.194.241 255.255.255.240 no ip directed-broadcast!interface FastEthernet0/1 ip address 11.125.131.201 255.255.255.248 no ip directed-broadcast #show running-confign!ninterface Serial0/2n ip address 11.125.230.190 255.255n no ip directed-broadcastn encap

15、sulation pppn!ninterface Serial0/3n ip address 11.125.232.190 255.255n no ip directed-broadcastn encapsulation pppn!ninterface Async0/0n no ip addressn no ip directed-broadcastn!#show running-confign!nip route 11.125.0.0 255.255.255.0nip route 11.125.0.0 255.255.255.0nip route 11.125.32.0 255.255.22

16、4.0nip route 11.125.32.0 255.255.224.0nip route 11.124.32.0 255.255.224.0nip route 11.124.32.0 255.255.224.0nip route 11.0.32.0 255.255.224.0 1nip route 11.0.32.0 255.255.224.0 1nip route 11.125.128.0 255.255.254.nip route 11.125.128.0 255.255.254.nip route 11.124.128.0 255.255.254.nip route 11.124.

17、128.0 255.255.254.#show running-confignip route 11.0.128.0 255.255.254.0nip route 11.0.128.0 255.255.254.0nip route 11.124.80.0 255.255.255.2nip route 11.124.80.0 255.255.255.2nip route 11.125.81.0 255.255.255.2nip route 11.125.81.0 255.255.255.2n!ngateway-cfgn gateway keepAlive 60n shutdownn!#show

18、running-confign!nsnmp-server community public ROnsnmp-server community hnnx RWn!nivr-cfgn!n!nh323proxy-cfgn shutdownn!nnanhuan#show int FastEthernet0/0查看接口FastEthernet0/0信息nnanhuan_config#show int FastEthernet0/0FastEthernet0/0 is up, line protocol is upaddress is 00e0.0f27.6400 Interface address is

19、 11.125.194.241/28 MTU 1500 bytes, BW 100000 kbit, DLY 10 usec Encapsulation ARPA, loopback not set Keepalive not set ARP type: ARPA, ARP timeout 04:00:00 60 second input rate 36 bits/sec, 0 packets/sec!#show int FastEthernet0/060 second output rate 0 bits/sec, 0 packets/sec! Full-duplex, 100Mb/s, 1

20、00BaseTX, 21646 ii, 13282 oi 21646 packets input, 1486142 bytes, 200 rx_freebuf Received 18383 unicasts, 0 lowmark, 21646 ri, 0 input errors 0 overrun, 0 CRC, 0 framing, 0 busy, 0 long, 0 discard, 0 throttles 13282 packets output, 2391863 bytes, 50 tx_freebd, 0 output errors 0 underrun, 0 collisions

21、, 0 late collisions, 0 deferred, 0 reTx expire 0 resets, 0 lost carrier, 0 no carrier 0 grace stop 0 bus error 0 output buffer failures, 0 output buffers swapped out 0 tx errors!nnanhuan_config#show ip int brief 查看接口状态nnanhuan#show ip int brief Interface IP-Address Method Protocol-StatusAsync0/0 una

22、ssigned manual downSerial0/2 11.125.230.190 manual upSerial0/3 11.125.232.190 manual downFastEthernet0/0 11.125.194.241 manual upFastEthernet0/1 11.125.131.201 manual upnanhuan#show version查看版本及引导信息nnanhuan#show versionDigitalchina Internetwork Operating System Software2650 Series Software, Version

23、1.3.2N (FULL), RELEASE SOFTWARECopyright (c) 1996-2004 by China Digitalchina CO.LTDCompiled: 2005-8-20 20:41:59 by system, Image text-base: 0 x6004ROM: System Bootstrap, Version 0.4.3Serial num:8IRT74106518000107, ID num:011393System image file is DCR26V1.3.2N.bin#show version查看版本及引导信息DCR-2650 Power

24、PC Processor65536K bytes of memory,16384K bytes of flashnanhuan uptime is 49:10:09:38, The current time: 2002-2-19 10:9:38Slot 0: SCC Slot Port 0: 10/100Mbps full-duplex Ethernet Port 1: 10/100Mbps full-duplex Ethernet Port 2: 2M full-duplex Serial Port 3: 2M full-duplex Serialnnanhuan#linen物理线路设置nr

25、outer(config) # line vty 0 4 设置0-4 个用户可以telnet远程登陆n router(config) # password 0 *(为zmdnx用户设置口令)nrouter(config)# Exitlinen例:router#conf t% Enter configuration commands, one per line. End with CNTL+Z.router(config)#line vty 0 4nrouter(config-line)#password 0 hnnxnrouter(config-line)#exitnrouter(config

26、)#int 接口(进接口模式)n接口分为:以太网接口Ethernet;同步串行接口serial;虚拟接口virtual-template;例:serial1/0端口中,1代表PORT端口号,0代表PORT端口号的第0个接口,但也有从1开始设置的接口。n例: (config)# interface FastEthernet0/1 ip address 11.132.192.65 255.255.255.240 */E0网关*/ n例(config)# interface Serial0/2 ip address 11.132.230.18*/本端广域网地址*/ 255.255.255.240 a

27、aa远程登录认证n先配置AAA远程登录认证 router(config)# aaa authentication login default local设置登陆验证默认为采用先ACS服务器再本地验证 lrouter(config)# Username enable登陆用户 password 0 登陆密码*enc协议命令进入需要封装或更改协议的端口nrouter#confignRouter(config)#interface serial1/0nRouter(config- serial1/0)#enc pppnRouter(config)#no shutdownip设置IP地址n例:1、(co

28、nfig)#interface FastEthernet0/0n 2、(config- FastEthernet0/0)# ip address 11.130.131.25 255.255.255.248 /*设置路由器IP地址/ 3、(config- FastEthernet0/0)# exit 4、 (config- FastEthernet0/0)# show int FastEthernet0/0FastEthernet0/0 is up, line protocol is upaddress is 00e0.0f27.6400Interface address is 11.130.1

29、31.25 /28MTU 1500 bytes, BW 100000 kbit, DLY 10 usecEncapsulation ARPA, loopback not set ip设置n例: 1、(config)#interface FastEthernet0/2 2、(config- FastEthernet0/2)# ip address 192.169.1.1 255.255.255.240 /*设置路由器IP地址/ 3、(config- FastEthernet0/2)# show int FastEthernet0/2 4、(config- FastEthernet0/2)# exitNo撤销命令n如果你想撤销一个命令或恢复为缺省设置,可以在大多数命令前加关键字no。n 1、(config)#interface FastEthernet0/2 2、(config- FastEthernet0/2)# ip address 192.169.1.1 255.255.255

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论