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
CISCO交換機常用命令
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
35.install命令
huyuwj
2019-02-24 13:20:01
STP;VTP交換機配置實例
wbzjacky
2019-02-24 13:12:37
交換機級聯端口變化 引發無法上網故障
千年小道
2019-02-24 13:06:21
Dlink交換機常用命令
千年小道
2019-02-24 13:06:21
華爲3COM交換機防病毒策略
god9394
2019-02-24 13:04:19
交換機與路由器間的端口聚合
god9394
2019-02-24 13:03:51
交換機上防止ARP欺騙***
god9394
2019-02-24 13:03:51
Dlink交換機型號字母代表的意義
千年小道
2019-02-24 12:54:08
dlink des3828 交換機
千年小道
2019-02-24 12:54:07
三層交換機與路由器的比較
wpgs
2019-02-23 14:05:20
交換機的啓動及基本配置
talkstone
2019-02-23 13:59:02
IPsec ***實驗
wbzjacky
2019-02-24 13:12:37
CISCO路由AAA的Easy ***
wbzjacky
2019-02-24 13:12:37
使用淘汰的二手設備構建CISCO實驗環境
白璐
2019-02-23 14:05:08