Cisco交換器常用配置命令

來源:互聯網
上載者:User


1、配置IP地址

    交換器要能夠被網管,必須給它標識一個管理IP地址,預設情況下CISCO交換器的VLAN 1為管理VLAN,為該VLAN配上IP 位址,交換器就可以被網管了。命令如下:

    a、進入全域模式: Switch#configure terminal

    b、進入VLAN 1介面模式:Switch(config)#interface vlan 1

    c、組態管理IP地址:Switch(config-if) # ip address [A.B.C.D] [mask]

    如果當前VLAN 不是管理VLAN ,只需要將上面第b處命令的vlan的號碼換成管理VLAN的號碼即可。

2、開啟SNMP協議

    a、進入全域模式: Switch#configure terminal

    b、配置唯讀Community,產品預設的唯讀Community名為public

         Switch(config)#snmp-server community public ro

    c、配置可寫的Community,產品預設的可寫Community名為private

         Switch(config)#snmp-server community private rw

3、更改SNMP的Community密碼

    a、將裝置分組,並使能支援的各種SNMP版本

         Switch(config)#snmp-server group qycx123 v1

        Switch(config)#snmp-server group qycx 123 v2c

         Switch(config)#snmp-server group qycx123 v3 noauth

    b、分別配置唯讀和可寫community 如:

         Switch(config)#snmp-server community qycx123 ro

         Switch(config)#snmp-server community qycx123 rw

4、儲存交換器配置

         Switch#copy run start

常用命令

1、設定交換器密碼

    a、更改遠程TELNNET密碼

         Switch#configure terminal

         Switch(config)#line vty 0 4

         Switch(config-line)#password qycx123

         Switch(config-line)#login

         Switch(config-line)#exit

     b、更改進入全域配置模式時的密碼

         Switch#configure terminal

         Switch(config)#enable secret qycx123

2、建立並劃分VLAN

     a、建立VLAN

         Switch#vlan database

         Switch(vlan)#vlan 99 name office

         (建立vlan 99 並命名為office)

      b、將連接埠劃分至vlan

         Switch(config)#interface fastEthernet 0/8

         Switch(config-if)#switchport mode access

         Switch(config-if)#switchport access vlan 99

         (將8號快速以太口劃分至vlan 99)

3、常用調試命令

       a、顯示所有配置命令:Switch#show run

       b、顯示所有介面狀態:Switch#show ip int brief

       c、顯示所有VLAN的資訊:Switch#show vlan brief

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.