Cisco(恩科)路由器-交换机命令大全

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的密码

switchport mode trunk 启用中继

no vlan +vlan号删除VLAN

show spamming-tree vlan +vlan号查看VLA怕生成树议

2. 路由器配置命令

ip route+非直连网段+子网掩码+下一跳地址配置静态/默认路由

show ip route 查看路由表

show protocols 显示出所有的被动路由协议和接口上哪些协议被设置

show ip protocols 显示了被配置在路由器上的路由选择协议,同时给出了在路由选择协议中使用的定时器等

信息

router rip 激活RIP协议

network +直连网段发布直连网段

interface lookback 0 激活逻辑接口

passive-interface +接口类型+接口号配置接口为被动模式

debug ip +协议动态查看路由更新信息

undebug all 关闭所有DEBUG信息

router eigrp +as号激活EIGRP路由协议

network +网段+子网掩码发布直连网段

show ip eigrp neighbors 查看邻居表

show ip eigrp topology 查看拓扑表

show ip eigrp traffic 查看发送数据包数量

router ospf +process-ID 激活OSPF协议

network+直连网段+area+区域号发布直连网段

show ip ospf 显示OSPF的进程号和ROUTER-ID

encapsulation+封装格式更改封装格式

no ip admain-lookup 关闭路由器的域名查找

ip routing 在三层交换机上启用路由功能

show user 查看SW的在线用户

clear line +线路号清除线路

3. 三层交换机配置命令

配置一组二层端口

configure terminal 进入配置状态

nterface range {port-range} 进入组配置状态

配置三层端口

configure terminal 进入配置状态

interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} | {port-channel port-channel-

number} 进入端口配置状态

no switchport 把物理端口变成三层口

ip address ip_address subnet_mask 配置IP地址和掩码

no shutdown 激活端口

例:

Switch(config)# interface gigabitethernet0/2

Switch(config-if)# no switchport

Switch(config-if)# ip address 192.20.135.21 255.255.255.0

Switch(config-if)# no shutdown

配置VLAN(虚拟局域网)

configure terminal 进入配置状态

vlan vlan-id 输入一个VLAN号, 然后进入vlan配态,可以输入一个新的VLAN号或旧的来进行修改。

name vlan-name 可选)输入一个VLAN名,如果没有配置VLAN名,缺省的名字是VLAN 号前面用0填满的4位

数,如VLAN0004是VLAN4的缺省名字

mtu mtu-size (可选) 改变MTU大小

Switch# configure terminal

Switch(config)# vlan 20

Switch(config-vlan)# name test20

Switch(config-vlan)# end

Switch# vlan database

Switch(vlan)# vlan 20 name test20

Switch(vlan)# exit

将端口分配给一个VLAN

configure terminal 进入配置状态

interface interface-id 进入要分配的端口

switchport mode access 定义二层口

switchport access vlan vlan-id 把端口分配给某一VLAN

Switch# configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)# interface fastethernet0/1

Switch(config-if)# switchport mode access

Switch(config-if)# switchport access vlan 2

Switch(config-if)# end

Switch#

配置VLAN trunk

configure terminal 进入配置状态

interface interface-Id 进入端口配置状态

switchport trunk encapsulation {isl | dot1q | negotiate}配置trunk封装ISL 或802.1Q 或自动协商

switchport mode {dynamic {auto | desirable} | trunk} 配置二层trunk模式。

dynamic auto—自动协商是否成为trunk

dynamic desirable—把端口设置为trunk如果对方端口是trunk, desirable, 配置Native VLAN (802.1q)

或自动模式,trunk—设置端口为强制的trunk方式,而不理会对方端口是否为trunk switchport access vlan vlan-id 可选) 指定一个缺省VLAN, 如果此端口不再是trunk switchport trunk native vlan vlan-id 指定802.1Q native VLAN号

例:

Switch# configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)# interface fastethernet0/4

Switch(config-if)# switchport mode trunk

Switch(config-if)# switchport trunk encapsulation dot1q

Switch(config-if)# end

定义TRUNK允许的VLAN

configure terminal子进入配置状态

interface interface-id 进入端口配置

switchport mode trunk 配置二层口为trunk

switchport trunk allowed vlan {add | all | except | remove} vlan-list可选) 配置trunk允许的VLAN.使用

add, all, except, remove关健字

no switchport trunk allowed vlan 允许所有VLAN通过

Switch(config)# interface fastethernet0/1

Switch(config-if)# switchport trunk allowed vlan remove 2

Switch(config-if)# end

配置Native VLAN(802.1q)

configure terminal 进入配置状态

interface interface-id 进入配置成802.1qtrunk的端口

switchport trunk native vlan vlan-Id 配置native VLAN号

no switchport trunk native vlan 端口配置命令回到缺省的状态

配置基于端口权值的负载均衡

