1、Cisco路由器配置命令详细列表Cisco路由器配置命令详细列表 Cisco路由配置语句汇总 启动接口,分配IP地址:routerrouter enablerouter#router# configure terminalrouter(config)#router(config)# interface Type Portrouter(config-if)# no shutdownrouter(config-if)# ip address IP-Address Subnet-Maskrouter(config-if)# z配置RIP路由协议:30秒更新一次router(config)# rout
2、er riprouter(config-if)# network Network-Number router(config-if)# z配置IGRP路由协议:90秒更新一次router(config)# router igrp AS-Number router(config-if)# network Network-Number router(config-if)# z配置Novell IPX路由协议:Novell RIP 60秒更新一次router(config)# ipx routing node addressrouter(config)# ipx maximum-paths Paths
3、 router(config)# interface Type Portrouter(config-if)# ipx network Network-Number encapsulation encapsulation-type secondary router(config-if)# z配置DDR:router(config)# dialer-list Group-Number protocol Protocol-Type permit list ACL-Numberrouter(config)# interface bri 0router(config-if)# dialer-group
4、Group-Numberrouter(config-if)# dialer map Protocol-Type Next-Hop-Address name Hostname Telphone-Numberrouter(config-if)# z配置ISDN:router(config)# isdnth-typeth-Type router(config-if)# z配置Frame Relay:router(config-if)# encapsulation frame-relay cisco | ietf router(config-if)# frame-relay lmi-type ansi
5、 | cisco | q933a router(config-if)# bandwidth kilobitsrouter(config-if)# frame-relay invers-arp Protocol dlci router(config-if)# z配置标准ACL:router(config)# access-list Access-List-Number permit | deny source source-mask router(config)# interface Type Portrouter(config-if)# ip access-group Access-List-
6、Number in | out router(config-if)# z配置扩展ACL:router(config)# access-list Access-List-Number permit | deny Protocol | Protocol-Number source source-wildcard Source-Port destination destination-wildcard Destination-Port established router(config)# interface Type Portrouter(config-if)# ip access-group A
7、ccess-List-Number in | out router(config-if)# z配置命名ACL:router(config)# ip access-list standard | extended ACL-Namerouter(config std- | ext- nacl)# permit | deny IP-Access-List-Test-Conditions router(config std- | ext- nacl)# no permit | deny IP-Access-List-Test-Conditions router(config std- | ext- n
8、acl)# zrouter(config)# interface Type Portrouter(config-if)# ip access-group ACL-Name | 1199 in | out router(config-if)# z配置DCE时钟: router# show controllers Type Port router(confin-if)# clock rate 64000 router(config-if)# z配置PPP协议:router(config)# username Name password Set-Password-Here router(config
9、)# interface Type Portrouter(config-if)# encapsulation ppp router(config-if)# ppp outhentication chap | chap pap | pap chap | pap router(config-if)# ppp pap sent-username Name password Password router(config-if)# zPAP单向认证配置实例:验证方:router-server(config)# username Client password 12345 router-server(co
10、nfig)# interface serial 0router-server(config-if)# encapsulation ppprouter-server(config-if)# ppp authentication pap router-server(config-if)# z 被验证方:router-client(config-if)# encapsulation ppprouter-client(config-if)# ppp pap sent-username Client password 12345 router-client(config-if)# zPAP双向认证配置实
11、例:路由器 A:routerA(config)# username B password 12345routerA(config)# interface serial 0routerA(config-if)# encapsulation ppprouterA(config-if)# ppp authentication paprouterA(config-if)# ppp pap sent-username A password 54321routerA(config-if)# z路由器 B:routerB(config)# username A password 54321routerB(c
12、onfig)# interface serial 1routerB(config-if)# encapsulation ppprouterB(config-if)# ppp authentication paprouterB(config-if)# ppp pap sent-username B password 12345routerB(config-if)# zCHAP单向认证配置实例:验证方:router-server(config)# username router-client password 12345 router-server(config)# interface seria
13、l 0router-server(config-if)# encapsulation ppprouter-server(config-if)# ppp authentication chaprouter-server(config-if)# z 被验证方:router-client(config-if)# encapsulation ppprouter-client(config-if)# ppp authentication chaprouter-client(config-if)# ppp chap hostname router-clientrouter-client(config-if
14、)# ppp chap password 12345router-client(config-if)# z CHAP双向认证配置实例:路由器 A:routerA(config)# username routerB password 12345routerA(config)# interface serial 0routerA(config-if)# encapsulation ppprouterA(config-if)# ppp authentication chaprouterA(config-if)# ppp chap hostname routerArouterA(config-if)#
15、 ppp chap password 54321routerA(config-if)# z路由器 B:routerB(config)# username routerA password 54321routerB(config)# interface serial 1routerB(config-if)# encapsulation ppprouterB(config-if)# ppp authentication chaprouterB(config-if)# ppp chap hostname routerBrouterB(config-if)# ppp chap password 123
16、45routerB(config-if)# zTelnet使用:routerA# terminal monitor routerA# telnet IP-Address Router-Name routerB# exit | logout routerB# +再按 routerA# show sessions routerA# Connect-Number routerA# disconnect IP-Address Router-Name routerA# show user routerA# clear line 0 | 1 | 2 | 3 | 4 禁止任何Telnet到本机:router
17、(config)# line vty 0 4 router(config-line)# access-class ACL-Numberrouter(config)# z设置主机名:router(config)# hostname Set-Hostnamerouter(config)# zrouter(config)# z设置用户模式密码:router(config)# line console 0router(config-line)# loginrouter(config-line)# password Set-Passwordrouter(config-line)# z设置Telnet密码
18、:router(config)# line vty 0 4router(config-line)# loginrouter(config-line)# password Set-Passwordrouter(config-line)# z设置特权模式密码:router(config)# enable password Set-Password router(config)# enable secret Set-Password router(config)# z给所有密码加密:router(config)# service password-ancryption Set-Password-He
19、rerouter(config)# no service password-ancryption router(config)# z设置登录Banner:router(config)# banner motd 设置接口的描述信息:router(config-if)# description Set-Port-InFORMation-Hererouter(config)# zCDP的控制:router(config-if)# cdp enable router(config-if)# no cdp enable router(config)# cdp run router(config)# no
20、 cdp run Ping的使用:router# ping IP-Addressrouter# ping Protocol ip: Protocol-Type Target IP address:IP-Address Repeat count 5: Datagram size 100: Timeout in seconds 2: Extended commands n:y Sweep range of sizes n:Tracke的使用: router# trace IP-Address Host-Name 为Cisco 4000路由器指定媒体类型:router(config-if)# med
21、ia-type 10baset router(config-if)# z更改路由器启动顺序:router(config)# boot system flash IOS-FileNamerouter(config)# boot system tftp IOS-FileName TFTP-IP-Addressrouter(config)# boot system romrouter(config)# z修改寄存器数值:router(config)# config-register value 在ROM监视器中更改寄存器数值: o/r value路由器密码的恢复:冷关机,然后再开机并在60秒内按+进
22、入ROM监视器模式 o/r 0x2142 或 confreg 0x2142 router Irouter nrouter enablerouter# copy startup-config running-configrouter# configure terminalrouter(config)# enable secret New-Passwordrouter(config)# config-register 0x2102router(config)# zrouter# copy running-config startup-configrouter# reload 配置名称主机入口:ro
23、uter(config)# ip host Set-Name TCP-Port-Number IP-Address IP-Address 2 .。router(config)# z定义DNS主机:router(config)# ip name-server Server-Address Server-Address 2 .。router(config)# z禁用DNS:router(config)# no ip domain-lookuprouter(config)# z配置水平分割:router(config-if)# ip split-horizonrouter(config-if)# n
24、o ip split-horizonrouter(config-if)# z配置静态路由:router(config)# ip route IP-Address Subnet-Mask Next-Hop-Address | Local-Out-Port Distace router(config)# z配置缺省路由: router(config)# ip defoult-network IP-Address router(config)# ip route 0.0.0.0 0.0.0.0 Next-Hop-Address | Local-Out-Port Distace router(config)# z其它命令:router# show versionrouter# show running-configrouter# show sta
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1