搜档网
当前位置:搜档网 › 思科路由器常用配置命令一览表

思科路由器常用配置命令一览表

思科路由器常用配置命令一览表
思科路由器常用配置命令一览表

思科路由器常用配置命令一览表:

1、Exec commands:

<1-99> 恢复一个会话

bfe 手工应急模式设置

clear 复位功能

clock 管理系统时钟

configure 进入设置模式

connect 打开一个终端

copy 从tftp服务器拷贝设置文件或把设置文件拷贝到tftp服务器上debug 调试功能

disable 退出优先命令状态

disconnect 断开一个网络连接

enable 进入优先命令状态

erase 擦除快闪内存

exit 退出exce模式

help 交互帮助系统的描述

lat 打开一个本地传输连接

lock 锁定终端

login 以一个用户名登录

logout 退出终端

mbranch 向树形下端分支跟踪多路由广播

mrbranch 向树形上端分支跟踪反向多路由广播

name-connection 给一个存在的网络连接命名

no 关闭调试功能

pad 打开X.29 PAD连接

ping 发送回显信息

ppp 开始点到点的连接协议

reload 停机并执行冷启动

resume 恢复一个活动的网络连接

rlogin 打开远程注册连接

rsh 执行一个远端命令

send 发送信息到另外的终端行

setup 运行setup命令

show 显示正在运行系统信息

slip 开始SLIP协议

start-chat 在命令行上执行对话描述

systat 显示终端行的信息

telnet 远程登录

terminal 终端行参数

test 测试子系统内存和端口

tn3270 打开一个tin3270连接

trace 跟踪路由到目的地

undebug 退出调试功能

verify 验证检查闪烁文件的总数

where 显示活动的连接

which-route 执行OSI路由表查找并显示结果write 把正在运行的设置写入内存、网络、或终端x3 在PAD上设置X.3参数

xremote 进入xremote模式

2、#show ?

access-expression 显示访问控制表达式

access-lists 显示访问控制表

apollo Apollo 网络信息

appletalk Apple Talk 信息

arap 显示Appletalk 远端通道统计

arp 地址解析协议表

async 访问路由接口的终端行上的信息

bridge 前向网络数据库

buffers 缓冲池统计

clns CLNS网络信息

clock 显示系统时钟

cmns 连接模式网络服务信息

compress 显示压缩状态

configuration 非易失性内存的内容

controllers 端口控制状态

debugging 调试选项状态

decnet DEC网络信息

dialer 拨号参数和统计

dnsix 显示Dnsix/DMPP信息

entry 排队终端入口

extended 扩展端口信息

flash 系统闪烁信息

flh-log 闪烁装载帮助日志缓冲区

frame-relay 帧中继信息

history 显示对话层历史命令

hosts IP域名,查找方式,名字服务,主机表interfaces 端口状态和设置

ip IP信息

ipx Novell IPX信息

isis IS-IS路由信息

keymap 终端键盘映射

lat DEC LAT信息

line 终端行信息

llc2 IBM LLC2 环路信息

lnm IBM 局网管理

local-ack 本地认知虚环路

memory 内存统计

netbios-cache NetBios命名缓冲存贮器内存node 显示已知LAT节点

ntp 网络时间协议

processes 活动进程统计

protocols 活动网络路由协议

queue 显示队列内容

queueing 显示队列设置

registry 功能注册信息

rhosts 远程主机文件

rif RIF存贮器入口

route-map 路由器信息

sdlle 显示sdlc-llc2转换信息

services 已知LAT服务

sessions 远程连接信息

smds SMDS信息

source-bridge 源网桥参数和统计spanning-tree 跨越树形拓朴

stacks 进程堆栈应用

standby 热支持协议信息

stun STUN状态和设置

subsystem 显示子系统

tcp TCP连接状态

terminal 显示终端设置

tn3270 TN3270 设置

translate 协议转换信息

ttycap 终端容易表

users 显示终端行的信息

version 系统硬、软件状态

vines VINES信息

whoami 当前终端行信息

x25 X.25信息

xns XNS信息

xermote Xremote统计

3、#config ?

Memory 从非易失性内存设置

Network 从TFTP网络主机设置

Overwrite-network 从TFTP网络主机设置覆盖非易失性内存Terminal 从终端设置

4、Configure commads:

Access-list 增加一个访问控制域

Apollo Apollo全局设置命令

appletalk Appletalk 全局设置命令

arap Appletalk远程进出协议

arp 设置一个静态ARP入口

async-bootp 修改系统启动参数

autonomous-system 本地所拥有的特殊自治系统成员banner 定义注册显示信息

boot 修改系统启动时参数

bridge 透明网桥

buffers 调整系统缓冲池参数

busy-message 定义当连接主机失败时显示信息

chat-script 定义一个调制解调器对话文本

clns 全局CLNS设置子命令

clock 设置时间时钟

config-register 定义设置寄存器

decnet 全局DEC网络设置子命令

default-value 缺省字符位值

