CISCO命令全集

CISCO命令全集
CISCO命令全集

CISCO命令全集

谨以此献给爱好学习的人!

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与协议的组合来控制控制拨号

Dir 显示给定设备上的文件

Disable 关闭特许模式

Disconnect 断开已建立的连接

Enable 打开特许模式

Enable password 确定一个密码以防止对路由器非授权的访问

Enable password 设置本地口令控制不同特权级别的访问

Enable secret 为enable password命令定义额外一层安全性

Encapsulation frame-relay 启动帧中继封装

Encapsulation novell-ether 规定在网络段上使用的Novell独一无二的格式

Encapsulation PPP 把PPP设置为由串口或ISDN接口使用的封装方法

Encapsulation sap 规定在网络段上使用的以太网802.2格式Cisco的密码是sap

End 退出配置模式

Erase 删除闪存或配置缓存

Erase startup-config 删除NVRAM中的内容

Exec-timeout 配置EXEC命令解释器在检测到用户输入前所等待的时间

Exit 退出所有配置模式或者关闭一个激活的终端会话和终止一个EXEC

Exit 终止任何配置模式或关闭一个活动的对话和结束EXEC

format 格式化设备

Frame-relay local-dlci 为使用帧中继封装的串行线路启动本地管理接口(LMI)

Help 获得交互式帮助系统

History 查看历史记录

Hostname 使用一个主机名来配置路由器,该主机名以提示符或者缺省文件名的方式使用

Interface 设置接口类型并且输入接口配置模式

Interface 配置接口类型和进入接口配置模式

Interface serial 选择接口并且输入接口配置模式

Ip access-group 控制对一个接口的访问

Ip address 设定接口的网络逻辑地址

Ip address 设置一个接口地址和子网掩码并开始IP处理

Ip default-network 建立一条缺省路由

Ip domain-lookup 允许路由器缺省使用DNS

Ip host 定义静态主机名到IP地址映射

Ip name-server 指定至多6个进行名字-地址解析的服务器地址

Ip route 建立一条静态路由

Ip unnumbered 在为给一个接口分配一个明确的IP地址情况下,在串口上启动互联网协议(IP)的处理过程

Ipx delay 设置点计数

Ipx ipxwan 在串口上启动IPXWAN协议

Ipx maximum-paths 当转发数据包时设置Cisco IOS软件使用的等价路径数量

Ipx network 在一个特定接口上启动互联网数据包交换(IPX)的路由选择并且选择封装的类型(用帧封装)

Ipx router 规定使用的路由选择协议

Ipx routing 启动IPX路由选择

Ipx sap-interval 在较慢的链路上设置较不频繁的SAP(业务广告协议)更新

Ipx type-20-input-checks 限制对IPX20类数据包广播的传播的接受

Isdn spid1 在路由器上规定已经由ISDN业务供应商为B1信道分配的业务简介号(SPID)

Isdn spid2 在路由器上规定已经由ISDN业务供应商为B2信道分配的业务简介号(SPID)

Isdn switch-type 规定了在ISDN接口上的中央办公区的交换机的类型

Keeplive 为使用帧中继封装的串行线路LMI(本地管理接口)机制

Lat 打开LAT连接

Line 确定一个特定的线路和开始线路配置

Line concole 设置控制台端口线路

Line vty 为远程控制台访问规定了一个虚拟终端

Lock 锁住终端控制台

Login 在终端会话登录过程中启动了密码检查

Login 以某用户身份登录,登录时允许口令验证

Logout 退出EXEC模式

Mbranch 向下跟踪组播地址路由至终端

Media-type 定义介质类型

Metric holddown 把新的IGRP路由选择信息与正在使用的IGRP路由选择信息隔离一段时间Mrbranch 向上解析组播地址路由至枝端

Mrinfo 从组播路由器上获取邻居和版本信息

Mstat 对组播地址多次路由跟踪后显示统计数字

Mtrace 由源向目标跟踪解析组播地址路径

Name-connection 命名已存在的网络连接

Ncia 开启/关闭NCIA服务器

Network 把一个基于NIC的地址分配给一个与它直接相连的路由器把网络与一个IGRP的路由选择的过程联系起来在IPX路由器配置模式下,在网络上启动加强的IGRP

Network 指定一个和路由器直接相连的网络地址段

Network-number 对一个直接连接的网络进行规定

No shutdown 打开一个关闭的接口

Pad 开启一个X.29 PAD连接

Permit 为一个已命名的IP ACL设置条件

