Cisco2950   2960 交換機基本配置命令

                                       Cisco2950交換機基本配置命令



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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章