dialer-list 创建一个拨号清单入口

dnsix-nat 为审计提供DMDM服务

enable 修改优先命令口令

end 从设置模式退出

exit 从设置模式退出

frame-relay 全局帧中继设置命令

help 交互帮助系统的描述

hostname 设置系统网络名

iterface 选择设置的端口

ip 全局地址设置子命令

ipx Novell/IPX全局设置命令

keymap 定义一个新的键盘映射

lat DEC本地传输协议

line 设置终端行

lnm IBM局网管理

locaddr-priority-list 在LU地址上建立优先队列

logging 修改注册(设备)信息

login-string 定义主机指定的注册字符串

map-class 设置静态表类

map-list 设置静态表清单

menu 定义用户接口菜单

mop 设置DEC MOP服务器

netbios NETBIOS通道控制过滤

no 否定一个命令或改为缺省设置

ntp 设置NTP

priority-list 建立特权列表

prompt 设置系统提示符

queue-list 建立常规队列列表

rcmd 远程命令设置命令

rcp-enable 打开Rep服务

rif 源路由进程

router-map 建立路由表或进入路由表命令模式

router 打开一个路由进程

rsh-enable 打开一个RSH服务

sap-priority-list 在SAP或MAC地址上建立一个优先队列service 修改网络基本服务

snmp-server 修改SNMP参数

state-machine 定义一个TCP分配状态的机器

stun STUN全局设置命令

tacacs-server 修改TACACS队列参数

terminal-queue 终端队列命令

tftp-server 为网络装载请求提供TFTP服务

tn3270 tn3270设置命令

translate 解释全局设置命令

username 建立一个用户名及其权限

vines VINES全局设置命令

x25 X.25 的第三级

x29 X.29 命令

xns XNS 全局设置命令

xremote 设置Xremote

5、(config)#ip

Global IP configuration subcommands:

Accounting-list 选择保存IP记帐信息的主机Accounting-threshold 设置记帐入口的最大数accounting-transits 设置通过入口的最大数

alias TCP端口的IP地址取别名

as-path BGP自治系统路径过滤

cache-invalidate-delay 延迟IP路由存贮池的无效

classless 跟随无类前向路由规则

default-network 标志网络作为缺省网关候选

default-gateway 指定缺省网(如果没有路由IP)

domain-list 完成无资格主机的域名

domain-lookup 打开IP域名服务系统主机转换

domain-name 定义缺省域名

forward-protocol 控制前向的、物理的、直接的IP广播

host 为IP主机表增加一个入口

host-routing 打开基于主机的路由(代理ARP和再定向)

hp-host 打开HP代理探测服务

mobile-host 移动主机数据库

multicast-routing 打开前向IP

name-server 指定所用名字服务器的地址

ospf-name-lookup 把OSPF路由作为DNS名显示

pim PIM 全局命令

route 建立静态路由

routing 打开IP路由

security 指定系统安全信息

source-route 根据源路由头的选择处理包

subnet-zero 允许子网0子网

tcp 全局TCP参数

路由器配置命令详细列表

【内容摘要】cisco路由配置语句汇总启动接口,分配ip地址:

router>router>enablerouter#router#configureterminalrouter(config)#router(config)#interfacetypeportrouter(config-if)#noshutdownrouter(config-if)

#ipaddressip-addresssubnet-maskrouter(config-if)#^z配置rip路由协议:30秒更新一次router(config)#routerriprouter(config-if)#……

-----------------------------------------------------------------------------

cisco路由配置语句汇总

启动接口,分配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 <——通告标准a,b,c类网——>

router(config-if)# ^z

配置igrp路由协议:90秒更新一次

router(config)# router igrp as-number <——as-number范围1~65535——>

router(config-if)# network network-number <——通告标准a,b,c类网——>

router(config-if)# ^z

配置novell ipx路由协议:novell rip 60秒更新一次

router(config)# ipx routing [node address]

router(config)# ipx maximum-paths paths <——设置负载平衡,范围1~512——> router(config)# interface type port

router(config-if)# ipx network network-number [encapsulation encapsulation-type] [secondary] <——通告标准a,b,c类网——>

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)# isdnth-typeth-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 ]

——>

<——设置keepalive间隔:

router(config-if)# keepalive number

——>

<——为本地接口指定dlci:

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 ] <——access-list-number 范围:1~99标准acl;100~199扩展acl;800~899标准ipx acl;900~999扩展ipx acl;1000~1099 ipx sap acl;600~699apple talk acl——> 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 <——确定dce接口——>

router(confin-if)# clock rate 64000 <——进入dce接口设置时钟速率——>

router(config-if)# ^z

配置ppp协议:

router(config)# username name password set-password-here <——验证方建立数据库——>

router(config)# interface type port

router(config-if)# encapsulation ppp <——启动ppp协议——>

router(config-if)# ppp outhentication [ chap | chap pap | pap chap | pap ] <——选择ppp认证——>

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 <——选择使用pap实现ppp认证——>

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 <——可以传回在远端主机执行debug命令的结果——> routera# telnet ip-address [ router-name ] <——telnet到指定的地址或名字的主机——>

