cisco硬件检查命令 (cisco网络设备配置基础)

系统升级:

将思科设备里面的文件*载下**到指定位置:

1. dir 查看需要*载下**的文件

2. copy flash:(文件名) tftp:(传输方式)

3. Address or name of remote host []? 电脑的IP地址

4. Destination filename [switch-confg]?1.txt 文件名(可以自定义)

将文件上传到思科设备里面:

1.Switch# copy tftp: flash:

2.Switch# Address or name of remote host []? 10.4.10.18

3.Switch# Source filename []? 文件名

4.Switch# destination filename[]?目的文件名(上传后的文件名,可以更改)

使用文件当做启动文件

在config模式下

Switch(config)# boot system flash:/文件名

删除文件夹下的123文件

Switch#delete flash:123

思科设备基本配置:

L2/L3的端口聚集协议(Pagp)

Switch#show etherchannel port-channel 查看虚拟通道包含的接口

Switch#show etherchannel load-balance 查看通道接口状况

Switch#show etherchannel summary 查看端口聚合信息,正常情况Port-channel显示是SU,如果显示SD就不正常

L2层的端口聚合配置:

SW1(config)#interface range fastEthernet 1/0/23 - 24 进入端口34/24

SW1(config-if-range)#switchport 开启二层特性,默认开启

SW1(config-if-range)#channel-protocol pagp 指定聚合的协议pagp

SW1(config-if-range)#channel-group 1 mode desirable 将当前端口组加入到channel-group即聚合链路通道1。

同时将聚合工作模式设置为积极模式。(Auto:被动协商;Desirable:主动向对端协商;On:强制协商)

show etherchannel port-channel 查看聚合组信息

show etherchannel summary 查看聚合链路的汇总信息

L3层的端口聚合配置:

SW1(config)#interface range fastEthernet 1/0/23 - 24

SW1(config-if-range)#no switchport

SW1(config-if-range)#channel-protocol pagp

SW1(config-if-range)#channel-group 1 mode desirable

SW1(config-if-range)#exit

L2/L3的链路聚集协议(LACP)

L2层的链路聚合配置:

SW1(config)#interface range fastEthernet 1/0/23 - 24

SW1(config-if-range)#channel-protocol lacp 指定聚合协议LACP

SW1(config-if-range)#channel-group 1 mode active 将当前端口组加入到channel-group即聚合链路通道1,

同时将聚合工作模式设置为积极模式active。(active:主动协商;passive:被动协商)

show etherchannel summary 查看链路聚合汇总信息

L3层的链路聚合配置:

SW1(config)#interface range fastEthernet 1/0/23 - 24

SW1(config-if-range)#no switchport

SW1(config-if-range)#channel-protocol lacp

SW1(config-if-range)#channel-group 1 mode active

SW1(config-if-range)#exit

VTP配置:VLAN中继协议

一台为VTP server,用来添加删除改变VLAN信息;其他为VTP client ,用来传输VLAN信息,不能添加删除改变VLAN信息;

还有一种为Transparent模式,即可以在这台交换机上随意的添加删除VLAN信息。

基本配置:Switch(config)#vtp domain admin 配置域名admin

Switch(config)#vtp password ceshi 配置密码为ceshi

Switch(config)#vtp mode { client | server | transparent } 设置对应的模式,一个server,其余为client,client设置时,

不需要自己设置域名,因为链路已经透传过去,自动设为server的域名,只需要密码和模式就好。

交换机之间的链路保证都为trunk。

switch (config) # vtp pruning 配置VTP修剪

或者配置:Switch#vlan database 然后进入 Switch(vlan)# 模式下进行相对应的配置。

查看VTP的配置:show vtp status 查看相对应的信息

如何不能正常接收,先查看状态信息,是否一致,若一致,检查链路是否是trunk,一致,先关闭,Switch#clear vtp counters

清理VTP同步计数,在打开trunk链路, no shutdown

HSRP配置:

1. Switch(config-if)#ip add 192.168.2.1 255.255.255.0

2. Switch(config-if)#standby 1 ip 192.168.2.254 设置虚拟网关

3. Switch(config-if)#standby 1 preempt 设置抢占主备

4. Switch(config-if)#standby 1 track g0 30 设置跟踪上联端口

5. Switch(config-if)#standby 1 priority 120 设置优先级

GLBP 配置:

R1(config)#track 100 int f1/0 line-protocol //定义跟踪目标100为F1/0接口的二层故障,F1/0为上联端口

R1(config-if)#glbp 1 ip 192.168.1.254

R1(config-if)#glbp 1 authentication md5 key-string cisco //配置认证方式,可选

R1(config-if)#glbp 1 name TEST //配置组名字,可选项

R1(config-if)#glbp 1 timers 3 10 //配置GLBP的Hello时间3秒和Hold时间10秒,即为默认值

