交換機關機命令
A. 交換機的命令具體怎麼使用
交換機的命令非常多,主要是用來配置交換機的,只有可網管的交換機(有console口的交換機)才能進行配置。
不同廠家、不同型號的交換機的配置命令也不大一樣。
舉個CISCO的命令例子吧:
hostname是給交換機命名的命令,如交換機本來的名字是Switch,使用(config)#hostname JIAOHUANJI,就可以把交換機的名字改成JIAOHUANJI了。
交換機配置時還分很多種模式,每種模式下的配置命令也都有很大區別,具體的真不是三兩句說得清的,你只有買些教材看看了。
B. 交換機配置相關命令是什麼
你那什麼牌子的呀 他的設置大同小類了
我給你幾個 前面是通用的 後面的你自己慢慢研究 不會問我了
交換機基本配置命令(3026)
PCA login: root ;使用root用戶
password: linux ;口令是linux
# shutdown -h now ;關機
# init 0 ;關機
# logout
# login
# ifconfig ;顯示IP地址
# ifconfig eth0 <ip address> netmask <netmask> ;設置IP地址
# ifconfig eht0 <ip address> netmask <netmask> down ; 刪除IP地址
# route add 0.0.0.0 gw <ip>
# route del 0.0.0.0 gw <ip>
# route add default gw <ip> ;設置網關
# route del default gw <ip> ;刪除網關
# route ;顯示網關
# ping <ip>
# telnet <ip> ;建議telnet之前先ping一下
交換機命令
[Quidway]super password 修改特權用戶密碼
[Quidway]sysname 交換機命名
[Quidway]interface ethernet 0/1 進入介面視圖
[Quidway]interface vlan x 進入介面視圖
[Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0
[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 靜態路由=網關
[Quidway]user-interface vty 0 4
[S3026-ui-vty0-4]authentication-mode password
[S3026-ui-vty0-4]set authentication-mode password simple 222
[S3026-ui-vty0-4]user privilege level 3
[Quidway-Ethernet0/1]plex {half|full|auto} 配置埠雙工工作狀態
[Quidway-Ethernet0/1]speed {10|100|auto} 配置埠工作速率
[Quidway-Ethernet0/1]flow-control 配置埠流控
[Quidway-Ethernet0/1]mdi {across|auto|normal} 配置埠MDI/MDIX狀態平接或扭接
[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} 設置介面工作模式
[Quidway-Ethernet0/1]shutdown 關閉/重起介面
[Quidway-Ethernet0/2]quit 退出系統視圖
[Quidway]vlan 3 創建/刪除一個VLAN/進入VLAN模式
[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 在當前VLAN增加/刪除乙太網介面
[Quidway-Ethernet0/2]port access vlan 3 將當前介面加入到指定VLAN
[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} 設trunk允許的VLAN
[Quidway-Ethernet0/2]port trunk pvid vlan 3 設置trunk埠的PVID
[Quidway]monitor-port <interface_type interface_num> 指定和清除鏡像埠
[Quidway]port mirror <interface_type interface_num> 指定和清除被鏡像埠
[Quidway]port mirror int_list observing-port int_type int_num 指定鏡像和被鏡像
[Quidway]description string 指定VLAN描述字元
[Quidway]description 刪除VLAN描述字元
[Quidway]display vlan [vlan_id] 查看VLAN設置
[Quidway]stp {enable|disable} 開啟/關閉生成樹,默認關閉
[Quidway]stp priority 4096 設置交換機的優先順序
[Quidway]stp root {primary|secondary} 設置交換機為根或根的備份
[Quidway-Ethernet0/1]stp cost 200 設置交換機埠的花費
[SwitchA-vlanx]isolate-user-vlan enable 設置主vlan
[SwitchA]Isolate-user-vlan <x> secondary <list> 設置主vlan包括的子vlan
[Quidway-Ethernet0/2]port hybrid pvid vlan <id> 設置vlan的pvid
[Quidway-Ethernet0/2]port hybrid pvid 刪除vlan的pvid
[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged 設置無標識的vlan
如果包的vlan id與PVId一致,則去掉vlan信息. 默認PVID=1。
所以設置PVID為所屬vlan id, 設置可以互通的vlan為untagged.
C. 交換機的基本命令
交換機的基本命令有以下四種:
一、模式命令:
1. 用戶模式:Switch>
2. 特權模式:Switch>enable
Switch#
3. 全局配置模式:Switch#config terminal
Switch(config)#
4. 介面配置模式:Switch(config)#interface fastethernet0/1
Switch(config-if)#
5. Line模式:Switch(config)#line console 0
Switch(config-line)#
二、特權模式下的命令:
1. 查看機MAC地址:Switch#show mac-address-table
2. 發現(CDP):
Switch#show cdp
Switch#show cdp interface fastethernet0/1
Switch#show cdp neighbors
Switch#show cdp neighbors detail
Switch#show cdp entry
3. 保存機配置:
Switch# running-config startup-config或者Switch#write
4. 恢復交換機出廠值:
Switch#erase startup-config
Switch#reload
三、全局配置模式下的命令:
1. 配置主機名:Switch(config)#hostname Sw1
Sw1(config)#
2、 設置登陸台密碼:Switch(config)#line console 0
Switch(config-line)#password 密碼
Switch(config-line)#login
3. 使能口令:Switch(config)#enable Password 密碼
4. 加密保存的使能口令:Switch(config)#enable secret 密碼
5. 配置IP地址:
Switch(config)#interface vlan 1
Switch(config-if)#ip address IP地址 網關
Switch(config-if)#no shutdown
6. 配置交換機網關:Switch(config)#ip default-gateway 網關
四、VLAN配置命令:
1. 創建vlan命令:
a) 全局配置模式下:
Switch(config)#vlan 2
Switch(config)#name v2
Switch(config)#mtu 數值
Switch(config)#end
b) Vlan資料庫下:
Switch#vlan database
Switch#vlan 2 name v2
Switch#vlan 2 mut 數值
Switch#exit
2. 刪除vlan命令:
a) 全局配置模式下:
Switch(config)#no vlan 2
Switch(config)#end
b) Vlan資料庫下:
Switch#no vlan 2 name v2
Switch#exit
3. 在vlan中添加埠:
Switch#config terminal
Switch(config)#interface f0/1(埠)
Switch(config-if)#Switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#end
一次將多個埠添加到vlan中:
Switch#config terminal
Switch(config)#interface range f0/1 - 5(埠)
Switch(config-if)#switchport access vlan 2
Switch(config-if)#end
註:switch#show vlan biref(查看vlan信息)
4. 配置vlan trunk:
1. 配置介面為trunk命令:
Switch(config)# interface f0/1(埠)
Switch(config-if)#Switchport mode trunk
2. 配置介面為動態協商模式的命令:
Switch(config)# interface f0/1(埠)
Switch(config-if)#switchport mode dynamic desirable/auto
3. 從trunk中刪除vlan:
Switch(config)# interface f0/1(埠)
Switch(config-if)#Switchport trunk allowed vlan remove 2
4. 在trunk中添加vlan:
Switch(config)# interface f0/1(埠)
Switch(config-if)#Switchport trunk allowed vlan add 2
D. CISCO交換機有沒有關機命令
沒有,很多型號的設備電源鍵都沒有,只有重啟,沒有關閉,關閉只能拔電源,即便有電源開關的設備也需要手動關閉開關。
E. 交換機上的dos命令(所有)
以下進部分命令
全部命令地址:http://www.it286.net/ExamCertification/Cisco/200606/11689.html
1.在基於IOS的交換機上設置主機名/系統名:
switch(config)# hostname hostname
在基於CLI的交換機上設置主機名/系統名:
switch(enable) set system name name-string
2.在基於IOS的交換機上設置登錄口令:
switch(config)# enable password level 1 password
在基於CLI的交換機上設置登錄口令:
switch(enable) set password
switch(enable) set enalbepass
3.在基於IOS的交換機上設置遠程訪問:
switch(config)# interface vlan 1
switch(config-if)# ip address ip-address netmask
switch(config-if)# ip default-gateway ip-address
在基於CLI的交換機上設置遠程訪問:
switch(enable) set interface sc0 ip-address netmask broadcast-address
switch(enable) set interface sc0 vlan
switch(enable) set ip route default gateway
4.在基於IOS的交換機上啟用和瀏覽CDP信息:
switch(config-if)# cdp enable
switch(config-if)# no cdp enable
為了查看Cisco鄰接設備的CDP通告信息:
switch# show cdp interface [type modle/port]
switch# show cdp neighbors [type mole/port] [detail]
在基於CLI的交換機上啟用和瀏覽CDP信息:
switch(enable) set cdp {enable|disable} mole/port
為了查看Cisco鄰接設備的CDP通告信息:
switch(enable) show cdp neighbors[mole/port] [vlan|plex|capabilities|detail]
5.基於IOS的交換機的埠描述:
switch(config-if)# description description-string
基於CLI的交換機的埠描述:
switch(enable)set port name mole/number description-string
6.在基於IOS的交換機上設置埠速度:
switch(config-if)# speed{10|100|auto}
在基於CLI的交換機上設置埠速度:
switch(enable) set port speed moudle/number {10|100|auto}
switch(enable) set port speed moudle/number {4|16|auto}
7.在基於IOS的交換機上設置乙太網的鏈路模式:
switch(config-if)# plex {auto|full|half}
在基於CLI的交換機上設置乙太網的鏈路模式:
switch(enable) set port plex mole/number {full|half}
8.在基於IOS的交換機上配置靜態VLAN:
switch# vlan database
switch(vlan)# vlan vlan-num name vla
switch(vlan)# exit
switch# configure teriminal
switch(config)# interface interface mole/number
switch(config-if)# switchport mode access
switch(config-if)# switchport access vlan vlan-num
switch(config-if)# end
在基於CLI的交換機上配置靜態VLAN:
switch(enable) set vlan vlan-num [name name]
switch(enable) set vlan vlan-num mod-num/port-list
9. 在基於IOS的交換機上配置VLAN中繼線:
switch(config)# interface interface mod/port
switch(config-if)# switchport mode trunk
switch(config-if)# switchport trunk encapsulation {isl|dotlq}
switch(config-if)# switchport trunk allowed vlan remove vlan-list
switch(config-if)# switchport trunk allowed vlan add vlan-list
在基於CLI的交換機上配置VLAN中繼線:
switch(enable) set trunk mole/port [on|off|desirable|auto|nonegotiate]
Vlan-range [isl|dotlq|dotl0|lane|negotiate]
10.在基於IOS的交換機上配置VTP管理域:
switch# vlan database
switch(vlan)# vtp domain domain-name
在基於CLI的交換機上配置VTP管理域:
switch(enable) set vtp [domain do
F. 思科交換機關閉埠命令
思科交換機埠命令開關如下:
config# int port 15
# shut down
這條命令就是 關閉15埠
config# Int port 15
# no shut down
這條命令就是 開啟15埠
以此類推。
如果向遠程管理建議配置交換機管理IP
vlan 1
IP ADD XXX.XXX.XXX.XXX
xxx表示IP 如果公網IP必須使用合法有效IP 內網的話,使用192.168.1.2 就可以。但是要注意不能和內網用戶電腦IP地址沖突。
G. 交換機配置命令
1、交換機配置命令,英文名Switchboard Command,是一種計算機語言,用來控制交換機的語言。
H. 求交換機命令大全
每個廠家的 產品命令也是不一樣的
1.在基於IOS的交換機上設置主機名/系統名:
switch(config)# hostname hostname
在基於CLI的交換機上設置主機名/系統名:
switch(enable) set system name name-string
2.在基於IOS的交換機上設置登錄口令:
switch(config)# enable password level 1 password
在基於CLI的交換機上設置登錄口令:
switch(enable) set password
switch(enable) set enalbepass
3.在基於IOS的交換機上設置遠程訪問:
switch(config)# interface vlan 1
switch(config-if)# ip address ip-address netmask
switch(config-if)# ip default-gateway ip-address
在基於CLI的交換機上設置遠程訪問:
switch(enable) set interface sc0 ip-address netmask broadcast-address
switch(enable) set interface sc0 vlan
switch(enable) set ip route default gateway
4.在基於IOS的交換機上啟用和瀏覽CDP信息:
switch(config-if)# cdp enable
switch(config-if)# no cdp enable
為了查看Cisco鄰接設備的CDP通告信息:
switch# show cdp interface [type modle/port]
switch# show cdp neighbors [type mole/port] [detail]
在基於CLI的交換機上啟用和瀏覽CDP信息:
switch(enable) set cdp {enable|disable} mole/port
為了查看Cisco鄰接設備的CDP通告信息:
switch(enable) show cdp neighbors[mole/port] [vlan|plex|capabilities|detail]
5.基於IOS的交換機的埠描述:
switch(config-if)# description description-string
基於CLI的交換機的埠描述:
switch(enable)set port name mole/number description-string
6.在基於IOS的交換機上設置埠速度:
switch(config-if)# speed{10|100|auto}
在基於CLI的交換機上設置埠速度:
switch(enable) set port speed moudle/number {10|100|auto}
switch(enable) set port speed moudle/number {4|16|auto}
7.在基於IOS的交換機上設置乙太網的鏈路模式:
switch(config-if)# plex {auto|full|half}
在基於CLI的交換機上設置乙太網的鏈路模式:
switch(enable) set port plex mole/number {full|half}
8.在基於IOS的交換機上配置靜態VLAN:
switch# vlan database
switch(vlan)# vlan vlan-num name vla
switch(vlan)# exit
switch# configure teriminal
switch(config)# interface interface mole/number
switch(config-if)# switchport mode access
switch(config-if)# switchport access vlan vlan-num
switch(config-if)# end
在基於CLI的交換機上配置靜態VLAN:
switch(enable) set vlan vlan-num [name name]
switch(enable) set vlan vlan-num mod-num/port-list
9. 在基於IOS的交換機上配置VLAN中繼線:
switch(config)# interface interface mod/port
switch(config-if)# switchport mode trunk
switch(config-if)# switchport trunk encapsulation {isl|dotlq}
switch(config-if)# switchport trunk allowed vlan remove vlan-list
switch(config-if)# switchport trunk allowed vlan add vlan-list
在基於CLI的交換機上配置VLAN中繼線:
switch(enable) set trunk mole/port [on|off|desirable|auto|nonegotiate]
Vlan-range [isl|dotlq|dotl0|lane|negotiate]
10.在基於IOS的交換機上配置VTP管理域:
switch# vlan database
switch(vlan)# vtp domain domain-name
在基於CLI的交換機上配置VTP管理域:
switch(enable) set vtp [domain domain-name]
11.在基於IOS的交換機上配置VTP 模式:
switch# vlan database
switch(vlan)# vtp domain domain-name
switch(vlan)# vtp {sever|cilent|transparent}
switch(vlan)# vtp password password
在基於CLI的交換機上配置VTP 模式:
switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]
I. cisco交換機的關機命令什麼哪位大俠 知道
沒有關機命令吧。不過有重新載入配置的命令,相當於重啟。
reload
J. 思科cisco交換機關機可以用命令設置嗎
關機不行,多數交換機都不帶電源開關的,用reload命令可以重啟。