routerb# [ exit | logout ] <——退出telnet——>

routerb# ++<6>再按<——挂起telnet——>

routera# show sessions <——显示当前所有telnet的信息,包括connect-number ——>

routera# connect-number <——返回指定的telnet连接——>

routera# disconnect ip-address [ router-name ] <——断开指定地址或名字的主机的连接——>

routera# show user <——显示telnet到本机的连接信息——>

routera# clear line [ 0 | 1 | 2 | 3 | 4 ] <——断开指定telnet到本机的连接——>

禁止任何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 <——在指定端口启用cdp,缺省——>

router(config-if)# no cdp enable <——在指定端口关闭cdp——>

router(config)# cdp run <——使所有端口启用cdp——>

router(config)# no cdp run <——使所有端口关闭cdp——>

ping的使用:

router# ping ip-address

router# ping <——扩展ping命令——>

protocol [ip]:[ protocol-type ] <——选择协议类型——>

target ip address:ip-address <——输入测试地址——>

repeat count [5]:<——选择发送的icmp包数量——>

datagram size [100]:<——选择每个包的大小——>

timeout in seconds [2]:<——设置每个包的超时时间——>

extended commands [n]:y <——使用扩展ping命令——>

sweep range of sizes [n]:

tracke的使用:

router# trace ip-address [ host-name ]

为cisco 4000路由器指定媒体类型:

router(config-if)# media-type 10baset <——使aui(默认)失效,改为使用rj-45——>

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 <——cisco出厂默认value=0x2102,value

范围:0x2100(进入rom监视器),0x2101(使系统从rom启动),0x2102~0x210f(使系统从nvram启动)。0x1=0x2101,从最小位开始改变——>

在rom监视器中更改寄存器数值:

> o/r value

路由器密码的恢复:

冷关机,然后再开机并在60秒内按< ctrl>+进入rom监视器模式

> o/r 0x2142 <--25xx型路由器--> 或> confreg 0x2142 <--16xx型路由器-->

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 ]

<——distance范围:1~255,相当于优先权,越小越好。rip=120;dspf=110;igrp=100;eigrp=90——>

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 <——查看isdn拨号信息——>

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

本贴来自天极网群乐社区--https://www.sodocs.net/doc/926092870.html,/group/review-17615723.html

Cisco路由配置语句汇总

启动接口,分配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 <——通告标准A,B,C类网——> router(config-if)# ^z

配置IGRP路由协议:90秒更新一次

router(config)# router igrp AS-Number <—— AS-Number范围1~65535——>

router(config-if)# network Network-Number <——通告标准A,B,C类网——>

router(config-if)# ^z

配置Novell IPX路由协议:Novell RIP 60秒更新一次

router(config)# ipx routing [node address]

router(config)# ipx maximum-paths Paths <——设置负载平衡,范围1~512——>

router(config)# interface Type Port

router(config-if)# ipx network Network-Number [encapsulation encapsulation-type] [secondary] <——通告标准A,B,C类网——>

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)# isdnth-typeth-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 ]

——>

<——设置Keepalive间隔:

router(config-if)# keepalive Number

——>

<——为本地接口指定DLCI:

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 ] <—— Access-List-Number 范围:1~99标准ACL;100~199扩展ACL;800~899标准IPX ACL;900~999扩展IPX ACL;1000~1099 IPX SAP ACL;600~699Apple Talk ACL——>

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 <——确定DCE接口——>

router(confin-if)# clock rate 64000 <——进入DCE接口设置时钟速率——>

router(config-if)# ^z

配置PPP协议:

router(config)# username Name password Set-Password-Here <——验证方建立数据库——>

router(config)# interface Type Port

router(config-if)# encapsulation ppp <——启动PPP协议——>

router(config-if)# ppp outhentication [ chap | chap pap | pap chap | pap ] <——选择PPP 认证——>

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 <——选择使用PAP实现PPP认证——>

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 <——可以传回在远端主机执行Debug命令的结果——>

routerA# telnet IP-Address [ Router-Name ] <——Telnet到指定的地址或名字的主机——>

routerB# [ exit | logout ] <——退出Telnet——>

routerB# ++<6>再按<——挂起Telnet——>

routerA# show sessions <——显示当前所有Telnet的信息,包括Connect-Number ——> routerA# Connect-Number <——返回指定的Telnet连接——>

routerA# disconnect IP-Address [ Router-Name ] <——断开指定地址或名字的主机的连接——>

cisco路由基本操作