Ping 把ICMP响应请求的数据包发送网络上的另一个节点检查主机的可达性和网络的连通性对网络的基本连通性进行诊断

Ping 发送回声请求,诊断基本的网络连通性

Ppp 开始IETF点到点协议

Ppp authentication 启动Challenge握手鉴权协议(CHAP)或者密码验证协议(PAP)或者将两者都启动,并且对在接口上选择的CHAP和PAP验证的顺序进行规定

Ppp chap hostname 当用CHAP进行身份验证时,创建一批好像是同一台主机的拨号路由器

Ppp chap password 设置一个密码,该密码被发送到对路由器进行身份验证的主机命令对进入路由器的用户名/密码的数量进行了限制

Ppp pap sent-username 对一个接口启动远程PAP支持,并且在PAP对同等层请求数据包验证过程中

使用sent-username和password

Protocol 对一个IP路由选择协议进行定义,该协议可以是RIP,内部网关路由选择协议(IGRP),开放最短路径优先(OSPF),还可以是加强的IGRP

Pwd 显示当前设备名

Reload 关闭并执行冷启动;重启操作系统

Rlogin 打开一个活动的网络连接

Router 由第一项定义的IP路由协议作为路由进程,例如:router rip 选择RIP作为路由协议

Router igrp 启动一个IGRP的路由选择过程

Router rip 选择RIP作为路由选择协议

Rsh 执行一个远程命令

Sdlc 发送SDLC测试帧

Send 在tty线路上发送消息

Service password-encryption 对口令进行加密

Setup 运行Setup命令

Show 显示运行系统信息

Show access-lists 显示当前所有ACL的内容

Show buffers 显示缓存器统计信息

Show cdp entry 显示CDP表中所列相邻设备的信息

Show cdp interface 显示打开的CDP接口信息

Show cdp neighbors 显示CDP查找进程的结果

Show dialer 显示为DDR(数字数据接受器)设置的串行接口的一般诊断信息

Show flash 显示闪存的布局和内容信息

Show frame-relay lmi 显示关于本地管理接口(LMI)的统计信息

Show frame-relay map 显示关于连接的当前映射入口和信息

Show frame-relay pvc 显示关于帧中继接口的永久虚电路(pvc)的统计信息

Show hosts 显示主机名和地址的缓存列表

Show interfaces 显示设置在路由器和访问服务器上所有接口的统计信息

Show interfaces 显示路由器上配置的所有接口的状态

Show interfaces serial 显示关于一个串口的信息

Show ip interface 列出一个接口的IP信息和状态的小结

Show ip interface 列出接口的状态和全局参数

Show ip protocols 显示活动路由协议进程的参数和当前状态

Show ip route 显示路由选择表的当前状态

Show ip router 显示IP路由表信息

Show ipx interface 显示Cisco IOS软件设置的IPX接口的状态以及每个接口中的参数

Show ipx route 显示IPX路由选择表的内容

Show ipx servers 显示IPX服务器列表

Show ipx traffic 显示数据包的数量和类型

Show isdn active 显示当前呼叫的信息,包括被叫号码、建立连接前所花费的时间、在呼叫期间使用的自动化操作控制(AOC)收费单元以及是否在呼叫期间和呼叫结束时提供AOC信息

Show isdn ststus 显示所有isdn接口的状态、或者一个特定的数字信号链路(DSL)的状态或者一个特定isdn接口的状态

Show memory 显示路由器内存的大小,包括空闲内存的大小

Show processes 显示路由器的进程

Show protocols 显示设置的协议

Show protocols 显示配置的协议。这条命令显示任何配置了的第3层协议的状态

Show running-config 显示RAM中的当前配置信息

Show spantree 显示关于虚拟局域网(VLAN)的生成树信息

Show stacks 监控和中断程序对堆栈的使用,并显示系统上一次重启的原因

Show startup-config 显示NVRAM中的启动配置文件

Show ststus 显示ISDN线路和两个B信道的当前状态

Show version 显示系统硬件的配置,软件的版本,配置文件的名称和来源及引导映像

Shutdown 关闭一个接口

Telnet 开启一个telect连接

Term ip 指定当前会话的网络掩码的格式

Term ip netmask-format 规定了在show命令输出中网络掩码显示的格式

Timers basic 控制着IGRP以多少时间间隔发送更新信息

Trace 跟踪IP路由

Username password 规定了在CHAP和PAP呼叫者身份验证过程中使用的密码

Verify 检验flash文件

Where 显示活动连接

Which-route OSI路由表查找和显示结果

