收藏 分销(赏)

交换机基本命令.doc

上传人:仙人****88 文档编号:11435382 上传时间:2025-07-23 格式:DOC 页数:4 大小:28.50KB 下载积分:10 金币
下载 相关 举报
交换机基本命令.doc_第1页
第1页 / 共4页
交换机基本命令.doc_第2页
第2页 / 共4页


点击查看更多>>
资源描述
1、Switch>                            用户模式 2、Switch>enable                       进入特权模式      Switch# 3、Switch#config terminal                进入全局模式      Switch(config)# 4、Switch(config)#interface f0/1          进入接口模式      Switch(config-if)# 5、Switch(config)#line console 0          进入line模式      Switch(config-line)#      exit 退回上层      end 结束所有操作 6、Switch(config)#hostname aaa          配置主机名 7、switch#show running-config            查看配置情况 8、Switch(config)#enable password 111    设置使能密码(明文) 9、Switch(config)#enable secret 111       设置使能密码(密文)      Switch(config)#line console 0          设置console密码      Switch(config-line)#password 333      Switch(config-line)#login 10、Switch(config)#interface vlan1        Switch(config-if)#ip address 192.168.1.1 255.255.255.0    设置IP地址        Switch(config-if)#no shutdown 11、Switch(config)#ip default-gateway 192.168.1.10    设置网关 12、Switch#show mac-address-table         查看MAC地址表 13、Switch#show cdp                     cdp全局配置信息 14、Switch#show cdp interface f0/1          cdp接口配置信息 15、Switch#show cdp traffic                cdp包的配置信息 16、Switch#show cdp neighbors             cdp邻居基本信息 17、Switch#show cdp neighbors detail        cdp邻居详细信息        Switch#show cdp neighbors entry 18、Switch#copy running-config startup-config        Switch#write                        保存交换机配置信息 19、Switch#erase startup-config             恢复出厂信息        Switch#reload                        重新加载 20、交换机密码恢复    *断开电源    *按住MODE键,加电(等待数秒)    *switch:出现此符号    *switch:flash_init 初始化flash    *switch:dir flash: (查看文件,可省去)    *switch:rename config.text config.old       改名    *switch:boot 重启    *switch>enable 进入特权    *switch#dir flash: (查看文件,可省去)    *switch#rename config.old config.text改名    *switch#copy flash:config.text running-config 复制到系统内    *switch#confit terminal 进入全局模式    *switch(config)#enable password 222 设置新密码 21、switch#show vlan-sw brief                  查看vlan 22、switch#vlan database                    进入vlan模式        switch(vlan)#vlan 20 name bbb           创建vlan并命名 23、switch(vlan)#no vlan 20                        删除vlan 24、添加端口到vlan(单个)     switch(config)#interface f0/1                进入接口模式     switch(config-if)#switchport access vlan 10    添加至vlan10     switch(config-if)#end                     退出     switch#show vlan brief (id)                验证vlan     switch(config)#show running-config interface f0/1(查看某接口) 25、添加端口到vlan(批量)     switch(config)#interface range f0/1 - 5     switch(config-if-range)#switchport access vlan 10 26、switch(config)#interface f0/1                进入接口     switch(config-if)#switchport mode trunk      设置为trunk(永久)     switch(config-if)#switchport mode dynamic desirable/auto(其它trunk)     switch(config-if)#switchport trunk allowed vlan remove 10 移除vlan10)     switch(config-if)#switchport trunk allowed vlan add 20    添加vlan20 27、switch#show interface f0/1 switchport         查看接口模式        show ip interface brief
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服