路由器基本操作 实验目的:1 熟悉路由器的各种模式 2 熟悉各个模式的常用命令 实验要求: 1、熟悉IOS的几种模式、设置路由器时间、配置主机名、标语、口令(console、VTY、使能加密and不加密)、端口的描述、禁用DNS查找,将路由器中所有明文密码变为加密的形式、ip地址的配置(如是串行接口需要在DCE端配置时钟),在真实或模拟环境中如何判别那端是DCE那端是DTE呢?理解VTY线路模式下的login与no login的区别,理解线路模式下超时时间的使用(exec-timeout 0 ?),熟悉使用几个常用的show 命令: 2、DHCP服务的配置 详细过程: 1、 实验目的:熟练掌握路由器的基本配置命令 Router>enable Router# Router#disable Router> //进入特权模式//退出特权模式 Router#configure terminal //进入全局配置模式路由器 CLI 命令行的命令自动补全功能: Router#sh <按 Tab 键> Router#show 配置路由器时间: Router#clock set 13:01:01 10 july 2007 Router#show clock 13:01:28.985 UTC Tue Jul 10 200 路由器安全相关配置 //查看路由器当前时间 Router(config)#enable password cisco // 特权模式的明文密码Router(config)#enable secret cisco // 特权模式的密文密码Router(config)#service password-encryption //将路由器中所有明文密码变 为加密的形式 修改路由器主机名 Router(config)#hostname guet-cisco guet-cisco(config)# 关闭域名解析 //路由器命名为guet-cisco

Cisco设备的基本配置命令

switch> 用户模式 1:进入特权模式 enable switch> enable switch# 2:进入全局配置模式 configure terminal switch> enable switch#c onfigure terminal switch(conf)# 3:交换机命名 hostname aptech2950 以aptech2950为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令 enable password cisco 以cisco为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码 enable secret ciscolab 以cicsolab为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab 6:设置虚拟局域网vlan 1 interface vlan 1 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface vlan 1 aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip 和子网掩码 aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exit aptech2950(conf)#ip default-gateway 192.168.254 设置网关地址 7:进入交换机某一端口 interface fastehernet 0/17 以17端口为例switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface fastehernet 0/17 aptech2950(conf-if)#

cisco配置命令大全

933a LMI使用Q933A标准.LMI(Local management Interface)有3种:ANSI:T1.617;CCITTY:Q933A和CISCO特有的标准。 # fram-relay intf-typ ABC ABC为帧中继设备类型,它们分别是DTE设备,DCE交换机或NNI(网络接点接口)支持。# frame_relay interface_dlci 110 br 配置DLCI(数据链路连接标识符)。 # frame-relay map ip ABCD XXXX broadcast 建立帧中继映射。ABCD为对方ip地址,XXXX为本地DLCI号,broadcast允许广播向前转发或更新路由。 # no shutdown 激活本端口. # exit ---- 5 .帧中继子接口的配置: # conf t # int s0.1 point-to-point

对应S0的子接口1,点对点方式。 # ip addr ABCD XXXX ABCD为子口1的IP地址,XXXX为子网掩码。# frame-relay intreface-dlci 100 br 6.配置拨号备份 (1).配置备份主口 # conf t # int s0 S0为主口. # backup int asy 1 A1口为备份口. # backup delay 0 1 延时1秒. (2).配置虚拟接口 # conf t # ip addr ABCD XXXX

ABCD为虚拟接口IP地址,XXXX为子网掩码。 # encap ppp 封装ppp协议. # dialer in-band 激活随叫随拨功能. # dialer idle-timeout 7200 # dialer map ip ABCD modem-script call broadcast 6225481 br 映射对应的拨号口.ABCD为对方拨号口的ip地址,6225481为对应的电话号码。 # dialer_group 1 定义拨号组成员. (3).配置防火墙 # dialer_list 1 pro ip permit 允许ip协议通过。 (4).配置连接口令 # user name ABCD pass XXXX ABCD为对方主机名,XXXX为连接口令. (5).配置拨号字符串

1-cisco路由器基本配置及远程登录

实训目的: (1)学习和掌握科路由器的配置方式和要求。 (2)学习和掌握科路由器的工作模式分类、提示符、进入方式。1、路由器的配置方式 ①超级终端方式。该方式主要用于路由器的初始配置,路由器不需要IP地址。基本方法是:计算机通过COM1/COM2口和路由器的Console口连接,在计算机上启用“超级终端”程序,设置“波特率:9600 ,数据位:8,停止位:1,奇偶校验: 无,校验:无”即可。常用 ②Telnet方式。该方式配置要求路由器必须配置了IP地址。基本方法是:计算机通过网卡和路由器的以太网接口相连,计算机的网卡和路由器的以太网接口的IP地址必须在同一网段。常用 ③其他方式:AUX口接MODEM,通过电话线与远方运行终端仿真软件的微机;通过Ethernet上的TFTP服务器;通过Ethernet上的SNMP网管工作站。 2、路由器的工作模式 在命令行状态下,主要有以下几种工作模式: ①一般用户模式。主要用于查看路由器的基本信息,只能执行少数命令,不能对路由 器进行配置。提示符为:Router>;进入方式为:Telnet或Console ②使能(特权)模式。主要用于查看、测试、检查路由器或网络,不能对接口、路由 协议进行配置。提示符为:Router#;进入方式为:Router>enable。 ③全局配置模式。主要用于配置路由器的全局性参数。提示符为:Router(config)#; 进入方式为:Router#config ter。 ④全局模式下的子模式。包括:接口、路由协议、线路等。其进入方式和提示符如下: Router(config)#ineterface e0 //进入接口模式 Router(config-if)#//接口模式提示符 Router(config)#rip //进入路由协议模式 Router(config-router)# //路由协议模式 Router(config)#line con 0 //进入线路模式