Write 运行的配置信息写入内存,网络或终端

Write erase 现在由copy startup-config命令替换

X3 在PAD上设置X.3参数

Xremote 进入XRemote模式

路由器配置命令全集(专为来不及收藏的哥们送上的)

命令状态

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]:

2.设置进入特权状态的密文(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.如果配置的是拨号访问服务器,系统还会设置异步口的参数: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 scr ip t? [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

是否使用TCP头压缩:

Configure for TCP Header Compression? [yes]:

9) 是否在异步口上使用路由表更新:

Configure for routing updates on async links? [no]: y

10) 是否设置异步口上的其它协议。

接下来,系统会对每个接口进行参数的设置。

1.Configuring interface Ethernet0:

1) 是否使用此接口:

Is this interface in use? [yes]:

2) 是否设置此接口的IP参数:

Configure IP on this interface? [yes]:

3) 设置接口的IP地址:

IP address for this interface: 192.168.162.2

4) 设置接口的IP子网掩码:

Number of bits in subnet field [0]:

Class C network is 192.168.162.0, 0 subnet bits; mask is /24

在设置完所有接口的参数后,系统会把整个设置对话过程的结果显示出来:

The following configuration command scr ip t was created:

hostname Router

enable secret 5 $1$W5Oh$p6J7tIgRMBOIKVXVG53Uh1

enable password pass

…………

请注意在enable secret后面显示的是乱码,而enable password后面显示的是设置的内容。显示结束后,系统会问是否使用这个设置:

Use this configuration? [yes/no]: yes

如果回答yes,系统就会把设置的结果存入路由器的NVRAM中,然后结束设置对话过程,使路由器开始正常的工作。

返回目录

四、常用命令

1. 帮助

在IOS操作中,无论任何状态和位置,都可以键入“?”得到系统的帮助。

2. 改变命令状态

任务命令

进入特权命令状态enable

退出特权命令状态disable

进入设置对话状态setup

进入全局设置状态config terminal

退出全局设置状态end

进入端口设置状态interface type slot/number

进入子端口设置状态interface type number.subinterface [point-to-point | mult ip oint]

进入线路设置状态line type slot/number

进入路由设置状态router protocol

退出局部设置状态exit

3. 显示命令

任务命令

查看版本及引导信息show version

查看运行设置show running-config

查看开机设置show startup-config

显示端口信息show interface type slot/number

显示路由信息show ip router

4. 拷贝命令

用于IOS及CONFIG的备份和升级

5. 网络命令

任务命令

登录远程主机telnet hostname|IP address

网络侦测ping hostname|IP address

路由跟踪trace hostname|IP address

6. 基本设置命令

任务命令

全局设置config terminal

设置访问用户及密码username username password password 设置特权密码enable secret password

设置路由器名hostname name

设置静态路由ip route destination subnet-mask next-hop

启动IP路由ip routing

启动IPX路由ip x routing

端口设置interface type slot/number

设置IP地址ip address address subnet-mask

设置IPX网络ip x network network

激活端口no shutdown

物理线路设置line type number

启动登录进程login [local|tacacs server]

设置登录密码password password

五、配置IP寻址

1. IP地址分类

IP地址分为网络地址和主机地址二个部分,A类地址前8位为网络地址,后24位为主机地址,B类地址16位为网络地址,后16位为主机地址,C类地址前24位为网络地址,后8位为主机地址,网络地址范围如下表所示:

种类网络地址范围

A 1.0.0.0 到126.0.0.0有效0.0.0.0 和127.0.0.0保留

B 128.1.0.0到191.254.0.0有效128.0.0.0和191.255.0.0保留

C 192.0.1.0 到223.255.254.0有效192.0.0.0和223.255.255.0保留

D 224.0.0.0到239.255.255.255用于多点广播

E 240.0.0.0到255.255.255.254保留255.255.255.255用于广播

2. 分配接口IP地址

任务命令

接口设置interface type slot/number

为接口设置IP地址ip address ip-address mask

掩玛(mask)用于识别IP地址中的网络地址位数,IP地址(ip-address)和掩码(mask)相与即得到网络地址。

3. 使用可变长的子网掩码

通过使用可变长的子网掩码可以让位于不同接口的同一网络编号的网络使用不同的掩码,这样可以节省IP地址,充分利用有效的IP地址空间。

如下图所示:

Router1和Router2的E0端口均使用了C类地址192.1.0.0作为网络地址,Router1的E0的网络地址为192.1.0.128,掩码为255.255.255.192, Router2的E0的网络地址为

