当前位置:文档之家› CISCO常用配置命令及参数

CISCO常用配置命令及参数

CISCO常用配置命令及参数
CISCO常用配置命令及参数

CISCO常用配置命令及参数(1)

2011-10-27 10:30 佚名 NET130 字号: |

CISCO的产品类型非常多,也是企业常常会选择的一个品牌。所以,作为运维人员,维护企业的网络,对于Cisco的产品的配置也要有所了解。

AD:

启动接口,分配IP地址:

1.router>

2.router> enable

3.router#

4.router# configure terminal

5.router(config)#

6.router(config)# interface Type Port

7.router(config-if)# no shutdown

8.router(config-if)# ip address IP-Address Subnet-Mask

9.router(config-if)# ^z

配置RIP路由协议:30秒更新一次

1.router(config)# router rip

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

3.router(config-if)# ^z

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

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

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

3.router(config-if)# ^z

配置Novell IPX路由协议:

1.Novell RIP 60秒更新一次

2.router(config)# ipx routing [node address]

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

4.router(config)# interface Type Port

5.router(config-if)# ipx network Network-Number [encapsulation encapsu

lation-type] [secondary] <--通告标准A,B,C类网-->

6.router(config-if)# ^z

配置DDR:

1.router(config)# dialer-list Group-Number protocol Protocol-Type perm

it [list ACL-Number]

2.router(config)# interface bri 0

3.router(config-if)# dialer-group Group-Number

4.router(config-if)# dialer map Protocol-Type Next-Hop-Address name Ho

stname Telphone-Number

5.router(config-if)# ^z

配置ISDN:

1.router(config)# isdn swith-type Swith-Type <--配置ISDN交换机类型,中国使

用basic-net3-->

2.router(config-if)# ^z

配置Frame Relay:

1.router(config-if)# encapsulation frame-relay [cisco | ietf ]

2.router(config-if)# frame-relay lmi-type [ansi | cisco | q933a ]

3.router(config-if)# bandwidth kilobits

4.router(config-if)# frame-relay invers-arp [ Protocol ] [dlci ]

5.<--配置静态Invers ARP表:

6.router(config)# frame-relay Protocol Protocol-Address DLCI [ Broadca

st ] [ ietf | cisco ] [ payload-compress | packet-by-packet ]

7.-->

8.<--设置Keepalive间隔:

9.router(config-if)# keepalive Number

10.-->

11.<--为本地接口指定DLCI:

12.router(config-if)# frame-lelay local-dlci Number

13.-->

14.<--子接口配置:

15.router(config-if)# interface Type Port.Subininterface-Number [ multi

point | point-to-point ]

16.router(config-subif)# ip unnumbered Interface

17.router(config-subif)# frame-lelay local-dlci Number

18.-->

19.router(config-if)# ^z

配置标准ACL:

1.router(config)# access-list Access-List-Number [ permit | deny ] sou

rce [ 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-->

2.router(config)# interface Type Port

3.router(config-if)# ip access-group Access-List-Number [ in | out ]

4.router(config-if)# ^z

5.

配置扩展ACL:

1.router(config)# access-list Access-List-Number [ permit | deny ] [ P

rotocol | Protocol-Number ] source source-wildcard [ Source-Port ] des tination destination-wildcard [ Destination-Port ] [ established ]

2.router(config)# interface Type Port

3.router(config-if)# ip access-group Access-List-Number [ in | out ]

4.router(config-if)# ^z

5.

配置命名ACL:

1.router(config)# ip access-list [ standard | extended ] ACL-Name

2.router(config [ std- | ext- ] nacl)# [ permit | deny ] [ IP-Access-L

ist-Test-Conditions ]

3.router(config [ std- | ext- ] nacl)# no [ permit | deny ] [ IP-Acces

s-List-Test-Conditions ]

4.router(config [ std- | ext- ] nacl)# ^z

5.router(config)# interface Type Port

6.router(config-if)# ip access-group [ACL-Name | 1~199 ] [ in | out ]

7.router(config-if)# ^z

配置DCE时钟:

1.router# show controllers Type Port <--确定DCE接口-->

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

3.router(config-if)# ^z

配置PPP协议:

1.router(config)# username Name password Set-Password-Here <--验证方建立