cisco交换机常用配置命令

3、常用配置命令 3.1 把端口加入到vlan Switch>en Password: Switch #conf t /*进入配置模式*/ Enter configuration commands, one per line. End with CNTL/Z. Switch (config)#inter f 0/1 /*进入端口*/ Switch (config-if)#switchport access vlan X /*把端口加入到vlan X*/ Switch (config-if)#end Switch #wr /*保存*/ Building configuration... [OK] Switch # 3.2 添加新vlan(在核心交换机上写) Switch>en Password: Switch #conf t /*进入配置模式*/ Enter configuration commands, one per line. End with CNTL/Z. Switch (config)#Vlan X /*添加新Vlan*/ Switch (config-vlan)#inter vlan X /*进入Vlan*/ Switch (config-if)#ip address x.x.x.x 255.255.255.0/*设置vlan ip地址*/ Switch (config-if)#no shut 3.3 配置trunk,透传vlan Switch>en Password: Switch #conf t /*进入配置模式*/ Enter configuration commands, one per line. End with CNTL/Z. Switch (config)#inter fast 0/x /*进入级联端口*/ Switch (config-if)#switchport mode trunk /*修改端口模式*/ Switch (config-if)# switchport trunk allowed vlan all /*设置允许通过的vlan*/ 保存 删除命令:所有的命令前面加no。

思科路由器基本配置与常用配置命令

思科路由器基本配置与常用配置命令(simple for CCNA) 启动接口,分配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 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 ] 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 ]

思科基本配置命令详解

思科交换机基本配置实例讲解

目录 1、基本概念介绍............................................... 2、密码、登陆等基本配置....................................... 3、CISCO设备端口配置详解...................................... 4、VLAN的规划及配置........................................... 4.1核心交换机的相关配置..................................... 4.2接入交换机的相关配置..................................... 5、配置交换机的路由功能....................................... 6、配置交换机的DHCP功能...................................... 7、常用排错命令...............................................

1、基本概念介绍 IOS: 互联网操作系统,也就是交换机和路由器中用的操作系统VLAN: 虚拟lan VTP: VLAN TRUNK PROTOCOL DHCP: 动态主机配置协议 ACL:访问控制列表 三层交换机:具有三层路由转发能力的交换机 本教程中“#”后的蓝色文字为注释内容。 2、密码、登陆等基本配置 本节介绍的内容为cisco路由器或者交换机的基本配置,在目前版本的cisco交换机或路由器上的这些命令是通用的。本教程用的是cisco的模拟器做的介绍,一些具体的端口显示或许与你们实际的设备不符,但这并不影响基本配置命令的执行。 Cisco 3640 (R4700) processor (revision 0xFF) with 124928K/6144K bytes of memory. Processor board ID 00000000 R4700 CPU at 100MHz, Implementation 33, Rev 1.2

思科交换机命令大全 + Cisco IOS 基本命令

思科交换机命令大全 (一) 序号/类别基于ios的交换机命令基于CLI的交换机命令 1.设置主机名/系统名switch(config)# hostname "hostname" switch(enable) set system name name-string 2.设置登录口令switch(config)# enable password level 1 password switch(enable) set password switch(enable) set enalbepass 3.设置远程访问switch(config)# inte***ce vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address switch(enable) set inte***ce sc0 ip-address netmask broadcast-address switch(enable) set inte***ce sc0 vlan switch(enable) set ip route default gateway 4.启用和浏览CDP信息switch(config-if)# cdp enable switch(config-if)# no cdp enable switch(enable) set cdp {enable|disable} module/port 5.查看Cisco邻接设备的CDP通告switch# show cdp inte***ce [type modle/port] switch# show cdp neighbors [type module/port] [detail] switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 6.端口描述switch(config-if)#description escription-string switch(enable)set port name module/number description-string 7.设置端口速度switch(config-if)# speed{10|100|auto} switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 8.设置以太网的链路模式switch(config-if)# duplex {auto|full|half} switch(enable) set port duplex module/number {full|half 9.配置静态VLAN switch# vlan database switch(vlan)# vlan vlan-num name vla switch(vlan)# exit switch# configure teriminal switch(config)#inte***ce inte***ce module/number switch(config-if)# switchport mode access switch(config-if)# switchport access vlan vlan-num switch(config-if)# end switch(enable) set vlan vlan-num [name name] switch(enable) set vlan vlan-num mod-num/port-list 10.配置VLAN中继线switch(config)# inte***ce inte***ce mod/port switch(config-if)# switchport mode trunk switch(config-if)#switchport trunk encapsulation {isl|dotlq} switch(config-if)# switchport trunk allowed vlan remove vlan-list switch(config-if)# switchport trunk allowed vlan add vlan-list switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate] 11.配置VTP管理域switch# vlan database

