国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)管 > 路由交換 > 正文

cisco思科交換機配置篇

2020-07-05 18:03:40
字體:
供稿:網(wǎng)友

 

上一篇給大家講到了cisco交換機的基本操作命令,趁端午節(jié)放假前,把cisco交換機的簡單配置分享一下并預(yù)祝一下各位“端午節(jié)快樂”!Ok,要進行交換機的配置,首先就得進入交換機的全局配置模式,在成功連接交換機并且登陸成功進入特權(quán)模式下

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 terEnter configuration commands, one per line.  End with CNTL/Z.switch(config)#switch(config)#int fa0/3switch(config-if)#switch(config-if)#descswitch(config-if)#description updateDescswitch(config-if)#switch(config-if)#exitswitch(config)#exitswitch#switch#show interswitch#show interfaces statuswitch#show interfaces status Port      Name               Status       Vlan       Duplex  Speed TypeFa0/1                        connected    1          a-full  a-100 10/100BaseTXFa0/2     h3c2.250           connected    trunk      a-full  a-100 10/100BaseTXFa0/3     updateDesc         notconnect   1            auto   auto 10/100BaseTXFa0/4                        connected    1          a-full  a-100 10/100BaseTXFa0/5     h3c-2.200          connected    1          a-full  a-100 10/100BaseTXFa0/6                        notconnect   1            auto   auto 10/100BaseTX

修改描述的關(guān)鍵命令在于,在配置模式下,進入到要修改的端口下,然后使用description + “內(nèi)容”!效果應(yīng)該很直觀了吧,接下來就是修改端口的所在Vlan了

 

3、修改端口Vlan

switch#switch#switch#conf tEnter configuration commands, one per line.  End with CNTL/Z.switch(config)#switch(config)#int fa0/3switch(config-if)#switch(config-if)#sw acc vl 2switch(config-if)#switch(config-if)#exitswitch(config)#switch(config)#exitswitch#switch#show inter statuPort      Name               Status       Vlan       Duplex  Speed TypeFa0/1                        connected    1          a-full  a-100 10/100BaseTXFa0/2     h3c2.250           connected    trunk      a-full  a-100 10/100BaseTXFa0/3     updateDesc         notconnect   2            auto   auto 10/100BaseTXFa0/4                        connected    1          a-full  a-100 10/100BaseTXFa0/5     h3c-2.200          connected    1          a-full  a-100 10/100BaseTXFa0/6                        notconnect   1            auto   auto 10/100BaseTX

邏輯和修改端口描述是一樣的,對于配置來說,肯定是到了能有配置權(quán)限的地方和要配置的對象,這里修改端口Vlan的關(guān)鍵命令為:sw acc vl + vlantag,命令很明顯被簡寫了,但是不影響執(zhí)行,命令的全寫為:switchport access vlan + vlantag

 

還有一些對端口的簡單操作,譬如修改端口的模式,

4、修改端口模式

switch(config-if)#switchport trunk encap dot1q ----------------設(shè)置vlan 中繼的封裝協(xié)議注:dot1q就是 IEEE 802.1Q協(xié)議,是vlan的一種封裝方式,是公有協(xié)議。還有一種trunk協(xié)議,是ISL,也是vlan的一種封裝方式,不過這是Cisco思科私有協(xié)議,其他廠商不能用。switch(config-if)#switchport mode trunk ------------------------設(shè)置端口類型為trunkswitch(config-if)#switchport trunk allowed vlan 1,2 ---------設(shè)置允許的vlan,默認(rèn)不用配置,為所有vlanswitch(config-if)#switchport trun native vlan 999 ---------------設(shè)置trunk口的native vlan

5、端口狀態(tài)

switch(config)#switch(config)#int fa0/3switch(config-if)#switch(config-if)#switch(config-if)#sw acc vl 1switch(config-if)#switch(config-if)#switch(config-if)#shutd   switch(config-if)#shutdown switch(config-if)#    switch(config-if)#exitswitch(config)#switch(config)#exitswitch#switch#show inter statuPort      Name               Status       Vlan       Duplex  Speed TypeFa0/1                        connected    1          a-full  a-100 10/100BaseTXFa0/2     h3c2.250           connected    trunk      a-full  a-100 10/100BaseTXFa0/3     updateDesc         disabled     1            auto   auto 10/100BaseTXFa0/4                        connected    1          a-full  a-100 10/100BaseTX

上面的一系列為切換Vlan,并且shutdown端口,這時候大家可能看到了交換機3號端口的狀態(tài)已變成disable了,如果我們要啟用端口只需

switch#conf tEnter configuration commands, one per line.  End with CNTL/Z.switch(config)#switch(config)#int fa0/3switch(config-if)#switch(config-if)#no shutswitch(config-if)#no shutdown switch(config-if)#switch(config-if)#exitswitch(config)#switch(config)#exitswitch#switch#show inter statuPort      Name               Status       Vlan       Duplex  Speed TypeFa0/1                        connected    1          a-full  a-100 10/100BaseTXFa0/2     h3c2.250           connected    trunk      a-full  a-100 10/100BaseTXFa0/3     updateDesc         notconnect   1            auto   auto 10/100BaseTXFa0/4                        connected    1          a-full  a-100 10/100BaseTX

今天就到這里了,有時間再來和大家分享一下在工作上需要的并且對自己很有用的東西和知識!敬請期待下一篇——對交換機登錄的一些設(shè)置http://sfgsdf

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 遂平县| 疏勒县| 盐池县| 奇台县| 富蕴县| 介休市| 焦作市| 时尚| 台南市| 那曲县| 红安县| 大同县| 河北区| 泽普县| 临城县| 金门县| 东乡族自治县| 望城县| 特克斯县| 保山市| 应用必备| 文水县| 澳门| 南华县| 霍山县| 青田县| 金华市| 通州区| 兴山县| 左贡县| 乾安县| 南郑县| 天峨县| 抚远县| 南充市| 宁阳县| 盐池县| 永修县| 马龙县| 灵寿县| 读书|