Cisco交換機常用配置命令

2021-04-24 10:24:20 字數 1646 閱讀 8910

1、配置ip位址

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

b、進入vlan 1介面模式:switch(config)#inte***ce vlan 1

如果當前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)#inte***ce 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

CISCO交換機常用配置命令

switch 使用者模式 1 進入特權模式 enable switch enable switch 2 進入全域性配置模式 configure terminal switch enable switch c onfigure terminal switch conf 3 交換機命名 hostname...

cisco交換機配置

cisco交換機配置的幾個常用命令 switch enable 進入特權模式 switch conf t 進入配置模式 switch config int fa0 0 進入fa0 0介面 switch config if swichport mode trunk trunk介面配置 switch c...

cisco交換機命令

交換機口令設定 switch enable 進入特權模式 switch config terminal 進入全域性配置模式 switch config hostname 設定交換機的主機名 switch config enable secret 設定特權加密口令 switch config enab...