192.1.0.64,掩码为255.255.255.192,这样就将一个C类网络地址分配给了二个网,既划分了二个子网,起到了节约地址的作用。

4. 使用网络地址翻译(NAT)

NAT(Network Address Translation)起到将内部私有地址翻译成外部合法的全局地址的功能,它使得不具有合法IP地址的用户可以通过NAT访问到外部Internet.

当建立内部网的时候,建议使用以下地址组用于主机,这些地址是由Network Working Group(RFC 1918)保留用于私有网络地址分配的.

l Class A:10.1.1.1 to 10.254.254.254

l Class B:172.16.1.1 to 172.31.254.254

l Class C:192.168.1.1 to 192.168.254.254

命令描述如下:

任务命令

定义一个标准访问列表access-list access-list-number permit source [source-wildcard]

定义一个全局地址池ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length} [type rotary]

建立动态地址翻译ip nat inside source {list {access-list-number | name} pool name [overload] | static local-ip global-ip}

指定内部和外部端口ip nat {inside | outside}

如下图所示,

路由器的Ethernet 0端口为inside端口,即此端口连接内部网络,并且此端口所连接的网络应该被翻译,Serial 0端口为outside端口,其拥有合法IP地址(由NIC或服务提供商所分配的合法的IP地址),来自网络10.1.1.0/24的主机将从IP地址池c2501中选择一个地址作为自己的合法地址,经由Serial 0口访问Internet。命令ip nat inside source list 2 pool c2501 overload中的参数overload,将允许多个内部地址使用相同的全局地址(一个合法IP地址,它是由NIC或服务提供商所分配的地址)。命令ip nat pool c2501 202.96.38.1 202.96.38.62 netmask 255.255.255.192定义了全局地址的范围。

设置如下:

ip nat pool c2501 202.96.38.1 202.96.38.62 netmask 255.255.255.192

interface Ethernet 0

ip address 10.1.1.1 255.255.255.0

ip nat inside

!

interface Serial 0

ip address 202.200.10.5 255.255.255.252

ip nat outside

!

ip route 0.0.0.0 0.0.0.0 Serial 0

access-list 2 permit 10.0.0.0 0.0.0.255

! Dynamic NAT

!

ip nat inside source list 2 pool c2501 overload

line console 0

exec-timeout 0 0

!

line vty 0 4

end

六、配置静态路由

通过配置静态路由,用户可以人为地指定对某一网络访问时所要经过的路径,在网络结构比较简单,且一般到达某一网络所经过的路径唯一的情况下采用静态路由。

任务命令

建立静态路由ip route prefix mask {address | interface} [distance] [tag tag] [permanent] Prefix :所要到达的目的网络

mask :子网掩码

address :下一个跳的IP地址,即相邻路由器的端口地址。

interface :本地网络接口

distance :管理距离(可选)

tag tag :tag值(可选)

permanent :指定此路由即使该端口关掉也不被移掉。

以下在Router1上设置了访问192.1.0.64/26这个网下一跳地址为192.200.10.6,即当有目的地址属于192.1.0.64/26的网络范围的数据报,应将其路由到地址为192.200.10.6的相邻路由器。在Router3上设置了访问192.1.0.128/26及192.200.10.4/30这二个网下一跳地址为192.1.0.65。由于在Router1上端口Serial 0地址为192.200.10.5,192.200.10.4/30这个网属于直连的网,已经存在访问192.200.10.4/30的路径,所以不需要在Router1上添加静态路由。

Router1:

ip route 192.1.0.64 255.255.255.192 192.200.10.6

Router3:

ip route 192.1.0.128 255.255.255.192 192.1.0.65

ip route 192.200.10.4 255.255.255.252 192.1.0.65

同时由于路由器Router3除了与路由器Router2相连外,不再与其他路由器相连,所以也可以为它赋予一条默认路由以代替以上的二条静态路由,

ip route 0.0.0.0 0.0.0.0 192.1.0.65

即只要没有在路由表里找到去特定目的地址的路径,则数据均被路由到地址为192.1.0.65的相邻路由器。

返回目录

一、HDLC

HDLC是CISCO路由器使用的缺省协议,一台新路由器在未指定封装协议时默认使用HDLC封装。

1. 有关命令

端口设置

任务命令

设置HDLC封装encapsulation hdlc

设置DCE端线路速度clockrate speed

复位一个硬件接口clear interface serial unit

显示接口状态show interfaces serial [unit] 1

注:1.以下给出一个显示Cisco同步串口状态的例子.