configure terminal 进入Switch 1配置状态

vtp domain domain-name 配置VTP域

vtp mode server 将Switch 1配置成VTP server.

show vtp status 验证VTP的配置

show vlan 验证VLAN

configure terminal 进入配置状态

interface fastethernet 0/1 进入F0/1端口

switchport trunk encapsulation {isl | dot1q | negotiate}配置trunk封装switchport mode trunk 配置成trunk

show interfaces fastethernet0/1 switchport 验证VLAN配置

按以上步骤对想要负载均衡的接口进行配置

在另一个交换机上进行此配置

show vlan 当trunk已经起来,在switch2上验证已经学到相的vlan配置configure terminal 在Switch 1上进入配置状态

interface fastethernet0/1 进入要配置的端口

spanning-tree vlan 8 port-priority 10 将端口权值10赋与VLAN 8. spanning-tree vlan 9 port-priority 10 将端口权值10赋与VLAN 9. spanning-tree vlan 10 port-priority 10 将端口权值10赋与VLAN 10. interface fastethernet0/2 进入F0/2

spanning-tree vlan 3 port-priority 10 将端口权值10赋与VLAN 3. spanning-tree vlan 4 port-priority 10 将端口权值10赋与VLAN 4 spanning-tree vlan 5 port-priority 10 将端口权值10赋与VLAN 5 spanning-tree vlan 6 port-priority 10 将端口权值10赋与VLAN 10

end 退出

show running-config 验证配置

copy running-config startup-config 保存配置

配置STP路径值的负载均衡

Trunk1走VLAN8-10,Trunk2走VLAN2-4

configure terminal 进入Switch 1配置状态

interface fastethernet 0/1 进入F0/1

switchport trunk encapsulation {isl | dot1q | negotiate}配置封装switchport mode trunk 配置Trunk,缺省是ISL封装

exit 退回

在F0/2口上重复2-4步骤

exit 退回

show running-config 验证配置

show vlan验证switch1 已经学到Vlan

configure terminal 进入配置状态

interface fastethernet 0/1 进入F0/1

spanning-tree vlan 2 cost 30 设置Vlan2生成树路径值为30

spanning-tree vlan 3 cost 30 设置Vlan3生成树路径值为30

spanning-tree vlan 4 cost 30 设置Vlan4生成树路径值为30

end 退出

在switch1的F0/2上重复9-11步骤设置VLAN8,9,10生成树路径值为30

end 退出

show running-config 验证配置

copy running-config startup-config 保存配置

补充:CISCO命令集——路由选择协议及排障

*ip route命令

Router(config)# ip route <目录网络或子网号> [子网掩码] <下一路由器IP地址| 从本地出口的地址> [管

理距离0~255,默认为1]

(注:静态地址配置)

*ip default-network命令

Router(config)# ip default-network <目标网络号>

(注:配合路由协使用,用其中的一个动态路由号作默认路由配置)

Router(config)# ip route 0.0.0.0 0.0.0.0 <下一路由器IP地址| 从本地出口的地址> (注:只有一个公网地址时,在出口路由器上的配置)

*内部路由选择协议

*使用router和network命令

Router(config)# router <路由协议rip | igrp | eigrp | ospf | is-is等> [自主系统号]

Router(config-router)# network <直接相连的要用此路由协议的网络号>

Router(config-router)# network <直接相连的要用此路由协议的网络号>

*路由信息协议RIP

Router(config)# router rip

Router(config-router)# network <直接相连的要用rip协议的有类别网络号>

Router# show ip protocols

Router# show ip route

Router# debug ip rip

*内部网关路由协议IGRP

Router(config)# router igrp <自主系统号>

Router(config-router)# network <直接相连的要用igrp协议的有类别网络号> Router# show ip interface

Router# show ip protocols

Router# show ip route

Router# debug ip rip

*排除网络故障

排除网络故障的一个总体模型

Router# ping <有故障的主机| 有故障的IP地址>

Router# show ip route

Router# show interface <有故障的接口>

Router# show run

*IP的故故障排除

检查可用的路由

Router# show ip route <有故障的IP地址>

27.4.4 跟踪路由(Tracing the Route)

SUN-A> traceroute <有故障的主机| 有故障的IP地址>

C:\windows\> winipcfg

C:\windows\> ipconfig

C:\windows\> ipconfig / all

C:\windows\> tracert <有故障的主机| 有故障的IP地址>

使用扩展的ping来跟踪连接性

Router# ping

*其它可能的故障

一个地址解析(ARP)的故障

Router# show arp

Router# show interface <有故障的接口>

C:\windows\> arp -a

SUN-A> arp –a

验证终端系统的路由表

C:\windows\> netstat –rn

C:\windows\> route –f add 0.0.0.0 mask 0.0.0.0 <需要添加入的网关地址>

