您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

思科 常用配置命令及参数

2024/4/13 7:15:47发布19次查看
启动接口,分配ip地址: router router enable router# router# configure terminal router(config)# router(config)# interface type port router(config-if)# no shutdown router(config-if)# ip address ip-address subnet-mask router(config-if)# ^z
启动接口,分配ip地址:
router>
router> enable
router#
router# configure terminal
router(config)#
router(config)# interface type port
router(config-if)# no shutdown
router(config-if)# ip address ip-address subnet-mask
router(config-if)# ^z
配置rip路由协议:30秒更新一次
router(config)# router rip
router(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 address]
router(config)# ipx maximum-paths paths
router(config)# interface type port
router(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-number]
router(config)# interface bri 0
router(config-if)# dialer-group group-number
router(config-if)# dialer map protocol-type next-hop-address name hostname telphone-number
router(config-if)# ^z
配置isdn:
router(config)# isdn swith-type swith-type 配置isdn交换机类型,中国使用basic-net3-->
router(config-if)# ^z
配置frame relay:
router(config-if)# encapsulation frame-relay [cisco | ietf ]
router(config-if)# frame-relay lmi-type [ansi | cisco | q933a ]
router(config-if)# bandwidth kilobits
router(config-if)# frame-relay invers-arp [ protocol ] [dlci ]
配置静态invers arp表:
router(config)# frame-relay protocol protocol-address dlci [broadcast ] [ ietf | cisco ] [ payload-compress | packet-by-packet ]
-->
router(config-if)# keepalive number
-->
router(config-if)# frame-lelay local-dlci number
-->
配置:
router(config-if)# interface type port.subininterface-number [ multipoint | point-to-point ]
router(config-subif)# ip unnumbered interface
router(config-subif)# frame-lelay local-dlci number
-->
router(config-if)# ^z
配置标准acl:
router(config)# access-list access-list-number [ permit | deny ]source [ source-mask ]
router(config)# interface type port
router(config-if)# ip access-group access-list-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 port
router(config-if)# ip access-group access-list-number [ in | out ]
router(config-if)# ^z
配置命名acl:
router(config)# ip access-list [ standard | extended ] acl-name
router(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- ] nacl)# ^z
router(config)# interface type port
router(config-if)# ip access-group [acl-name | 1~199 ] [ 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)# interface type port
router(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)# ^z
pap单向认证配置实例:
验证方:
router-server(config)# username client password 12345
router-server(config)# interface serial 0
router-server(config-if)# encapsulation ppp
router-server(config-if)# ppp authentication pap
router-server(config-if)# ^z
被验证方:
router-client(config-if)# encapsulation ppp
router-client(config-if)# ppp pap sent-username client password 12345
router-client(config-if)# ^z
pap双向认证配置实例:
路由器 a:
routera(config)# username b password 12345
routera(config)# interface serial 0
routera(config-if)# encapsulation ppp
routera(config-if)# ppp authentication pap
routera(config-if)# ppp pap sent-username a password 54321
routera(config-if)# ^z
路由器 b:
routerb(config)# username a password 54321
routerb(config)# interface serial 1
routerb(config-if)# encapsulation ppp
routerb(config-if)# ppp authentication pap
routerb(config-if)# ppp pap sent-username b password 12345
routerb(config-if)# ^z
chap单向认证配置实例:
验证方:
router-server(config)# username router-client password 12345
router-server(config)# interface serial 0
router-server(config-if)# encapsulation ppp
router-server(config-if)# ppp authentication chap
router-server(config-if)# ^z
被验证方:
router-client(config-if)# encapsulation ppp
router-client(config-if)# ppp authentication chap
router-client(config-if)# ppp chap hostname router-client
router-client(config-if)# ppp chap password 12345
router-client(config-if)# ^z
chap双向认证配置实例:
路由器 a:
routera(config)# username routerb password 12345
routera(config)# interface serial 0
routera(config-if)# encapsulation ppp
routera(config-if)# ppp authentication chap
routera(config-if)# ppp chap hostname routera
routera(config-if)# ppp chap password 54321
routera(config-if)# ^z
路由器 b:
routerb(config)# username routera password 54321
routerb(config)# interface serial 1
routerb(config-if)# encapsulation ppp
routerb(config-if)# ppp authentication chap
routerb(config-if)# ppp chap hostname routerb
routerb(config-if)# ppp chap password 12345
routerb(config-if)# ^z
telnet使用:
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(config)# line vty 0 4
router(config-line)# access-class acl-number
router(config)# ^z
设置主机名:
router(config)# hostname set-hostname
router(config)# ^z
router(config)# ^z
设置用户模式密码:
router(config)# line console 0
router(config-line)# login
router(config-line)# password set-password
router(config-line)# ^z
设置telnet密码:
router(config)# line vty 0 4
router(config-line)# login
router(config-line)# password set-password
router(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-here
router(config)# no service password-ancryption
router(config)# ^z
设置登录banner:
router(config)# banner motd 分隔符 set-banner-information-here 分隔符
设置接口的描述信息:
router(config-if)# description set-port-information-here
router(config)# ^z
cdp的控制:
router(config-if)# cdp enable
router(config-if)# no cdp enable
router(config)# cdp run
router(config)# no cdp run
ping的使用:
router# ping ip-address
router# 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)# media-type 10baset
router(config-if)# ^z
更改路由器启动顺序:
router(config)# boot system flash ios-filename
router(config)# boot system tftp ios-filename tftp-ip-address
router(config)# boot system rom
router(config)# ^z
修改寄存器数值:
router(config)# config-register value
在rom监视器中更改寄存器数值:
> o/r value
路由器密码的恢复:
冷关机,然后再开机并在60秒内按+
进入rom监视器模式
> o/r 0x2142 或 > confreg 0x2142
router> i
router> n
router> enable
router# copy startup-config running-config
router# configure terminal
router(config)# enable secret new-password
router(config)# config-register 0x2102
router(config)# ^z
router# copy running-config startup-config
router# reload
配置名称-主机入口:
router(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-lookup
router(config)# ^z
配置水平分割:
router(config-if)# ip split-horizon
router(config-if)# no ip split-horizon
router(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 version
router# show running-config
router# show startup-config
router# show flash
router# show interface [ type port ]
router# show buffers
router# show protocol
router# show mem
router# show stacks
router# show processes
router# show cdp entry [ device-name ]
router# show cdp neighbors
router# show cdp neighbors detail
router# show ip router
router# show ipx router
router# show host
router# show ip protocol
router# show ip interface type port
router# show ipx interface type port
router# show ipx servers
router# show ipx traffic
router# show access-lists [ acl-number ]
router# show isdn status
router# show dialer
router# show isdn active
router# show frame-relay pvc
router# show frame-relay map
router# show frame-relay lmi
router# erase startup-config
router# reload
router# setup
router# copy running-config startup-config
router# copy startup-config running-config
router# copy tftp running-config
router# copy running-config tftp
router# debug ipx routing activity
router# debug ipx sap
router# debug isdn q921
router# debug isdn q931
router# debug dialer
router# debug ip rip
router# clear interface bri [ 0 | 1 | 2
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product