cisco思科交換機配置篇
要進行思科交換機的配置,首先就得進入交換機的全域性配置模式,在成功連線交換機並且登陸成功進入特權模式下,下面跟yjbys小編一起來學習一下思科交換機的配置命令吧!
1、輸入進入全域性配置模式:
switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#
switch(config)#
switch(config)#
這麼簡單的一條命令,俺們就進入到全域性配置模式了,還記得上一篇中檢視埠所查詢到的資訊中name欄位下的值嗎?這欄位其實代表的是交換機埠的描述資訊
2、修改埠描述
switch#
switch#
switch#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#
switch(config)#int fa0/3
switch(config-if)#
switch(config-if)#desc
switch(config-if)#description updateDesc
switch(config-if)#
switch(config-if)#exit
switch(config)#exit
switch#
switch#show inter
switch#show interfaces statu
switch#show interfaces status
Port Name Status Vlan Duplex Speed Type
Fa0/1 connected 1 a-full a-100 10/100BaseTX
Fa0/2 h3c2.250 connected trunk a-full a-100 10/100BaseTX
Fa0/3 updateDesc notconnect 1 auto auto 10/100BaseTX
Fa0/4 connected 1 a-full a-100 10/100BaseTX
Fa0/5 h3c-2.200 connected 1 a-full a-100 10/100BaseTX
Fa0/6 notconnect 1 auto auto 10/100BaseTX
修改描述的關鍵命令在於,在配置模式下,進入到要修改的埠下,然後使用description + “內容”!效果應該很直觀了吧,接下來就是修改埠的所在Vlan了
3、修改埠Vlan
switch#
switch#
switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#
switch(config)#int fa0/3
switch(config-if)#
switch(config-if)#sw acc vl 2
switch(config-if)#
switch(config-if)#exit
switch(config)#
switch(config)#exit
switch#
switch#show inter statu
Port Name Status Vlan Duplex Speed Type
Fa0/1 connected 1 a-full a-100 10/100BaseTX
Fa0/2 h3c2.250 connected trunk a-full a-100 10/100BaseTX
Fa0/3 updateDesc notconnect 2 auto auto 10/100BaseTX
Fa0/4 connected 1 a-full a-100 10/100BaseTX
Fa0/5 h3c-2.200 connected 1 a-full a-100 10/100BaseTX
Fa0/6 notconnect 1 auto auto 10/100BaseTX
邏輯和修改埠描述是一樣的,對於配置來說,肯定是到了能有配置許可權的地方和要配置的物件,這裡修改埠Vlan的關鍵命令為:sw acc vl + vlantag,命令很明顯被簡寫了,但是不影響執行,命令的全寫為:switchport access vlan + vlantag
還有一些對埠的簡單操作,譬如修改埠的模式,
4、修改埠模式
switch(config-if)#switchport trunk encap dot1q ----------------設定vlan 中繼的'封裝協議
注:dot1q就是 IEEE 802.1Q協議,是vlan的一種封裝方式,是公有協議。還有一種trunk協議,是ISL,也是vlan的一種封裝方式,不過這是Cisco思科私有協議,其他廠商不能用。
switch(config-if)#switchport mode trunk ------------------------設定埠型別為trunk
switch(config-if)#switchport trunk allowed vlan 1,2 ---------設定允許的vlan,預設不用配置,為所有vlan
switch(config-if)#switchport trun native vlan 999 ---------------設定trunk口的native vlan
5、埠狀態
switch(config)#
switch(config)#int fa0/3
switch(config-if)#
switch(config-if)#
switch(config-if)#sw acc vl 1
switch(config-if)#
switch(config-if)#
switch(config-if)#shutd
switch(config-if)#shutdown
switch(config-if)#
switch(config-if)#exit
switch(config)#
switch(config)#exit
switch#
switch#show inter statu
Port Name Status Vlan Duplex Speed Type
Fa0/1 connected 1 a-full a-100 10/100BaseTX
Fa0/2 h3c2.250 connected trunk a-full a-100 10/100BaseTX
Fa0/3 updateDesc disabled 1 auto auto 10/100BaseTX
Fa0/4 connected 1 a-full a-100 10/100BaseTX
上面的一系列為切換Vlan,並且shutdown埠,這時候大家可能看到了交換機3號埠的狀態已變成disable了,如果我們要啟用埠只需
switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#
switch(config)#int fa0/3
switch(config-if)#
switch(config-if)#no shut
switch(config-if)#no shutdown
switch(config-if)#
switch(config-if)#exit
switch(config)#
switch(config)#exit
switch#
switch#show inter statu
Port Name Status Vlan Duplex Speed Type
Fa0/1 connected 1 a-full a-100 10/100BaseTX
Fa0/2 h3c2.250 connected trunk a-full a-100 10/100BaseTX
Fa0/3 updateDesc notconnect 1 auto auto 10/100BaseTX
Fa0/4 connected 1 a-full a-100 10/100BaseTX
-
思科認證途徑都有哪些
很多人躊躇不定,不知道是否該選擇網路工程師為未來的職業方向,對思科認證網路工程師的前途感到有些迷茫,那我們就仔細來分析下思科認證的各種途徑及認證理由!一般性認證一般性認證共有六條分歧的路子1、路由和交流:這條路子合用於那些在採用了LAN和WAN路由器和交流...
-
考取思科認證的5大理由
隨著網路功能不斷擴充套件,企業網路工程師需求也不斷增加。作為IT行業認可的標準,思科認證一直以來備受IT僱主青睞,提升個人薪資及職場地位。下面是小編收集的考取思科認證的5大理由,希望大家認真閱讀!理由一:網路人才需求不斷增長,人才缺口同步增長。2016年人才總需求高...
-
解析CCNA考試流程及注意事項
思科認證網路支援工程師認證證書說明了你擁有足夠的網路知識去提供服務給中小型企業。yjbys小編整理了一些關於CCNA考試流程及注意事項,歡迎大家參考!1.CCNA—思科認證網路工程師,是思科廠商認證考試。考試要求:對學歷、專業、年齡沒有要求。考試時間:是商業...
-
思科認證:交換機使用技巧
在除錯、維護Cisco交換機的過程中,祥子會遇到一些很頭痛的問題,好在經過這一段時間的系統學習,這些問題都一一解決了,事實上,瞭解這些方法對於提高除錯交換機的效率非常有幫助,在此,將積累的幾點小經驗介紹一下,供大家參考。一、如何讓自己輸入命令時不受到系統資訊的...