C:\windows\> route [–f ] [[print | add | delete | change] [destination] [mask netmask] [gateway]] C:\windows\> route add mask <网络掩码> <网关ip地址>

C:\windows\> route delete mask <网络掩码> <网关ip地址>

C:\windows\> nbtstat <相应的参数>

SUN-A> netstat -rn路由器

路由器配置命令全集

命令状态

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 script? [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 script 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 | multipoint]

进入线路设置状态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路由ipx routing

端口设置interface type slot/number

设置IP地址ip address address subnet-mask

设置IPX网络ipx 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. 使用网络地址翻译(NA T)

NA T(Network Address Translation)起到将内部私有地址翻译成外部合法的全局地址的功能,它使得不具

有合法IP地址的用户可以通过NA T访问到外部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, DL Y 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 Slip 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 Slip 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

广域网设置:

一、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, DL Y 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:

路由器常用命令

cisco路由器常用命令 1:三大模式 router> 用户模式 router > enable 进入特权模式 router # router > enable 进入全局配置模式 router #configure terminal router (conf)# 2:其它模式 Router(config)#interface f1/0 进入接口配置模式Router(config-if)# Router(config)#interface f1/0.1 进入子接口配置模式Router(config-subif)# Router(config)#line console 0 进入line模式Router(config-line)# Router(config)#router rip 进入路由模式Router(config-router)# 3:路由器命名 hostname routera,以routerA为例 router > enable router #configure terminal router(conf)#hostname routerA routera (conf)# 4:配置各类密码 配置特权模式密码(使能口令) enable password cisco,以cisco为例 router > enable router #configure terminal router(conf)#hostname routerA routerA (conf)# enable password cisco 设置VTY(虚拟终端接口)密码 Router(config)#line vty 0 1

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

思科交换机路由器命令 大全 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地址: 交换机显示命令:

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)#

思科路由器命令大全详解

一 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

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

思科路由器acl详解

cisco路由器配置ACL详解 如果有人说路由交换设备主要就是路由和交换的功能,仅仅在路由交换数据包时应用的话他一定是个门外汉。 如果仅仅为了交换数据包我们使用普通的HUB就能胜任,如果只是使用路由功能我们完全可以选择一台WINDOWS服务器来做远程路由访问配置。 实际上路由器和交换机还有一个用途,那就是网络管理,学会通过硬件设备来方便有效的管理网络是每个网络管理员必须掌握的技能。今天我们就为大家简单介绍访问控制列表在CISCO路由交换上的配置方法与命令。 什么是ACL? 访问控制列表简称为ACL,访问控制列表使用包过滤技术,在路由器上读取第三层及第四层包头中的信息如源地址,目的地址,源端口,目的端口等,根据预先定义好的规则对包进行过滤,从而达到访问控制的目的。该技术初期仅在路由器上支持,近些年来已经扩展到三层交换机,部分最新的二层交换机也开始提供ACL的支持了。 访问控制列表使用原则 由于ACL涉及的配置命令很灵活,功能也很强大,所以我们不能只通过一个小小的例子就完全掌握全部ACL的配置。在介绍例子前为大家将ACL设置原则罗列出来,方便各位读者更好的消化ACL知识。 1、最小特权原则 只给受控对象完成任务所必须的最小的权限。也就是说被控制的总规则是各个规则的交集,只满足部分条件的是不容许通过规则的。 2、最靠近受控对象原则 所有的网络层访问权限控制。也就是说在检查规则时是采用自上而下在ACL 中一条条检测的,只要发现符合条件了就立刻转发,而不继续检测下面的ACL 语句。 3、默认丢弃原则 在CISCO路由交换设备中默认最后一句为ACL中加入了DENY ANY ANY,也就是丢弃所有不符合条件的数据包。这一点要特别注意,虽然我们可以修改这

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

(完整版)思科路由器查看配置命令.doc

思科路由器查看配置命令 show run// 看运行状况 show ip route// 看路由表 show int// 看断口 * show ip int br// 看端口 ip 地址 show cdp nei// 察看 cdp 邻居 show ip pro// 察看 ip 协议 查看配置信息用 show 命令,该命令可以在用户模式和特权模式下执行,且在特权模式下看 到的信息比用户模式多。 show 命令很多,常用的有: 1、查看运行配置文件: Router#show running-config 运行配置文件 running-config 位于路由器的 RAM 中,存放的是路由器当前使用的配置信息。 2、查看启动配置文件: Router#show startup-config 启动配置文件 startup-config 位于路由器的 NVRAM 中,可以长期保存。它在启动路由器时装入 RAM ,成为 running-config 。 3、查看路由器的版本信息: Router#show version' 4、查看路由器的接口状态: Router#show ip interface brief 如果接口状态标识为“ Down ”,表示此接口未激活,如果标识为“ Up”,表示此接口已经激活。 5、查看路由表:

