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