转自:微点阅读 https://www.weidianyuedu.com/content/2917490616011.html
1、创建vlan(进入特权模式即可配置)
(GSM5212P) #vlan database ——进入vlan配置模式。
(GSM5212P) (Vlan)#vlan 102,103,104 ——创建相应vlan。
2、交换机命名(进入特权模式即可配置)
(GSM5212P) #set prompt name ——更改交换机命名。
3、接口配置(先进入配置模式)
(1)上联口配置(相当于trunk)
(GSM5212P) #configure terminal——进入配置模式
(GSM5212P) (Config)#interface 0/1——进入接口模式
(GSM5212P) (Interface 0/1)#vlan participation include vlanID——添加特定的vlan
(GSM5212P) (Interface 0/1)#vlan tagging vlanID ——允许通过的vlan
(2)下联口配置(相当于Access口)
(GSM5212P) #configure terminal ——进入配置模式
GSM5212P) (Config)#interface 0/1——进入接口模式
(GSM5212P) (Interface 0/1)#vlan participation include vlanID——添加特定的vlan
(GSM5212P) (Interface 0/1)#vlan pvid vlanID ——配置端口的特定vlan
4、交换机管理地址配置(进入特权模式即可)
(GSM5212P) #network protocol none
(GSM5212P) #network parms 192.168.1.2 255.255.255.0 192.168.1.1——添加管理地址
5、配置用户名和密码(进入配置模式)
(GSM5212P) #configure t ——进入配置模式
(GSM5212P) (Config)#passwords min-length ——设置密码的最小长度,取值在0-64之间
(GSM5212P(Config)#username admin password admin level 15 encrypted——配置登录的用户名和密码
(GSM5212P) (Config)#aaa authentication enable "enableList" none——创建认证列表
5、开启设备登录管理(进入配置模式)
(GSM5212P) #configure terminal——进入配置模式
(GSM5212P) (Config)#line console——开启console口登录管理
(GSM5212P) (Config-line)#exit——退出
(GSM5212P) (Config)#line telnet——开启telnet远程管理
(GSM5212P) (Config-telnet)#exit——退出
(GSM5212P) (Config)#line ssh——开启ssh远程管理
(GSM5212P) (Config-ssh)#exit——退出
6、配置生成树(进入配置模式)
(GSM5212P) #configure terminal——进入配置模式
(GSM5212P) (Config)#spanning-tree configuration name llll——配置生成树名称
GSM5212P) (Config)#exit
GSM5212P) #save——保存配置