数据库-->

2.router(config)# interface Type Port

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

4.router(config-if)# ppp outhentication [ chap | chap pap | pap chap |

pap ] <--选择PPP认证-->

5.router(config-if)# ppp pap sent-username Name password Password <--

发送验证信息-->

6.router(config-if)# ^z

PAP单向认证配置实例:

验证方:

1.router-server(config)# username Client password 12345 <--验证方建立数

据库-->

2.router-server(config)# interface serial 0

3.router-server(config-if)# encapsulation ppp

4.router-server(config-if)# ppp authentication pap <--选择使用PAP实现

PPP认证-->

5.router-server(config-if)# ^z

被验证方:

1.router-client(config-if)# encapsulation ppp

2.router-client(config-if)# ppp pap sent-username Client password 1234

5 <--发送验证信息-->

3.router-client(config-if)# ^z

PAP双向认证配置实例:

路由器 A:

1.routerA(config)# username B password 12345

2.routerA(config)# interface serial 0

3.routerA(config-if)# encapsulation ppp

4.routerA(config-if)# ppp authentication pap

5.routerA(config-if)# ppp pap sent-username A password 54321

6.routerA(config-if)# ^z

路由器 B:

1.routerB(config)# username A password 54321

2.routerB(config)# interface serial 1

3.routerB(config-if)# encapsulation ppp

4.routerB(config-if)# ppp authentication pap

5.routerB(config-if)# ppp pap sent-username B password 12345

6.routerB(config-if)# ^z

CHAP单向认证配置实例:

验证方:

1.router-server(config)# username router-client password 12345

2.router-server(config)# interface serial 0

3.router-server(config-if)# encapsulation ppp

4.router-server(config-if)# ppp authentication chap

5.router-server(config-if)# ^z

被验证方:

1.router-client(config-if)# encapsulation ppp

2.router-client(config-if)# ppp authentication chap

3.router-client(config-if)# ppp chap hostname router-client

4.router-client(config-if)# ppp chap password 12345

5.router-client(config-if)# ^z

CHAP双向认证配置实例:

路由器 A:

1.routerA(config)# username routerB password 12345

2.routerA(config)# interface serial 0

3.routerA(config-if)# encapsulation ppp

4.routerA(config-if)# ppp authentication chap

5.routerA(config-if)# ppp chap hostname routerA

6.routerA(config-if)# ppp chap password 54321

7.routerA(config-if)# ^z

路由器 B:

1.routerB(config)# username routerA password 54321

2.routerB(config)# interface serial 1

3.routerB(config-if)# encapsulation ppp

4.routerB(config-if)# ppp authentication chap

5.routerB(config-if)# ppp chap hostname routerB

6.routerB(config-if)# ppp chap password 12345

7.routerB(config-if)# ^z

Telnet使用:

1.routerA# terminal monitor <--可以传回在远端主机执行Debug命令的结果-->

2.routerA# telnet IP-Address [ Router-Name ] <--Telnet到指定的地址或名字

的主机-->

3.routerB# [ exit | logout ] <--退出Telnet-->

4.routerB# ++<6>再按<--挂起Telnet-->

5.routerA# show sessions <--显示当前所有Telnet的信息,包括

Connect-Number -->

6.routerA# Connect-Number <--返回指定的Telnet连接-->

7.routerA# disconnect IP-Address [ Router-Name ] <--断开指定地址或名字的主

机的连接-->

8.routerA# show user <--显示Telnet到本机的连接信息-->

9.routerA# clear line [ 0 | 1 | 2 | 3 | 4 ] <--断开指定Telnet到本机的连接

-->

禁止任何Telnet到本机:

1.router(config)# line vty 0 4

2.router(config-line)# access-class ACL-Number

3.router(config)# ^z

设置主机名:

1.router(config)# hostname Set-Hostname

2.router(config)# ^z

3.router(config)# ^z

设置用户模式密码:

1.router(config)# line console 0

2.router(config-line)# login

3.router(config-line)# password Set-Password

4.router(config-line)# ^z

设置Telnet密码:

1.router(config)# line vty 0 4

2.router(config-line)# login

3.router(config-line)# password Set-Password

4.router(config-line)# ^z

