1、给交换机配置IP地址:
<H3C>system
System View: return to User View with Ctrl+Z.
[H3C]vlan 10
[H3C-vlan10]quit
[H3C]int vlan 10
[H3C-Vlan-interface10]ip address 192.168.10.1 255.255.255.0
[H3C-Vlan-interface10]undo shutdown
[H3C-Vlan-interface10]quit
[H3C]int gi 1/0/1
[H3C-GigabitEthe.NET1/0/1]port link-type access
[H3C-GigabitEthernet1/0/1]port access vlan 10
[H3C-GigabitEthernet1/0/1]quit
2、开启HTTP HTTPS功能
[H3C]ip http enable
[H3C]ip https enable
[H3C]telnet server enable
[H3C]ssh server enable
3、创建用户名、密码,并赋予HTTP HTTPS的权限
[H3C]local-user admin
New local user added.
[H3C-luser-manage-admin]password simple admin
[H3C-luser-manage-admin]service-type http https telnet ssh
[H3C-luser-manage-admin]authorization-attribute user-role network-admin
[H3C-luser-manage-admin]quit
[H3C]
若是老版本的交换机,因为软件版本不同,配置方式略有不同:
[H3C]local-user admin
New local user added.
[H3C-luser-admin]password simple admin
[H3C-luser-admin]service-type http
[H3C-luser-admin]service-type https
[H3C-luser-admin]authorization-attribute level 3
[H3C-luser-admin]quit
[H3C]
4、电脑设置IP地址,并能PING通交换机(或者之前在设置vlan虚拟接口ip地址的时候,直接设置成和自己电脑同一ip段也是可以的,只要IP地址不冲突即可,这样就不用手动设置电脑IP地址)
5、打开浏览器,通过http的方式访问交换机
6、打开浏览器,通过https的方式访问交换机