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
-
2016年思科認證CCIE認證考試模擬試題及答案
思科認證主要考試內容是什麼?今天yjbys小編為大家分享的是思科認證考試模擬試題及答案,僅供同學們複習參考!1.Beforeinsertinganewswitchinthenetwork,thenetworkadministratorchecksthattheVTPdomainnameiscorrect,theVTPmodeissettoserver,andrevisionislower...
-
實施思科IP路由考試大綱
實施思科IP路由(ROUTE642-902)是思科認證資深網絡工程師CCNP®、思科認證資深互聯網工程師CCIP®和思科認證資深設計工程師CCDP®認證的資格考試。下面是該科考試的大綱:通過ROUTE642-902考試表示具備重要且必要的知識和技能,能夠在部署可擴展且安全的...
-
思科交換機配置及電腦開機自檢
思科認證考試已經在緊張的備考中了,下面yjbys小編為大家提供的是思科認證的複習資料,希望對大家有所幫助!(一)交換機的配置一直以來是非常神祕的,不僅對於一般用户,對於絕大多數網管人員來説也是如此,同時也是作為網管水平高低衡量的一個重要而又基本的標誌。這主要...
-
關於思科認證資料
思科認證是由網絡領域著名的廠商Cisco公司推出的,是互聯網領域的國際權威認證。下面是小編整理的關於思科認證資料,希望大家認真閲讀!思科認證資料:通過CCIE的故事——光芒後的汗水於梅貞是思科的員工,她從一名普通的前台成長為懷揣CCIE思科認證的思科網...