思科路由器常用配置命令大全

思科路由器常用配置命令大全 本文按字母顺序列举了思科路由器常用配置命令,适合思科路由器操作人员随时查看 Access-enable允许路由器在动态访问列表中创建临时访问列表入口 Access-group把访问控制列表(ACL)应用到接口上 Access-list定义一个标准的IP ACL Access-template在连接的路由器上手动替换临时访问列表入口 Appn向APPN子系统发送命令 Atmsig 执行ATM信令命令 B 手动引导操作系统 Bandwidth 设置接口的带宽 Banner motd 指定日期信息标语 Bfe 设置突发事件手册模式 Boot system 指定路由器启动时加载的系统映像 Calendar 设置硬件日历 Cd 更改路径 Cdp enable 允许接口运行CDP协议 Clear 复位功能 Clear counters 清除接口计数器 Clear interface 重新启动接口上的件逻辑 Clockrate 设置串口硬件连接的时钟速率,如网络接口模块和接口处理器能接受的速率 Cmt 开启/关闭FDDI连接管理功能 Config-register 修改配置寄存器设置 Configure 允许进入存在的配置模式,在中心站点上维护并保存配置信息 Configure memory 从NVRAM加载配置信息 Configure terminal 从终端进行手动配置 Connect 打开一个终端连接 Copy 复制配置或映像数据 Copy flash tftp 备份系统映像文件到TFTP服务器 Copy running-config startup-config 将RAM中的当前配置存储到NVRAM Copy running-config tftp 将RAM中的当前配置存储到网络TFTP服务器上 Copy tftp flash 从TFTP服务器上下载新映像到Flash Copy tftp running-config 从TFTP服务器上下载配置文件 Debug 使用调试功能 Debug dialer 显示接口在拨什么号及诸如此类的信息 Debug ip rip 显示RIP路由选择更新数据 Debug ipx routing activity 显示关于路由选择协议(RIP)更新数据包的信息 Debug ipx sap 显示关于SAP(业务通告协议)更新数据包信息 Debug isdn q921 显示在路由器D通道ISDN接口上发生的数据链路层(第2层)的访问过程 Debug ppp 显示在实施PPP中发生的业务和交换信息 Delete 删除文件 Deny 为一个已命名的IP ACL设置条件 Dialer idle-timeout 规定线路断开前的空闲时间的长度 Dialer map 设置一个串行接口来呼叫一个或多个地点 Dialer wait-for-carrier-time 规定花多长时间等待一个载体 Dialer-group 通过对属于一个特定拨号组的接口进行配置来访问控制 Dialer-list protocol 定义一个数字数据接受器(DDR)拨号表以通过协议或ACL与协议的组合来控

CISCO 常用命令解释

视图模式介绍: 普通视图 router> 特权视图 router# /在普通模式下输入enable 全局视图 router(config)# /在特权模式下输入config t 接口视图 router(config-if)# /在全局模式下输入int 接口名称例如int s0或int e0 路由协议视图 router(config-route)# /在全局模式下输入router 动态路由协议名称 1、基本配置: router>enable /进入特权模式 router#conf t /进入全局配置模式 router(config)# hostname xxx /设置设备名称就好像给我们的计算机起个名字 router(config)#enable password /设置特权口令 router(config)#no ip domain lookup /不允许路由器缺省使用DNS解析命令 router(config)# Service password-encrypt /对所有在路由器上输入的口令进行暗文加密router(config)#line vty 0 4 /进入设置telnet服务模式 router(config-line)#password xxx /设置telnet的密码 router(config-line)#login /使能可以登陆 router(config)#line con 0 /进入控制口的服务模式 router(config-line)#password xxx /要设置console的密码 router(config-line)#login /使能可以登陆 2、接口配置: router(config)#int s0 /进入接口配置模式 serial 0 端口配置(如果是模块化的路由器前面加上槽位编号,例如serial0/0 代表这个路由器的0槽位上的第一个接口) router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码router(config-if)#enca hdlc/ppp 捆绑链路协议 hdlc 或者 ppp 思科缺省串口封装的链路层协议是HDLC所以在show run配置的时候接口上的配置没有,如果要封装为别的链路层协议例如PPP/FR/X25就是看到接口下的enca ppp或者enca fr router(config)#int loopback /建立环回口(逻辑接口)模拟不同的本机网段 router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码给环回口 在物理接口上配置了ip地址后用no shut启用这个物理接口反之可以用shutdown管理性的关闭接口 3、路由配置: (1)静态路由 router(config)#ip route xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 下一条或自己的接口router(config)#ip route 0.0.0.0 0.0.0.0 s 0 添加缺省路由 (2)动态路由 rip协议 router(config)#router rip /启动rip协议 router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段 router(config-router)#version 2 转换为rip 2版本 router(config-router)#no auto-summary /关闭自动汇总功能,rip V2才有作用 router(config-router)# passive-int 接口名 /启动本路由器的那个接口为被动接口

