cisco交换机常用命令
Cisco交换机常用命令Cisco交换机是网络中的关键设备,掌握其常用命令对于网络管理员和维护人员来说至关重要。本文总结了Cisco交换机的常用命令,包括设置主机名、登录口令、远程访问、CDP信息、端口描述、端口速度、以太网链路模式、静态VLAN等。 1.设置主机名/系统名在基于IOS的交换机上设置主机名/系统名使用以下命令:witch(config)# hostname。在基于CLI的交换机上设置主机名/系统名使用以下命令:witch(enable) set system name-string。 2.设置登录口令在基于IOS的交换机上设置登录口令使用以下命令:witch(config)# enable password level 1 password。在基于CLI的交换机上设置登录口令使用以下命令:witch(enable) set password witch(enable) set enalbepass。 3.设置远程访问在基于IOS的交换机上设置远程访问使用以下命令:witch(config)# interface vlan 1 witch(config-if)# ip address ip-address netmask witch(config-if)# ip default-gateway ip-address。在基于CLI的交换机上设置远程访问使用以下命令:witch(enable) set interface sc0 ip-address netmask broadcast-address witch(enable) set interface sc0 vlan witch(enable) set ip route default gateway。 4.启用和浏览CDP信息在基于IOS的交换机上启用和浏览CDP信息使用以下命令:witch(config-if)# cdp enable witch(config-if)# no cdp enable。为了查看Cisco邻接设备的CDP通告信息使用以下命令:witch# show cdp interface [type modle/port] witch# show cdp neighbors [type module/port] [detail]。在基于CLI的交换机上启用和浏览CDP信息使用以下命令:witch(enable) set cdp {enable|disable} module/port。为了查看Cisco邻接设备的CDP通告信息使用以下命令:witch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]。 5.端口描述基于IOS的交换机的端口描述使用以下命令:witch(config-if)# description-string。基于CLI的交换机的端口描述使用以下命令:witch(enable)set port name module/number description-string。 6.设置端口速度在基于IOS的交换机上设置端口速度使用以下命令:witch(config-if)# speed{10|100|auto}。在基于CLI的交换机上设置端口速度使用以下命令:witch(enable) set port speed moudle/number {10|100|auto} witch(enable) set port speed moudle/number {4|16|auto}。 7.设置以太网链路模式在基于IOS的交换机上设置以太网链路模式使用以下命令:witch(config-if)# duplex {auto|full|half}。在基于CLI的交换机上设置以太网链路模式使用以下命令:witch(enable) set port duplex module/number {full|half}。 8.配置静态VLAN在基于IOS的交换机上配置静态VLAN使用以下命令:witch# vlan database witch(vlan)# vlan-num name vla witch(vlan)# exit witch# configure teriminal witch(config)# interface module/number witch(config-if)# switchport mode access witch(config-if)# switchport access vlan-num witch(config-if)# end。在基于CLI的交换机上配置静态VLAN使用以下命令:witch(enable) set vlan-num [name name] witch(enable) set vlan-num mod-num/port-list。 9.配置VLAN中继线在基于IOS的交换机上配置VLAN中继线使用以下命令:witch(config)# interface mod/port witch(config-if)# switchport mode trunk witch(config-if)# switchport trunk allowed vlan-num witch(config-if)# end。掌握这些命令对于Cisco交换机的配置和维护至关重要。本文总结了Cisco交换机的常用命令,旨在帮助网络管理员和维护人员更好地了解和掌握Cisco交换机的配置和维护。
63KB
文件大小:
评论区