思科路由器配置与命令使用说明

在用户模式下敲“enable”可以进入特权模式
conf t 进入全局配置模式
hostname lab_a 给路由器命名
lab_a(config)#inter e0 //进入e0端口配置模式
lab_a(config-if)#ip addr 192.5.5.1 255.255.255.0    //设置e0端口的ip
lab_a(config-if)#no shut //激活端口
lab_a(config-if)#exit
 
lab_a(config)#inter e1 //进入e1端口配置模式
lab_a(config-if)#ip addr 205.7.5.1 255.255.255.0    //设置e1端口的ip
lab_a(config-if)#no shut //激活e1端口
lab_a(config-if)#exit

lab_a(config)#inter s1 //进入s1端口配置模式
lab_a(config-if)#ip addr 201.100.11.1 255.255.255.0    这个为设置s1端口的ip
lab_a(config-if)#clock rate 56000 //时钟频率为56kb/s
lab_a(config-if)#exit

lab_a(config)#router rip //进入rip协议配置子模式
lab_a(config-router)#network 192.5.5.0 //声明网络
lab_a(config-router)#network 205.7.5.0
lab_a(config-router)#network 201.100.11.0
lab_a(config-router)#exit

都设置好后就进行测试
测试主要用到show和ping 这两个命令
 
router#show run //显示当前配置
你那是普通用户模式 当然不对

router#show e0 //显示e0口配置
router#ping 其他路由器的ip地址或自己端口的ip
如果能ping通别的路由器说明你的rip配置成功了



1. router>
路由器处于用户命令状态,这时用户可以看路由器的连接状态,访问其它网络和主机,但不能看到和更改路由器的设置内容。
2. router#
在router>提示符下键入enable,路由器进入特权命令状态router#,这时不但可以执行所有的用户命令,还可以看到和更改路由器的设置内容。
3. router(config)#
在router#提示符下键入configure terminal,出现提示符router(config)#,此时路由器处于全局设置状态,这时可以设置路由器的全局参数。
4. router(config-if)#; router(config-line)#; router(config-router)#;…
路由器处于局部设置状态,这时可以设置路由器某个局部的参数。
5. > 路由器处于RXBOOT状态,在开机后60秒内按ctrl-break可进入此状态,这时路由器不能完成正常的功能,只能进行软件升级和手工引导。
6. 设置对话状态
这是一台新路由器开机时自动进入的状态,在特权命令状态使用SETUP命令也可进入此状态,这时可通过对话方式对路由器进行设置。
设置对话过程
1. 显示提示信息
2. 全局参数的设置
3. 接口参数的设置
4. 显示结果
利用设置对话过程可以避免手工输入命令的烦琐,但它还不能完全代替手工设置,一些特殊的设置还必须通过手工输入的方式完成。
进入设置对话过程后,路由器首先会显示一些提示信息:
--- System Configuration Dialog ---
At any point you may enter a question mark '?' for help.
Use ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'.
这是告诉你在设置对话过程中的任何地方都可以键入“?”得到系统的帮助,按ctrl-c可以退出设置过程,缺省设置将显示在‘[]’中。然后路由器会问是否进入设置对话: Would you like to enter the initial configuration dialog? [yes]:
如果按y或回车,路由器就会进入设置对话过程。首先你可以看到各端口当前的状况:
First, would you like to see the current interface summary? [yes]:
Any interface listed with OK? value "NO" does not have a valid configuration
Interface IP-Address OK? Method Status Protocol
Ethernet0 unassigned NO unset up up
Serial0 unassigned NO unset up up
……… ……… … …… … …
然后,路由器就开始全局参数的设置:
Configuring global parameters:
1.设置路由器名:
Enter host name [Router]: 
设置进入特权状态的密文(secret),此密文在设置以后不会以明文方式显示:
The enable secret is a one-way cryptographic secret used
instead of the enable password when it exists.
Enter enable secret: cisco
3.设置进入特权状态的密码(password),此密码只在没有密文时起作用,并且在设置以后会以明文方式显示:
The enable password is used when there is no enable secret
and when using older software and some boot images.
Enter enable password: pass 
4.设置虚拟终端访问时的密码:
Enter virtual terminal password: cisco
5.询问是否要设置路由器支持的各种网络协议:
Configure SNMP Network Management? [yes]:
Configure DECnet? [no]:
Configure AppleTalk? [no]:
Configure IPX? [no]:
Configure IP? [yes]:
Configure IGRP routing? [yes]:
Configure RIP routing? [no]:
……… 
6.如果配置的是拨号访问<strong οnmοuseοver="isShowAds = true;isShowAds2 = true;ads.Move(this,"http://rad.17luntan.com/UploadImage/35/633126917321406250.bmp","IBM%u56DB%u6838%u670D%u52A1%u5668%uFF0C%u5C06%u6570%u636E%u4E2D%u5FC3%u7684%u6548%u7387%u63A8%u5411%u6781%u81F3","41627","服务器","%u670D%u52A1%u5668","http%3A//ad.cn.doubleclick.net/clk%3B99695257%3B16833058%3Bd%3Fhttp%3A//www.51cto.com/exp/bladecenter/")" style="FONT-WEIGHT: normal; CURSOR: hand; COLOR: blue; TEXT-DECORATION: underline" οnclick="javascript:window.open("http://s4.17luntan.com/ClickPortal/WebClick.aspx?id=41627&k=%u670D%u52A1%u5668&siteid=A38830CE-F69A-4F08-BBC0-3EDC5C68FE5E&url=http%3A//www.jysls.com/thread-173643-1-1.html&gourl=http%3A//ad.cn.doubleclick.net/clk%3B99695257%3B16833058%3Bd%3Fhttp%3A//www.51cto.com/exp/bladecenter/&parm=D6340B5409B1C822E411CB2F358D2BB889C3072F137A4006&alliedsiteid=0");" οnmοuseοut="isShowAds = false;isShowAds2 = false;">服务器,系统还会设置异步口的参数:
Configure Async lines? [yes]:
1) 设置线路的最高速度:
Async line speed [9600]:
2) 是否使用硬件流控:
Configure for HW flow control? [yes]:
3) 是否设置modem:
Configure for modems? [yes/no]: yes
4) 是否使用默认的modem命令:
Configure for default chat script? [yes]: 
5) 是否设置异步口的PPP参数:
Configure for Dial-in IP SLIP/PPP access? [no]: yes
6) 是否使用动态IP地址:
Configure for Dynamic IP addresses? [yes]:
7) 是否使用缺省IP地址:
Configure Default IP addresses? [no]: yes
8) 是否使用TCP头压缩:
Configure for TCP Header Compression? [yes]:
9) 是否在异步口上使用路由表更新:
Configure for routing updates on async links? [no]: y
  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值