Router#show interface serial 0

Serial 0 is up, line protocol is up

Hardware is MCI Serial

Internet address is 150.136.190.203, subnet mask is 255.255.255.0

MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec)

Last input 0:00:07, output 0:00:00, output hang never

Output queue 0/40, 0 drops; input queue 0/75, 0 drops

Five minute input rate 0 bits/sec, 0 packets/sec

Five minute output rate 0 bits/sec, 0 packets/sec

16263 packets input, 1347238 bytes, 0 no buffer

Received 13983 broadcasts, 0 runts, 0 giants

2 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 2 abort

22146 packets output, 2383680 bytes, 0 underruns

0 output errors, 0 collisions, 2 interface resets, 0 restarts

1 carrier transitions

2. 举例

设置如下:

Router1:

interface Serial0

ip address 192.200.10.1 255.255.255.0

clockrate 1000000

Router2:

interface Serial0

ip address 192.200.10.2 255.255.255.0

!

3. 举例使用E1线路实现多个64K专线连接.

相关命令:

任务命令

进入controller配置模式controller {t1 | e1} number

选择帧类型framing {crc4 | no-crc4}

选择line-code类型linecode {ami | b8zs | hdb3}

建立逻辑通道组与时隙的映射channel-group number timeslots range1

显示controllers接口状态show controllers e1 [slot/port]2

注: 1. 当链路为T1时,channel-group编号为0-23, Timeslot范围1-24; 当链路为E1时, channel-group编号为0-30, Timeslot范围1-31.

2.使用show controllers e1观察controller状态,以下为帧类型为crc4时controllers正常的状态.

Router# show controllers e1

e1 0/0 is up.

Applique type is Channelized E1 - unbalanced

Framing is CRC4, Line Code is HDB3 No alarms detected.

Data in current interval (725 seconds elapsed):

0 Line Code Violations, 0 Path Code Violations

0 Sl ip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins

0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs

Total Data (last 24 hours) 0 Line Code Violations, 0 Path Code Violations,

0 Sl ip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins,

0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs

以下例子为E1连接3条64K专线, 帧类型为NO-CRC4,非平衡链路,路由器具体设置如下: shanxi#wri t

Building configuration...

Current configuration:

!

version 11.2

no service udp-small-servers

no service tcp-small-servers

!

hostname shanxi

!

enable secret 5 $1$XN08$Ttr8nfLoP9.2RgZhcBzkk/

enable password shanxi

!

!

ip subnet-zero

!

controller E1 0

framing NO-CRC4

channel-group 0 timeslots 1

channel-group 1 timeslots 2

channel-group 2 timeslots 3

!

interface Ethernet0

ip address 133.118.40.1 255.255.0.0

media-type 10BaseT

!

interface Ethernet1

no ip address

shutdown

!

interface Serial0:0

ip address 202.119.96.1 255.255.255.252

no ip mroute-cache

!

interface Serial0:1

ip address 202.119.96.5 255.255.255.252

no ip mroute-cache

!

interface Serial0:2

ip address 202.119.96.9 255.255.255.252

no ip mroute-cache

!

no ip classless

ip route 133.210.40.0 255.255.255.0 Serial0:0 ip route 133.210.41.0 255.255.255.0 Serial0:1 ip route 133.210.42.0 255.255.255.0 Serial0:2 !

line con 0

line vty 0 4

password shanxi

login

!

end

广域网设置:

一、HDLC

HDLC是CISCO路由器使用的缺省协议,一台新路由器在未指定封装协议时默认使用HDLC封装。

1. 有关命令

端口设置

任务命令

设置HDLC封装encapsulation hdlc

设置DCE端线路速度clockrate speed

复位一个硬件接口clear interface serial unit

显示接口状态show interfaces serial [unit] 1

注:1.以下给出一个显示Cisco同步串口状态的例子.

Router#show interface serial 0

Serial 0 is up, line protocol is up

Hardware is MCI Serial

Internet address is 150.136.190.203, subnet mask is 255.255.255.0

MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec)

Last input 0:00:07, output 0:00:00, output hang never

Output queue 0/40, 0 drops; input queue 0/75, 0 drops

Five minute input rate 0 bits/sec, 0 packets/sec

Five minute output rate 0 bits/sec, 0 packets/sec

16263 packets input, 1347238 bytes, 0 no buffer

Received 13983 broadcasts, 0 runts, 0 giants

2 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 2 abort

22146 packets output, 2383680 bytes, 0 underruns