设置特权模式密码:

1.router(config)# enable password Set-Password <--不加密的密码,明码-->

2.router(config)# enable secret Set-Password <--经过加密的密码-->

3.router(config)# ^z

给所有密码加密:

1.router(config)# service password-ancryption Set-Password-Here

2.router(config)# no service password-ancryption <--取消加密-->

3.router(config)# ^z

设置登录Banner:

1.router(config)# banner motd 分隔符 Set-Banner-Information-Here 分隔

符<--前后分隔符一定要一致-->

设置接口的描述信息:

1.router(config-if)# description Set-Port-Information-Here

2.router(config)# ^z

CDP的控制:

1.router(config-if)# cdp enable <--在指定端口启用CDP,缺省-->

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

3.router(config)# cdp run <--使所有端口启用CDP-->

4.router(config)# no cdp run <--使所有端口关闭CDP-->

Ping的使用:

1.router# ping IP-Address

2.router# ping <--扩展Ping命令-->

3.Protocol [ip]:[ Protocol-Type ] <--选择协议类型-->

4.Target IP address:IP-Address <--输入测试地址-->

5.Repeat count [5]:<--选择发送的ICMP包数量-->

6.Datagram size [100]:<--选择每个包的大小-->

7.Timeout in seconds [2]:<--设置每个包的超时时间-->

8.Extended commands [n]:y <--使用扩展Ping命令-->

9.Sweep range of sizes [n]:

Tracke的使用:

1.router# trace IP-Address [ Host-Name

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

1.router(config-if)# media-type 10baset <--使AUI(默认)失效,改为使用

RJ-45-->

2.router(config-if)# ^z

更改路由器启动顺序:

1.router(config)# boot system flash IOS-FileName

2.router(config)# boot system tftp IOS-FileName TFTP-IP-Address

3.router(config)# boot system rom

4.router(config)# ^z

修改寄存器数值:

1.router(config)# config-register Value <--Cisco出厂默认Value=0x2102,

Value范围:0x2100(进入ROM监视器),0x2101(使系统从ROM启动),0x2102~0x210F (使系统从NVRAM启动)。0x1=0x2101,从最小位开始改变-->

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

1.> o/r Value

路由器密码的恢复:

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

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

-->

2.router> I

3.router> n

4.router> enable

5.router# copy startup-config running-config

6.router# configure terminal

7.router(config)# enable secret New-Password

8.router(config)# config-register 0x2102

9.router(config)# ^z

10.router# copy running-config startup-config

11.router# reload

配置名称-主机入口:

1.router(config)# ip host Set-Name [ TCP-Port-Number ] IP-Address [ IP

-Address 2 ]...

2.router(config)# ^z

定义DNS主机:

1.router(config)# ip name-server Server-Address [ Server-Address 2 ].

..

2.router(config)# ^z

禁用DNS:

1.router(config)# no ip domain-lookup

2.router(config)# ^z

配置水平分割:

1.router(config-if)# ip split-horizon

2.router(config-if)# no ip split-horizon

3.router(config-if)# ^z

配置静态路由:

1.router(config)# ip route IP-Address Subnet-Mask [ Next-Hop-Address |

Local-Out-Port ] [Distace ]

2.<--Distance范围:1~255,相当于优先权,越小越好。RIP=120;DSPF=110;IGRP=100;

EIGRP=90-->

3.router(config)# ^z

配置缺省路由:

1.router(config)# ip defoult-network IP-Address <--动态缺省路由-->

2.router(config)# ip route 0.0.0.0 0.0.0.0 [ Next-Hop-Address | Local-

Out-Port ] [Distace ] <--静态缺省路由-->

3.router(config)# ^z

思科交换机命令大全