Cisco交换机常用配置命令

Cisco交换机常用配置命令 CISCO交换机基本配置 switch>ena 進入特权模式 switch#erasenvram 全部清除交换机的所有配置 switch#reload 重新启动交换机(初始提示符为switch> ) ------------------------------------------------------------------------------------ CISCO交换机基本配置:Console端口连接 用户模式hostname>; 特权模式hostname(config)# ; 全局配置模式hostname(config-if)# ; 交换机口令设置: switch>enable ;进入特权模式 switch#config;进入全局配置模式 switch(config)#hostname cisco ;设置交换机的主机名 switch(config)#enable secret csico1 ;设置特权加密口令 switch(config)#enable password csico8 ;设置特权非密口令 switch(config)#line console 0 ;进入控制台口 switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;虚拟终端允许登录 switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6 switch#write 保存配置設置 switch#copy running-config startup-config 保存配置設置,與write一樣switch#exit;返回命令 配置终端过一会时间就会由全局配置模式自动改为用户模式,将超时设置为永不超时 switch#conf t switch(config)#line con 0 switch(config-line)#exec-timeout 0 --------------------------------------------------------------------------------- 交换机显示命令: switch#write;保存配置信息 switch#showvtp;查看vtp配置信息 switch#show run ;查看当前配置信息 switch#showvlan;查看vlan配置信息 switch#showvlan name vlan2 switch#show interface ;查看端口信息

Cisco 路由器常用命令

Cisco 路由器常用命令 1 Exec commands: <1-99> 恢复一个会话 bfe 手工应急模式设置 clear 复位功能 clock 管理系统时钟 configure 进入设置模式 connect 打开一个终端 copy 从tftp服务器拷贝设置文件或把设置文件拷贝到tftp服务器上debug 调试功能 disable 退出优先命令状态 disconnect 断开一个网络连接 enable 进入优先命令状态 erase 擦除快闪内存 exit 退出exce模式 help 交互帮助系统的描述 lat 打开一个本地传输连接 lock 锁定终端 login 以一个用户名登录 logout 退出终端 mbranch 向树形下端分支跟踪多路由广播 mrbranch 向树形上端分支跟踪反向多路由广播 name-connection 给一个存在的网络连接命名 no 关闭调试功能 pad 打开X.29 PAD连接 ping 发送回显信息 ppp 开始点到点的连接协议 reload 停机并执行冷启动 resume 恢复一个活动的网络连接 rlogin 打开远程注册连接 rsh 执行一个远端命令 send 发送信息到另外的终端行 setup 运行setup命令 show 显示正在运行系统信息 slip 开始SLIP协议 start-chat 在命令行上执行对话描述 systat 显示终端行的信息 telnet 远程登录 terminal 终端行参数 test 测试子系统内存和端口 tn3270 打开一个tin3270连接 trace 跟踪路由到目的地 undebug 退出调试功能 verify 验证检查闪烁文件的总数 where 显示活动的连接 which-route 执行OSI路由表查找并显示结果 write 把正在运行的设置写入内存、网络、或终端 x3 在PAD上设置X.3参数

Cisco常用命令

路由器实验: router> enable 从用户模式进入特权模式 router# disable or exit 从特权模式退出到用户模式 router# show sessions 查看本机上的TELNET会话router# disconnect 关闭所有的TELNET会话 router# show users 查看本机上的用户 router# erase startupconfig 删除NVRAM中的配置 router# reload 重启路由器 router# config terminal 从用户模式进入特权模式 router(config)# hostname rl 配置用户名为rl router(config)# #banner welcome# 配置开机话语

router# show controllers serial0 查看串口0的物理层信息(主要是查看DTE/DCE)router# show ip interface 查看端口的IP配置信息 router# show hosts 查看主机表 end or ctrl+z 从各种配置模式退到特权模式 rl(config)# no ipdomainlookup 关闭动态域名解析 rl(config)# ipdomainlookup 打开动态域名解析 rl(config)# ipnameserver 202.106.0.20 打开动态域名解析之后便可以指定DNS服务rl(config)# interface serial 0 进入serial 0的接口配置模式 rl(configif)# no shutdown 路由器出厂默认所有端口关闭,使用此命令使它们打开rl(configif)# encapsulation ppp 封装ppp rl(configif)# clockrate 64000 如果是DCE使需要设置时钟速率,如果是DTE使不必设置

Cisco路由器配置命令

C i s c o路由器配置命令 Hessen was revised in January 2021