R1(config-if)#glbp 1 priority 200 //配置优先级,优先级高的路由器成为AVG,默认为100

R1(config-if)#glbp 1 preempt //配置路由器会进行AVG抢占,否则优先级再高也不会成为AVG

R1(config-if)#glbp 1 preempt delay minimum 1 //配置AVG抢占延时为1秒

R1(config-if)#glbp 1 weighting 200 lower 170 upper 180 //配置路由器的权重为200,低限为170,高限为180

R1(config-if)#glbp 1 weighting track 100 decrement 50 //配置跟踪目标100,F0/1故障时权重减去50

R1(config-if)#glbp 1 forwarder preempt //配置该路由器会抢占成为AVF

R1(config-if)#glbp 1 forwarder preempt delay minimum 25 //配置该路由器抢占AVF的延迟为25秒,默认为30秒

R1(config-if)#glbp 1 load-balancing round-robin //配置负载均衡的策略为轮询方式,即为默认值

说明:

①配置优先级是为了控制AVG的选举,而不是控制AVF的选举。

②路由器权重:当路由器出现故障后,如果权重低于低限(试验中为170)时,该路由器将不会成为AVF,也就是不

会转发数据;当故障排除后,如果权重高于高限(实验中为180)时,路由器重新成为AVF,才能转发数据。

此外,如果采用基于权重的负载均衡,则权重越大,转发数据的机会越大(试验中负载均衡的策略是轮询方式)。

③配置跟踪目标:由于试验中路由器的权重为200,F0/1如果故障,则权重为200 - 50 = 150,该值小于170,路

由器不转发数据。当F0/1恢复时,权重为200,高于180,路由器恢复数据转发。可以配置多个跟踪目标。

④使用“glbp 1 load-balancing”命令可以配置GLBP负载均衡的策略,它有以下几个参数:

1>host-dependent:根据不同主机的源MAC地址进行平衡;

2>round-roin:轮询方式,即每响应一次ARP请求,轮换一个地址,默认即为这种方式;

3>weighted:根据路由器的权重分配,权重高的被分配的可能性大。

思科设备基本巡检命令:

65系列:

1.show module

2.show environment

3.show processes cpu history 72小时平均低于80%

4.show processes memory shard 看内存是否接近于0

5.show redundancy

6.show memory statistics

7.show interface | i line |CRC

8.show ip bgp all summary 需要对比两台设备

9.show run vrf VRF名 查看VRF配置,需要对比

10.show run | in _VRF名 查看route-map和prefix-list配置是否一致,需要对比(确认是否有导

入map,route-map配置是否正确,两个路由域的prefix-list是否一致,若不一致,查找不一致的

导入条目,并确认原因)

N7k 和浪潮S127系列

1.show moudule

2.show environment

3.show processes cpu history 不超过50%

4. show processes memory shared 不低于20%

5.show boot

6.show interface | i "Ethernet|CRC"

7.show ip bgp vrf all summary

8.show run vrf VRF名

9.show run | i _VRF名 对比查找route-map和prefix-list

思科76系列

1.show module

2.show environment

3.show processes cpu history

4.show process memory shared

5.show redundancy

6.show ip bgp all summary

7.show platform hardware cpacity 某个板卡利用率与其他差别大或者超过80%记录并报警

8.show intterface | in line|CRC

思科路由系列:

1.show environment

2.show processes cpu history

3.show process memory | i otal

4.show run | i boot

5.show ip bgp all summary

6.show interface | i line|CRC

37系列:

1. show env stack 检查温度/风扇

2. show env power all 检查电源

3. show processes cpu history 检查CPU

4. show process memory | i Total 检查内存

5. show system mtu | i Rout|Jum 检查MTU设置

6. show sdm pre | i curr|next 检查工作模式

7. Show platform tcam utilization asic all 检查tcam表

8. show ver | i \ W 检查启动版本

show boot | i BOOT

9. show switch show switch stack-ports summary 检查堆叠

10. show glbp brief 检查网关负载均衡

11. show access-lists show run | i interface Vl|access-group 检查ACL

12. show ip bgp all summary | i \ 4\ 检查路由

浪潮6650系列巡检命令:(6650/68系列 对应思科38系列)

1. show env stack 检查温度/风扇

2. show env power all 检查电源

3. show processes cpu history 检查CPU

4. show process memory | i Total 检查内存

5. show system mtu 检查mtu

6. show sdm pre | i template 检查工作模式

7. show platform hardware fed switch 1 fwd-asic resource tcam utilization 1

show platform hardware fed switch 2 fwd-asic resource tcam utilization 2 根据堆叠数量

8. show ver | i \ W 检查启动版本

show boot | i BOOT

9. show switch 检测堆叠

show switch stack-ports summary

10. show glbp brief 检测网关冗余

11. show access-lists 检测ACL