思科交换机命令大全集团文件发布号:(9816-UATWW-MWUB-WUNN-INNUL-DQQTY-

思科交换机常用命令大全 1.1 用户模式与特权模式 用户模式:可以使用一些基本的查询命令 特权模式:可以对交换机进行相关的配置 进入特权模式命令:Switch>enable 退出特权模式命令:Switch#exit 启用命令查询: 时间设置:Switch#clock set 时间(自选参数,参数必须符合交换机要求) 显示信息命令:Switch#show 可选参数 注意:可以用TAB键补齐命令,自选参数为用户自定义参数,可选参数为交换机设定参数 查看交换机配置: Switch#show running-config 保存交换机配置:Switch#copy running-config startup-config Switch#wr

查看端口信息:Switch#show interface 查看MAC地址表:Switch#show mac-address-table 查看交换机CPU的状态信息:Switch#show processes 1.2 全局配置模式 进入全局配置模式:Switch#configure terminal 主机名修改:Switch(config)#hostname 主机名(自选参数) 特权模式进入密码: Switch(config)#enable secret 密码(自选参数) 取消特权模式密码:Switch(config)#no enable secret 取消主机名设置: Switch(config)#no hostname 退出配置模式: Switch(config)#exit 需要特别注意的是在配置模式中无法使用show命令,如果要使用 的话show前必须加do和空格,例如:do show * 指定根交换机命令:Switch(config)#spanning-tree vlan 自选参数(VLAN号) root primary 例如: Switch(config)#spanning-tree vlan 1 root primary

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命令全集

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 地址和掩码

Cisco IOS 基本命令

Cisco IOS 基本命令一、基本路由器的检验命令 show version show processes show protocols show mem show ip route show startup-config show running-config show flash show interfaces 二、基本路由配置命令 进入:config terminal/memory/network 配置网络时常采用的命令:copy和load 1.标识:hostname 标识名 2.启动标识:banner 启动标识 3.接口:interface 端口号 4.密码:line 0 6 login passwd 口令 enable password/secret 口令 5.接口:

1)配置端口 interface 端口号 clock rate 时钟速率(64000)/* 在串口中配置*/ bandwidth 带宽(缺省56)/* 在串口中配置*/ media-type 介质类型/* 在以太网口上*/ early-token release /* 在令牌环网口上*/ ring-speed 16 /* 在令牌环网口上*/ no shutdown write memory 2)检验端口 show interfaces show controllers 6.配置环境 1)引导方式 boot system flash IOS-filename boot system tftp IOS-filename tftp-address boot system rom 2)配置Register值 config-register 0x2102 7.查看邻居路由 show cdp interface show cdp neighbors [detail]

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 //进入线路模式

思科交换机命令大全

思科交换机常用命令大全 1.1 用户模式与特权模式 用户模式:可以使用一些基本的查询命令 特权模式:可以对交换机进行相关的配置 进入特权模式命令:Switch>enable 退出特权模式命令:Switch#exit 启用命令查询:? 时间设置:Switch#clock set 时间(自选参数,参数必须符合交换机要求) 显示信息命令:Switch#show 可选参数 注意:可以用TAB键补齐命令,自选参数为用户自定义参数,可选参数为交换机设定参数 查看交换机配置: Switch#show running-config 保存交换机配置:Switch#copy running-config startup-config Switch#wr 查看端口信息:Switch#show interface 查看MAC地址表:Switch#show mac-address-table 查看交换机CPU的状态信息:Switch#show processes 1.2 全局配置模式 进入全局配置模式:Switch#configure terminal

主机名修改:Switch(config)#hostname 主机名(自选参数) 特权模式进入密码: Switch(config)#enable secret 密码(自选参数) 取消特权模式密码:Switch(config)#no enable secret 取消主机名设置: Switch(config)#no hostname 退出配置模式: Switch(config)#exit 需要特别注意的是在配置模式中无法使用show命令,如果要使用 的话show前必须加do和空格,例如:do show * 指定根交换机命令:Switch(config)#spanning-tree vlan 自选参数(VLAN号)root primary 例如: Switch(config)#spanning-tree vlan 1 root primary 需要注意的是:设置根交换机是基于VLAN的 关闭生成树协议命令:Switch(config)#no spanning-tree vlan 自选参数(VLAN 号) 例如: Switch(config)#no spanning-tree vlan 1 1.3 接口配置模式 进入接口配置模式:Switch(config)#interface 端口名称(可选参数) 启用端口:Switch(config-if)#no shutdown 停用端口:Switch(config-if)#shutdown 进入同种类型多端口配置:Switch(config)# interface range fastethernet 0/1-5 进入不同类型多端口配置:Switch(config)#interface range fastethernet 0/1-5,gigabitethernet 0/1-2

