導航:首頁 > 程序命令 > 交換機網路命令使用步驟

交換機網路命令使用步驟

發布時間:2022-08-27 07:37:59

① 交換機的配置命令

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]

12. 在基於IOS的交換機上配置VTP版本:

switch# vlan database

switch(vlan)# vtp v2-mode

在基於CLI的交換機上配置VTP版本:

switch(enable) set vtp v2 enable

13. 在基於IOS的交換機上啟動VTP剪裁:

switch# vlan database

switch(vlan)# vtp pruning

在基於CL I 的交換機上啟動VTP剪裁:

switch(enable) set vtp pruning enable

14.在基於IOS的交換機上配置以太信道:

switch(config-if)# port group group-number [distribution {source|destination}]

在基於CLI的交換機上配置以太信道:

switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}

15.在基於IOS的交換機上調整根路徑成本:

switch(config-if)# spanning-tree [vlan vlan-list] cost cost

在基於CLI的交換機上調整根路徑成本:

switch(enable) set spantree portcost moudle/port cost

switch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]

16.在基於IOS的交換機上調整埠ID:

switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority

在基於CLI的交換機上調整埠ID:

switch(enable) set spantree portpri {mlle/port}priority

switch(enable) set spantree portvlanpri {mole/port}priority [vlans]

17. 在基於IOS的交換機上修改STP時鍾:

switch(config)# spanning-tree [vlan vlan-list] hello-time seconds

switch(config)# spanning-tree [vlan vlan-list] forward-time seconds

switch(config)# spanning-tree [vlan vlan-list] max-age seconds

在基於CLI的交換機上修改STP時鍾:

switch(enable) set spantree hello interval[vlan]

switch(enable) set spantree fwddelay delay [vlan]

switch(enable) set spantree maxage agingtiame[vlan]

18. 在基於IOS的交換機埠上啟用或禁用Port Fast 特徵:

switch(config-if)#spanning-tree portfast

在基於CLI的交換機埠上啟用或禁用Port Fast 特徵:

switch(enable) set spantree portfast {mole/port}{enable|disable}

19. 在基於IOS的交換機埠上啟用或禁用UplinkFast 特徵:

switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]

在基於CLI的交換機埠上啟用或禁用UplinkFast 特徵:

switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]

20. 為了將交換機配置成一個集群的命令交換機,首先要給管理介面分配一個IP地址,然後使用下列命令: switch(config)# cluster enable cluster-name cv

② 華為交換機典型配置,請給出詳細步驟和說明

