交換器配置基本命令

來源:互聯網
上載者:User
交換器基本狀態:hostname> ;使用者模式hostname# ;特權模式hostname(config)# ;全域配置模式hostname(config-if)# ;介面狀態交換器口令設定:switch>enable ;進入特權模式switch#config terminal ;進入全域配置模式switch(config)#hostname ;設定交換器的主機名稱switch(config)#enable secret xxx ;設定特權加密口令switch(config)#enable password xxa ;設定特權非密口令switch(config)#line console 0 ;進入控制台口switch(config-line)#line vty 0 4 ;進入虛擬終端switch(config-line)#login ;允許登入switch(config-line)#password xx ;設定登入口令xxswitch#exit ;返回命令交換器VLAN設定:switch#vlan database ;進入VLAN設定switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;刪vlan 2switch(config)#int f0/1 ;進入連接埠1switch(config-if)#switchport access vlan 2 ;當前連接埠加入vlan 2switch(config-if)#switchport mode trunk ;設定為幹線switch(config-if)#switchport trunk allowed vlan 1,2 ;設定允許的vlanswitch(config-if)#switchport trunk encap dot1q ;設定vlan 中繼switch(config)#vtp domain ;設定發vtp網域名稱switch(config)#vtp password ;設定發vtp密碼switch(config)#vtp mode server ;設定發vtp模式switch(config)#vtp mode client ;設定發vtp模式交換器設定IP地址:switch(config)#interface vlan 1 ;進入vlan 1switch(config-if)#ip address ;設定IP地址switch(config)#ip default-gateway ;設定預設閘道switch#dir Flash: ;查看快閃記憶體交換器顯示命令:switch#write ;儲存配置資訊switch#show vtp ;查看vtp配置資訊switch#show run ;查看當前配置資訊switch#show vlan ;查看vlan配置資訊switch#show interface ;查看連接埠資訊switch#show int f0/0 ;查看指定連接埠資訊儲存命令:switch(config)#copy running-config startup-config

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.