0 output errors, 0 collisions, 2 interface resets, 0 restarts

1 carrier transitions

设置如下:

Router1:

interface Serial0

ip address 192.200.10.1 255.255.255.0

clockrate 1000000

Router2:

interface Serial0

ip address 192.200.10.2 255.255.255.0

!

3. 举例使用E1线路实现多个64K专线连接.

相关命令:

任务命令

进入controller配置模式controller {t1 | e1} number

选择帧类型framing {crc4 | no-crc4}

选择line-code类型linecode {ami | b8zs | hdb3}

建立逻辑通道组与时隙的映射channel-group number timeslots range1

显示controllers接口状态show controllers e1 [slot/port]2

注: 1. 当链路为T1时,channel-group编号为0-23, Timeslot范围1-24; 当链路为E1时, channel-group编号为0-30, Timeslot范围1-31.

2.使用show controllers e1观察controller状态,以下为帧类型为crc4时controllers正常的状态.

Router# show controllers e1

e1 0/0 is up.

Applique type is Channelized E1 - unbalanced

Framing is CRC4, Line Code is HDB3 No alarms detected.

Data in current interval (725 seconds elapsed):

0 Line Code Violations, 0 Path Code Violations

0 Sl ip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins

0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs

Total Data (last 24 hours) 0 Line Code Violations, 0 Path Code Violations,

0 Sl ip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins,

0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs

以下例子为E1连接3条64K专线, 帧类型为NO-CRC4,非平衡链路,路由器具体设置如下: shanxi#wri t

Building configuration...

Current configuration:

!

version 11.2

no service udp-small-servers

no service tcp-small-servers

!

hostname shanxi

!

enable secret 5 $1$XN08$Ttr8nfLoP9.2RgZhcBzkk/

enable password shanxi

!

!

ip subnet-zero

!

controller E1 0

framing NO-CRC4

channel-group 0 timeslots 1

channel-group 1 timeslots 2

channel-group 2 timeslots 3

!

interface Ethernet0

ip address 133.118.40.1 255.255.0.0

media-type 10BaseT

!

interface Ethernet1

no ip address

shutdown

!

interface Serial0:0

ip address 202.119.96.1 255.255.255.252

no ip mroute-cache

!

interface Serial0:1

ip address 202.119.96.5 255.255.255.252

no ip mroute-cache

!

interface Serial0:2

ip address 202.119.96.9 255.255.255.252

no ip mroute-cache

!

no ip classless

ip route 133.210.40.0 255.255.255.0 Serial0:0

ip route 133.210.41.0 255.255.255.0 Serial0:1

ip route 133.210.42.0 255.255.255.0 Serial0:2

!

line con 0

line aux 0

line vty 0 4

password shanxi

login

!

end

返回目录

二、PPP

PPP(Point-to-Point Protocol)是SLIP(Serial Line IP protocol)的继承者,它提供了跨过同步和异步电路实现路由器到路由器(router-to-router)和主机到网络(host-to-network)的连接。CHAP(Challenge Handshake Authentication Protocol)和PAP(Password Authentication Protocol) (PAP)通常被用于在PPP封装的串行线路上提供安全性认证。使用CHAP和PAP 认证,每个路由器通过名字来识别,可以防止未经授权的访问。

CHAP和PAP在RFC 1334上有详细的说明。

1. 有关命令

端口设置

任务命令

设置PPP封装encapsulation ppp1

设置认证方法ppp authentication {chap | chap pap | pap chap | pap} [if-needed][list-name | default] [callin]

指定口令username name password secret

设置DCE端线路速度clockrate speed

注:1、要使用CHAP/PAP必须使用PPP封装。在与非Cisco路由器连接时,一般采用PPP 封装,其它厂家路由器一般不支持Cisco的HDLC封装协议。

2. 举例

路由器Router1和Router2的S0口均封装PPP协议,采用CHAP做认证,在Router1中应建立一个用户,以对端路由器主机名作为用户名,即用户名应为router2。同时在Router2中应建立一个用户,以对端路由器主机名作为用户名,即用户名应为router1。所建的这两用户的password必须相同。

设置如下:

Router1:

hostname router1

username router2 password xxx

interface Serial0

ip address 192.200.10.1 255.255.255.0

clockrate 1000000

ppp authentication chap

!

Router2:

hostname router2

username router1 password xxx

interface Serial0

ip address 192.200.10.2 255.255.255.0

ppp authentication chap

!

返回目录

三、x.25

1. X25技术