交換初始化方法:
1、通過CONTROL口連接交換機,使用SecureCRTPortable軟體連接,打開軟體後選擇「新建會話」,在對話框中選擇「Serial」選項,點擊下一步,波特率9600,埠以實際使用的埠為准,不要選中RTS/CTS,否則鍵盤不能使用。
2、連接交換機。
3、進入交換機後,輸入
reset saved-configuration
命令運行後,輸入
reboot
在第一個提示(是否保存),輸入N,不保存。
接著在提示是否重啟中輸入Y,回車後交換機自動重啟。
重啟完成後,可開始執行交換基礎配置了。
1、配置設備名稱
system-view進入系統視圖
sysname HeXin命名為「HeXin」
2、配置管理VLAN
[HeXin]vlan 1進入VLAN 1
[HeXin-vlan1]description admin_VLAN設置VLAN 1為管理VLAN
3、配置HeXin與匯聚交換的連接埠為trunk
[HeXin]interface Gigabitethernet 0/0/1進入埠G速埠1
[HeXin-GigabitEthernet0/0/1]port link-type trunk配置埠1為trunk口
[HeXin-GigabitEthernet0/0/1]port trunk allow-pass vlan 1配置允許從埠1通行的VLAN為VLAN 1,如果想讓所有的VLAN都可以通過埠1,可執行命令port trunk allow-pass vlan all
[HeXin-GigabitEthernet0/0/1]quit退出埠1
4、配置交換機的管理IP
[HeXin]interface vlanif 1
[HeXin-Vlanif1]ip 10.10.10.1 255.255.255.0管理IP地址為10.10.10.1,網關255.255.255.0
[HeXin-Vla

③ 交換機如何配置

准備工具/原料:一台PC和一台交換機

1、首先將一台PC和一台交換機用線纜連接起來。

④ 交換機網關的配置命令

交換機網關設置方法一:

要利用Telnet方式登錄連接到交換機,交換機就必須有一個IP地址,二層交換機的埠是無法設置IP地址,但由於交換機都默認有一個VLAN1介面,VLAN介面是可以設置IP地址的,因此,對於二層交換機,其管理地址,就是VLAN1介面的地址。

⑤ 交換機的基本命令是什麼

「Switch>」

⑥ 交換機的命令具體怎麼使用

交換機的命令非常多,主要是用來配置交換機的,只有可網管的交換機(有console口的交換機)才能進行配置。
不同廠家、不同型號的交換機的配置命令也不大一樣。
舉個CISCO的命令例子吧:
hostname是給交換機命名的命令,如交換機本來的名字是Switch,使用(config)#hostname
JIAOHUANJI,就可以把交換機的名字改成JIAOHUANJI了。
交換機配置時還分很多種模式,每種模式下的配置命令也都有很大區別,具體的真不是三兩句說得清的,你只有買些教材看看了。

⑦ 交換機的基本命令

交換機的啟動及基本配置
1924交換機上配置

sw1924_b#delete nvram
全部清除交換機的所有配置
sw1924_b#reload
重新啟動交換機(初始提示符為> )
sw1924_b#hostname sw1924
設置交換機的主機名
sw1924_b#enable secret cisco
設置加密密碼
sw1924_b#enable password level 1 cisco1
設置等級密碼(1最低)
sw1924_b#enable password level 15 cisco15
設置等級密碼(15最高)
sw1924_b#ip address 192.168.14.1 255.255.255.0
設置交換機的管理IP地址
sw1924_b#ip default-gateway 192.168.198.2
設置交換機的網關地址
sw1924_b#ip domain-name pctc.com.cn
設置交換機所連域的域名
sw1924_b#ip name-server 218.87.18.230
設置交換機所連域的域名伺服器IP
sw1924_b#show ip
查看上述設置環境
sw1924_b#show version
查看交換機的版本等信息
sw1924_b#show running-config
查看交換機的當前運行配置等全部信息
sw1924_b#show int e0/1
查看交換機的第1個埠信息

1924交換機配置埠屬性

sw1924_b#conf t
sw1924_b#interface ethernet 0/1
進入第1個埠
sw1924_b#description sw1924_b-e0/1-pc1
給埠寫入注釋信息
sw1924_b#plex auto/full/full-flow-control/half
設置埠的工作模式
sw1924_b#port secure
啟用埠安全性
sw1924_b#port secure max-mac-count 1
設置該埠允許對應的MAC地址數(默認132個)
sw1924_b#sh mac-address-table security
查看埠安全性

sw1912_a#conf t
進入全局配置模式
sw1912_a#interface fastethernet 0/1
進入第1個埠
sw1912_a#description sw2912_a-f0/1-pc1
給埠寫入注釋信息
sw1912_a#plex auto/full/half
設置埠的工作模式
sw1912_a#port security
啟用埠安全性
sw1912_a#port security max-mac-count 1
設置該埠允許對應的MAC地址數(默認132個)
sw1912_a#end
返回特權模式
sw1912_a#sh port security
查看埠安全性

配置和查看MAC地址表

1924交換機配置MAC地址表

sw1924_b#mac-address-table aging-time 600
設置動態地址超時時間
sw1924_b#mac-address-table permanent 0000.0cdd.5a4d e0/3
定義永久MAC地址(綁定MAC地址)
sw1924_b#mac-address-table restricted static 0000.0cdd.aaed e0/6 e0/7
定義受限MAC地址
sw1924_b#address-violation disable/ignore/suspend
定義地址安全違規
sw1924_b#show mac-address-table
查看上述配置
sw1924_b#clear mac-addr restric static
清除受限MAC地址表項

2912交換機配置MAC地址表

sw2912_a#mac-address-table aging-time 700
設置動態地址超時時間
sw2912_a#mac-address-table static 0000.0cdd.5a4d e0/3
定義永久MAC地址(綁定MAC地址)
sw2912_a#mac-address-table secure 00d0.f80d.3333 f0/3 vlan 1
定義受限MAC地址
sw2912_a#port security action shutdown/trap
定義地址安全違規
sw2912_a#show port security
查看上述配置

配置VTP、VLAN、VLAN Trunk和STP

配置VTP

sw1924_a#conf t
sw1924_a#vtp server
定義VTP的工作模式
sw1924_a#vtp domain cisco
定義VTP的域名
sw1924_a#trunk on
啟用幹道

sw1924_b#vtp domain cisco
加入VTP域
sw1924_b#vtp client
定義VTP的工作模式
sw1924_b#trunk on
啟用幹道

sw1924_a#show trunk b
sw1924_a#show trunk b allowed-vlans
查看幹道信息

配置VLAN

sw1924_a#vlan 10 dept1
sw1924_a#vlan 20 dept2
sw1924_a#vlan 30 dept3
sw1924_a#vlan 40 dept4
定義所需VLAN
sw1924_a#show vlan
查看VLAN信息

sw1924_b#show vlan
sw1924_b#show vtp
查看VTP的信息
sw1924_b#int e0/1
sw1924_b#vlan-membership static 10
sw1924_b#int e0/2
sw1924_b#vlan-membership static 20
sw1924_b#int e0/3
sw1924_b#vlan-membership static 30
sw1924_b#int e0/4
sw1924_b#vlan-membership static 40
把介面劃入各自VLAN

配置spanning tree

sw1924_b#spantree 1
啟用生成樹協議
sw1924_b#sh spantree 1
查看生成樹信息
sw1924_b#no spantree 1
關閉生成樹協議
sw1924_b#sh spantree 1
查看生成樹信息

⑧ 交換機配置命令是什麼

1、交換機配置命令,英文名Switchboard
Command,是一種計算機語言,用來控制交換機的語言。
2、交換機的配置方式
(1)使用控制(console)埠,使用超級終端配置交換機
console是一個用來連接配置終端的非同步串列介面,其介面標準是RJ-45。
(2)使用telnet配置交換機
用遠程登陸telnet對交換機進行配置,是一種遠程管理設備的常用方式。
(3)使用瀏覽器配置交換機
該方式可以對交換機進行配置,也可以修改交換機的參數,以便對交換機進行管理,還可以查看交換機的運行狀態。
3、顯示交換表命令的使用方法
(1)大中型交換機
在交換機超級用戶模式下輸入命令:Cisco-4000#show
cam
dynamic。
(2)小型交換機
在交換機超級用戶模式下輸入命令:
Cisco-3548#show
mac-address-table。

閱讀全文

與交換機網路命令使用步驟相關的資料

熱點內容
可以開倍速的影視網站 瀏覽:957
大尺度韓國日本電影 瀏覽:626
htts加密過程 瀏覽:598
python棋盤問題的原理 瀏覽:165
程序員記憶力差 瀏覽:696
日本看電影的網站 瀏覽:115
禁用程序安裝時聯網命令 瀏覽:258
程序員為什麼開發不了框架 瀏覽:264
有水生名字的電影 瀏覽:739
韓國十大禁止播放片 瀏覽:365
養貓解壓視頻大全集 瀏覽:737
隱私圖片保存文件伺服器什麼查看 瀏覽:493
etc命令全稱 瀏覽:157
海神號真實結局 瀏覽:898
收母的都市 瀏覽:47
網頁能直接看的那種 瀏覽:695
python獲取目錄名 瀏覽:379
利用冰箱壓縮機給空調抽真空 瀏覽:902
法國啄木鳥有哪些作品 瀏覽:553
法國阿爾法公司電影有哪些 瀏覽:669