Router#show ip route 通过路由表可以看出该路由器已经识别的网络。 6、查看 NAT 翻译情况: Router#show ip nat translation 应该先进行内网与外网的通讯(如:用 ping 命令 ),然后再查看,才能看到翻译情况。

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

思科路由器配置命令和方法

第一章:路由器配置基础 一、基本设置方式 一般来说,可以用5种方式来设置路由器: 1.Console口接终端或运行终端仿真软件的微机; 2.AUX口接MODEM,通过电话线与远方的终端或运行终端仿真软件的微机相连;3.通过Ethernet上的TFTP服务器; 4.通过Ethernet上的TELNET程序; 5.通过Ethernet上的SNMP网管工作站。 但路由器的第一次设置必须通过第一种方式进行,此时终端的硬件设置如下: 波特率:9600 数据位:8 停止位:1 奇偶校验: 无 二、命令状态 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可进入此状态,这时路由器不能完成正常的功能,只能进行软件升级和手工引导。 设置对话状态 这是一台新路由器开机时自动进入的状态,在特权命令状态使用SETUP命令也可进入此状态,这时可通过对话方式对路由器进行设置。 三、设置对话过程 显示提示信息 全局参数的设置 接口参数的设置 显示结果 利用设置对话过程可以避免手工输入命令的烦琐,但它还不能完全代替手工设置,一些特殊的设置还必须通过手工输入的方式完成。 进入设置对话过程后,路由器首先会显示一些提示信息: --- 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可以退

CISCO 路由交换命令大全

思科交换机路由器命令大全 交换机命令: 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 aptech2950(conf-if-range)#spanning-tree portfast -----设置快速端口

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

思科路由器常用配置命令大全 本文按字母顺序列举了思科路由器常用配置命令,适合思科路由器操作人员随时查看 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槽位上的第一个接口)

cisco各类设备查看信息命令归纳

1、查看ARP缓存表 Router #show ip arp 2、查看路由表 Router #show ip route 3、查看接口状态 Router #show interface f0/0 4、查看基本配置 Router #show running-config 5、查看版本信息 Router #show version 6、查看路由器当前时间 Router #show clock 7、查看路由协议配置 Router #show ip protocol 8、打开RIP协议调试命令 Router #debug ip rip 9、检测PPP连接状态和协商过程 Router #debug ppp packet 10、查OSPF邻居列表 Router #show ip ospf neighbor (detail)详细 11、查链路状态数据库 Router #show ip ospf database 12、查OSPF的配置 Router #show ip ospf 13、查OSPF的接口数据结构 Router #show ip ospf interface 接口 14、查一条网络LSA通告信息 Router #show ip ospf database network 15、显示链路状态数据库中的网络汇总LSA信息 Router #show ip ospf database summary 16、查看数据库中列出的所有路由的LSA通告 Router #show ip ospf database router 17、查看ASBR汇总LSA的信息 Router #show ip ospf database asbr-summary 18、查看AS外部LSA的信息 Router #show ip ospf database external 19、查NSSA外部LSA通告的信息 Router #show ip ospf database nssa-external 20、查用来表示到达ABR和ASBR路由哭的路由 Router #show ip ospf border-routers 21、查看OSPF协议配置信息 Router #show ip protocol 22、查看路由器“邻接”的整个过程 Router #debug ip ospf adj 23、查看每个OSPF数据包的信息 Router #debug ip ospf packet 24、清空路由表 Router #clear ip route * 25、查一条虚链路的状态 Router #show ip ospf virtual-link 26、查看HSRP配置 27、查看HSRP的状态 Router #show standby 1(组号) brief 28、启用调试功能HSRP Router #debug standby 29、查看串行链路的状态 Router #show controllers s0/0 30、显示路由器内存的大小,包括空闲内存的大小 Router #Show memory 31、显示路由器的进程 Router #Show processes 32、显示缓存器统计信息 Router #how buffers 33、显示CDP表中所列相邻设备的信息 Router #Show cdp entry 34、显示闪存的布局和内容信息 Router #Show flash 35、显示关于本地管理接口(LMI)的统计信息 Router #Show frame-relay lmi 36、显示关于连接的当前映射入口和信息 Router #Show frame-relay map 37、显示关于帧中继接口的永久虚电路(pvc)的统计信 息 Router #Show frame-relay pvc 38、显示所有连接到路由器的用户 Router #show users 39、显示当前存在的转换 Router#show ip nat translations 40、查看NAT的统计信息 Router#show ip nat statistics 41、查看IKE策略 Router# show crypto isakmp policy 42、查看IPsce策略 Router# show crypto ipsec transform-set 43、查看SA信息 Router# show crypto ipsec sa

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使不必设置

(完整word版)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

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

相关文档
最新文档