思科基本配置命令详解

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

目录 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

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

思科路由器基本配置与常用配置命令(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 ]

思科交换机配置常用命令(精编文档).doc

【最新整理,下载后即可编辑】 Cisco三层交换机配置命令及解释 (2011-07-11 08:54:50) 分类:IT资讯 标签: cisco 杂谈 基本配置 S> enable 进入特权模式 S# configure terminal 进入全局配置模式 S(config)# hostname name 改变交换机名称 S(config)# enable password level level_# password 设置用户口令(level_#=1)或特权口令(level_#=15) S(config)# line console 0 进入控制台接口 S(config-line)# password console_password 接上一条命令,设置控制台口令 S(config)# line vty 0 15 进入虚拟终端 S(config-line)# password telnet_password 接上一条命令,设置Telnet口令 S(config-line)# login 允许Telnet登录 S(config)# enable password|secret privilege_password 配置特权口令(加密或不加密) S(config)# interface ethernet|fastethernet|gigabitethernet slot_#/port_# 进入接口子配置模式 S(config-if)# [no] shutdown 关闭或启用该接口(默认启用) S(config)# ip address IP_address sunbet_mask 指定IP地址 S(config)# ip default-gateway router's_IP_address 指定哪台路由器地址为默认网关 S# show running-config 查看当前的配置 S# copy running-config startup-config 将RAM中的当前配置保存到NVRAM中

CISCO基本命令

端口速度:设置端口速度为:100Mbps/s 半双工模式 Switch# configure terminal Switch(config)# interface range gigabitethernet0/1 - 2 Switch(config-if-range)# speed 100 Switch(config-if)# duplex half 定义端口聚合并存储到NVRAM:定义名称为enet_list的端口组。 Switch# configure terminal Switch(config)# define interface-range enet_list gigabitethernet0/1 - 2 Switch(config)# end Switch# show running-config | include define Switch# define interface-range enet_list gigabitethernet0/1 – 2 Switch# configure terminal Switch(config)# no define interface-range enet_list Switch(config)# end Switch# show run | include define Switch# 设置端口类型: Switch(config-if)media-type auto-select | rj45 | sfp Switch#show interfaces interface-id transceiver properties

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常用命令

路由器实验: 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 路由器常用命令

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参数

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

思科路由器常用配置命令大全 本文按字母顺序列举了思科路由器常用配置命令,适合思科路由器操作人员随时查看 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命令大全解释、注释

cisco命令大全解释、注释 Dynamips作为一款十分优秀的Cisco路由器模拟软件,实验模拟效果远比Boson NetSim更加真实可信。Boson NetSim是对IOS命令行的模拟,而Dynamips是通过在计算机中构建运行IOS的虚拟机来真正运行IOS实现对Cisco路由器的模拟。 收录最常用的Cisco命令分类如下: cisco命令大全 1. switch配置命令 (1)模式转换命令 用户模式----特权模式,使用命令"enable" 特权模式----全局配置模式,使用命令"config t" 全局配置模式----接口模式,使用命令"interface+接口类型+接口号" 全局配置模式----线控模式,使用命令"line+接口类型+接口号" 注: 用户模式:查看初始化的信息. 特权模式:查看所有信息、调试、保存配置信息 全局模式:配置所有信息、针对整个路由器或交换机的所有接口 接口模式:针对某一个接口的配置 线控模式:对路由器进行控制的接口配置 (2)配置命令 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地址 show startup config 查看NVRAM中的配置信息 copy run-config atartup config 保存信息到NVRAM write 保存信息到NVRAM erase startup-config 清除NVRAM中的配置信息 show ip interface brief 查看接口的谪要信息 banner motd # +信息+ # 配置路由器或交换机的描素信息description+信息配置接口听描素信息 vlan database 进入VLAN数据库模式 vlan +vlan号+ 名称创建VLAN switchport access vlan +vlan号为VLAN为配接口interface vlan +vlan号进入VLAN接口模式 ip add +ip地址为VLAN配置管理IP地址 vtp+service/tracsparent/client 配置SW的VTP工作模式vtp +domain+域名配置SW的VTP域名 vtp +password +密码配置SW的密码

相关主题
文本预览
相关文档 最新文档