X.25规范对应OSI三层,X.25的第三层描述了分组的格式及分组交换的过程。X.25的第二层由LAPB(Link Access Procedure, Balanced)实现,它定义了用于DTE/DCE连接的

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

思科交换机命令大全

思科交换机命令大全集团文件发布号:(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

思科路由模拟器命令大全

命令要在一行内打完,窗体可以自动拉大。Aux口这个版本暂不支持。 支持三级Switch网络,需要路由时支持两级Switch。 设置的主机名中不要含有空格。F2、F3键清屏(为了方便而加) Ctrl+P 历史命令,建议使用方向键。 Ctrl+z 回根, 建议使用end命令 Ctrl+Break 路由器进入ROM监控状态。交换机清除特权密码。 双击设备进入终端操作 单击设备的接口可以实现画线 单击画有线的接口可以删除连线 在指定的设备按下鼠标右键可以删除设备。 在指定的设备按下鼠标左键可以实现移动。 按Tab键,可以得到命令全称。 键入"?"可以得到当前状态下的命令帮助。 接收的作业名固定为当前目录下的sim.txt。 系统的配置文件是:sim.ini。 计算测验得分中,ping PCA->PCB;5 表示ping通得5分, SWAf6=2;5表示交换机SwitchA的f0/6在vlan 2时得5分。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PCA login: root ;使用root用户password: linux ;口令是linux # shutdown -h now ;同init 0 关机 # logout # login # ifconfig ;显示IP地址 # ifconfig eth0 netmask ;设置IP地址 # ifconfig eht0 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 交换机基本状态: switch: ;交换机的ROM状态

cisco交换机配置口令大全

cisco交换机配置口令大全 1.在基于IOS的交换机上设置主机名/系统名: switch(config)# hostname hostname 在基于CLI的交换机上设置主机名/系统名: switch(enable) set system name name-string 2.在基于IOS的交换机上设置登录口令: switch(config)# enable password level 1 password 在基于CLI的交换机上设置登录口令: switch(enable) set password switch(enable) set enalbepass 3.在基于IOS的交换机上设置远程访问: switch(config)# interface vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address 在基于CLI的交换机上设置远程访问: switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlan switch(enable) set ip route default gateway 4.在基于IOS的交换机上启用和浏览CDP信息: switch(config-if)# cdp enable switch(config-if)# no cdp enable 为了查看Cisco邻接设备的CDP通告信息: switch# show cdp interface [type modle/port] switch# show cdp neighbors [type module/port] [detail] 在基于CLI的交换机上启用和浏览CDP信息: switch(enable) set cdp {enable|disable} module/port 为了查看Cisco邻接设备的CDP通告信息: switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 5.基于IOS的交换机的端口描述: switch(config-if)# description description-string 基于CLI的交换机的端口描述: switch(enable)set port name module/number description-string 6.在基于IOS的交换机上设置端口速度: switch(config-if)# speed{10|100|auto} 在基于CLI的交换机上设置端口速度: switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 7.在基于IOS的交换机上设置以太网的链路模式: switch(config-if)# duplex {auto|full|half}

思科交换机命令大全

思科交换机常用命令大全 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

Cisco的命令大全

Cisco的命令大全 序号/类别基于ios的交换机命令基于CLI的交换机命令 1.设置主机名/系统名 switch(config)# hostname "hostname" switch(enable) set sys tem 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 s c0 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 p ort name module/number description-string 7.设置端口速度 switch(config-if)# speed{10|100|auto} switch(enable) set port s peed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 8.设置以太网的链路模式 switch(config-if)# duplex {auto|full|half} switch(enabl e) 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

思科交换机路由器命令大全

思科交换机路由器命令 大全 YUKI was compiled on the morning of December 16, 2020

1. 交换机支持的命令:交换机基本状态: 交换机口令设置: 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 ;设置登录口令 xxswitch#exit ;返回命令 交换机VLAN设置:

switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端 口1switch(config-if)#switchport access vlan 2 ; 当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为干线switch(config- if)#switchport trunk allowed vlan 1,2 ;设置允许 的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain ;设置发vtp域名switch(config)#vtp password ;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式 交换机设置IP地址: 交换机显示命令:

思科交换机配置维护手册

思科交换机配置维护手册

目录

一、端口配置 1.1 配置一组端口 当使用interface range命令时有如下的规则: ?有效的组范围: o vlan从1 到4094 o fastethernet槽位/{first port} - {last port}, 槽位为0 o gigabitethernet槽位/{first port} - {last port},槽位为0 o port-channel port-channel-number - port-channel-number, port-channel号从1到64 ?端口号之间需要加入空格,如:interface range fastethernet 0/1 – 5是有效的,而interface range fastethernet 0/1-5是无效的. ?interface range命令只能配置已经存在的interface vlan ?所有在同一组的端口必须是相同类别的。

见以下例子: Switch# configure terminal Switch(config)# interface range fastethernet0/1 - 5 Switch(config-if-range)# no shutdown 以下的例子显示使用句号来配置不同类型端口的组: Switch# configure terminal Switch(config)# interface range fastethernet0/1 - 3, gigabitethernet0/1 - 2 Switch(config-if-range)# no shutdown 1.2 配置二层端口 1.2.1 配置端口速率及双工模式

思科路由器命令大全详解

一 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 配置交换机端口ip和子网掩码 aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exit aptech2950(conf)#ip default-gateway 设置网关地址 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)# 8:查看命令show switch> enable

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、基本概念介绍............................................... 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命令全集-思科命令汇总 各个视图模式介绍: 普通视图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槽位上的第一个接口)

