思科交换机常用命令及配置?

4个月前 (08-16 03:26)阅读28回复0
xietoutiao
xietoutiao
  • 管理员
  • 注册排名1
  • 经验值2130065
  • 级别管理员
  • 主题426013
  • 回复0
楼主

思科交换机常用命令及配置?

设置主机名/系统名

switch(config)# hostname "hostname"
switch(enable) set system name name-string

设置登录口令

switch(config)# enable password level 1 password
switch(enable) set password
switch(enable) set enable password

设置远程访问

switch(config)# interface vlan 1
switch(config-if)# ip address ip-address netmask
switch(config-if)# ip default-gateway ip-address
switch(enable) set int sc0 ip-address netmask broadcast-address
switch(enable) set int sc0 vlan
switch(enable) set ip route default gateway

启用和浏览CDP信息

switch(config-if)# cdp enable
switch(config-if)# no cdp enable
switch(enable) set cdp enable module port

配置使能密码

cisco-sw1(config)#enable secret ciscoswitchps:secret

配置VLAN并添加端口

cisco-sw1(config)#vlan 2
cisco-sw1(config-vlan)#name test
cisco-sw1(config-vlan)#exit
cisco-sw1(config)#interface fastEthernet 0/1
cisco-sw1(config-if)#switchport mode access
cisco-sw1(config-if)#switchport access vlan 2

进入交换机某一端口

switch> enable
switch# configure terminal
switch(conf)# interface fastethernet 0/1

查看命令与显示配置信息

switch> enable
switch# show version
switch# show vlan id 1
switch# show running-config
switch# show interface fastethernet 0/1
switch> enable
switch# show mac-address-table

恢复出厂设置

switch> enable
switch# erase startup-config
switch# reload

调整Telnet远程登录设置

switch> enable
switch# configure terminal
switch(conf)# enable password cisco
switch(conf)# interface vlan 1
switch(conf-if)# ip address 192.168.1.1 255.255.255.0
switch(conf-if)# no shutdown
switch(conf-if)# exit
switch(conf)line vty 0 4
switch(conf-line)# password 123456
switch(conf-line)# login

配置SSH远程登录设置

Switch# conf t
Switch(config)# hostname cisco-sw1
Switch(config)# ip domain-name cisco.com
Switch(config)# line vty 0 4
Switch(config-line)# transport input ssh
Switch(config-line)# exit
Switch(config)# crypto key generate rsa

这些步骤可以帮助您在思科交换机上进行基本的配置和管理操作,希望对您有所帮助!

思科交换机常用命令及配置?

0
回帖

思科交换机常用命令及配置? 期待您的回复!

取消
载入表情清单……
载入颜色清单……
插入网络图片

取消确定

图片上传中
编辑器信息
提示信息