关于Cisco的知识,可能好多人还不了解没有关系,这里主要分析了Cisco路由器配置命令,看完本文你肯定有不少收获,希望本文能教会你更多东西。 Cisco路由器配置命令之模式转换命令 用户模式----特权模式,使用命令"enable" 特权模式----全局配置模式,使用命令"config t" 全局配置模式----接口模式,使用命令"interface+接口类型+接口号" 全局配置模式----线控模式,使用命令"line+接口类型+接口号" 注: 用户模式:查看初始化的信息. 特权模式:查看所有信息、调试、保存配置信息 全局模式:配置所有信息、针对整个路由器或交换机的所有接口 接口模式:针对某一个接口的配置 线控模式:对路由器进行控制的接口配置 Cisco路由器配置命令之配置命令 show running config 显示所有的配置 show versin 显示版本号和寄存器值 shut down 关闭接口 no shutdown 打开接口 ip add +ip地址配置IP地址

secondary+IP地址为接口配置第二个IP地址 show interface+接口类型+接口号查看接口管理性show controllers interface 查看接口是否有DCE电缆show history 查看历史记录 show terminal 查看终端记录大小 hostname+主机名配置路由器或交换机的标识 config memory 修改保存在NVRAM中的启动配置 exec timeout 0 0 设置控制台会话超时为0 service password-encryptin 手工加密所有密码enable password +密码配置明文密码 ena sec +密码配置密文密码 line vty 0 4/15 进入telnet接口 password +密码配置telnet密码 line aux 0 进入AUX接口 password +密码配置密码 line con 0 进入CON接口 password +密码配置密码 bandwidth+数字配置带宽 no ip address 删除已配置的IP地址

思科常用路由器命令

1. 计算机命令: PCA login: root ;使用root用户password: linux ;口令是linux # shutdown -h now ;同init 0 关机 # logout ;退出登录 # login ;登录 # ifconfig ;显示IP地址 # ifconfig eth0 netmask ;设置IP地址 # ifconfig eth0 netmask down ;删除IP地址 # route add 0.0.0.0 gw ;设置网关 # route del 0.0.0.0 gw ;删除网关 # route add default gw ;设置网关 # route del default gw ;删除网关 # route ;显示网关 # ping ;测试网络 # telnet ;远程登录 2. 交换机支持的命令: 交换机基本状态: switch: ;交换机的ROM状态rommon> ;路由器的ROM状态hostname> ;用户模式hostname# ;特权模式 hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态 交换机口令设置: switch>enable ;进入特权模式 switch#config terminal ;进入全局配置模式switch(config)#hostname ;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令 switch(config)#enable password xxa ;设置特权非密口令 switch(config)#line console 0 ;进入控制台口 switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;允许登录 switch(config-line)#password xx ;设置登录口令xx switch#exit ;返回命令 交换机VLAN设置: switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#no vlan 2 ;删vlan 2 switch(vlan)#vtp domain ;设置发vtp域名 switch(vlan)#vtp password ;设置发vtp密码 switch(vlan)#vtp server ;设置发vtp模式 switch(vlan)#vtp client ;设置发vtp模式 switch(vlan)#vtp pruning ;设置vtp允许 switch(config)#int f0/1 ;进入端口1 switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2

华三华为交换机路由器配置常用命令汇总

华三华为交换机路由器配置常用命令汇总 Pleasure Group Office【T985AB-B866SYT-B182C-BS682T-STT18】

H3C交换机配置命令大全 1、system-view 进入系统视图模式 2、sysname 为设备命名 3、display current-configuration 当前配置情况 4、 language-mode Chinese|English 中英文切换 5、interface Ethernet 1/0/1 进入以太网端口视图 6、 port link-type Access|Trunk|Hybrid 设置端口访问模式 7、 undo shutdown 打开以太网端口 8、 shutdown 关闭以太网端口 9、 quit 退出当前视图模式 10、 vlan 10 创建VLAN 10并进入VLAN 10的视图模式 11、 port access vlan 10 在端口模式下将当前端口加入到vlan 10中 12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中 13、port trunk permit vlan all 允许所有的vlan通过 H3C路由器配置命令大全华为交换机常用配置实例

H3C交换机路由器telnet和console口登录配置 2009年11月09日星期一 10:00 级别说明 Level 名称 命令 参观 ping、tracert、telnet 1 监控 display、debugging 2 配置 所有配置命令(管理级的命令除外) 3 管理 文件系统命令、FTP命令、TFTP命令、XMODEM命令 telnet仅用密码登录,管理员权限 [Router]user-interface vty 0 4[Router-ui-vty0-4]user privilege level 3[Router-ui-vty0-4]set authentication password simple abc telnet仅用密码登录,非管理员权限 [Router]super password level 3 simple super [Router]user-interface vty 0 4[Router-ui-vty0-4]user privilege level 1[Router-ui-vty0-4]set authentication password simple abc telnet使用路由器上配置的用户名密码登录,管理员权限 [Router]local-user admin password simple admin[Router]local-user admin service-type telnet[Router]local-user admin level 3 [Router]user-interface vty 0 4[Router-ui-vty0-4]authentication-mode local telnet使用路由器上配置的用户名密码登录,非管理员权限 [Router]super password level 3 simple super

相关主题