思科交换机配置常用命令(精编文档).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中

思科2960交换机配置命令

思科2960交换机配置命令 交换机的端口工作模式一般可以分为三种:Access(普通模式),Multi(多vlan模式),Trunk(中继模式)。1、允许多个vlan的是multi模式,而不是trunk 模式。2、两个都设为trunk模式:一:如果在同一交换机上,则决不会在同一vlan;二:如果是两个交换机上,且两端口物理连接的话,共享vlan信息。但是这两个端口已经被使用,所以只能说,使用与这两个端口相同vlan的端口的计算机是同一虚拟局域网。3、access和multi模式下,端口用于计算机;trunk 模式下,端口用于交换机间连接。所以access和trunk没有可比性。 交换机基本状态: switch ;ROM状态,路由器是rommon hostname ;用户模式 hostname# ;特权模式 hostname(config)# ;全局配置模式 hostname(config-if)# ;接口状态 交换机口令设置: switchenable ;进入特权模式 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 ;返回命令

CISCO配置命令大全必学

这是学习CUSCO必学的 配置使能密码enable secret ciscolab 以cicsolab 为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab 设置虚拟局域网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 设置网关地址 进入交换机某一端口interface fastehernet 0/17 以17 端口为例switch> enable

switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface fastehernet 0/17 aptech2950(conf-if)# 8:查看命令show switch> enable switch# show version 察看系统中的所有版本信息 show interface vlan 1 查看交换机有关ip 协议的配置信息 show running-configure 查看交换机当前起作用的配置信息 show interface fastethernet 0/1 察看交换机1 接口具体配置和统计信息show mac-address-table 查看mac 地址表 show mac-address-table aging-time 查看mac 地址表自动老化时间 9:交换机恢复出厂默认恢复命令 switch> enable switch# erase startup-configure switch# reload 10:双工模式设置 switch> enable switch#c onfigure terminal switch2950(conf)#hostname aptch-2950 aptech2950(conf)# interface fastehernet 0/17 以17 端口为例 aptech2950(conf-if)#duplex full/half/auto 有full , half, auto 三个可选

思科交换机配置命令大全

思科交换机配置命令大全 switch> 用户模式 1:进入特权模式 enable switch> enable switch# 2:进入全局配置模式 configure terminal switch> enable switch#configure terminal switch(conf)# 3:交换机命名 hostname aptech2950 以aptech2950为例 switch> enable switch#configure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令 enable password cisco 以cisco为例 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码 enable secret ciscolab 以cicsolab为例 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab 6:设置虚拟局域网vlan 1 interface vlan 1 switch> enable switch#configure 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#configure terminal

思科路由器命令大全(完整版)

思科交换机路由器命令大全 交换机命令: switch> 用户模式 1:进入特权模式 enable switch> enable switch# 2:进入全局配置模式 configure terminal switch> enable switch#configure terminal switch(conf)# 3:交换机命名 hostname aptech2950 以aptech2950为例 switch> enable switch#configure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令 enable password cisco 以cisco为例 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码 enable secret ciscolab 以cicsolab为例--设置禁用IP地址解析特性,设置启用消息同步特性 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab aptech2950(conf)#no ip domain-lookup -----设置禁用IP 地址解析特性 aptech2950(conf)#logging synchronous -----设置启用消息同步特性 aptech2950(conf)#interface range fastethernet0/1-20

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 接口名 /启动本路由器的那个接口为被动接口

相关文档
最新文档