1. 网关配置(web管理界面)
默认S5048PV2_EI交换机
第一步:若是首次配置,通过Console口配置以太网交换机管理VLAN的IP地址,默认的网关是192.168.0.253。
system-view
[H3C] interface Vlan-interface 1(进入管理VLAN)
[H3C-Vlan-interface1] undo ip address(取消管理VLAN原有的IP地址)
[H3C-Vlan-interface1] ip address 172.16.0.1 255.255.255.0(配置以太网交换机管理VLAN的IP地址为10.153.17.82)
第二步:用户通过Console口,在以太网交换机上配置欲登录的WEB网管用户名和认证口令。
通过Console口,添加以太网交换机的Web用户,用户级别设为3(管理级用户)
(默认的用户名密码都是admin)
[H3C] local-user admin(设置用户名为admin)
[H3C-luser-admin] service-type telnet level 3(设置级别3)
[H3C-luser-admin] password simple 123456(设置密码123456)
2. 开启SSH服务和创建登录账号密码
进入系统视图,并开启ssh服务,默认开启。
<H3C> system-view
[H3C] SSH server enable# 创建本地账号abc,密码为123456,权限级别为network-admin。//如果现场同一个本地用户既需要通过ssh登录,又需要console登录,则服务器类型需要添加 terminal[H3C] local-user abc
[H3C-luser-abc] password simple 123456[H3C-luser-abc] service-type ssh terminal
[H3C-luser-abc] authorization-attribute user-role network-admin
[H3C-luser-abc] quit
# 配置VTY接口认证模式为scheme模式(用户名+密码认证)。用于ssh登录[H3C] line vty 04[H3C-ui-vty0-4] authentication-mode scheme //另两种认证模式为None(无密码)和Password(单密码)
[H3C-ui-vty0-4] quit
3. 开启telnet服务和创建登录账号密码
# 进入系统视图,并开启Telnet服务,默认开启。<H3C> system-view
[H3C]telnet server enable# 创建本地账号abc,密码为123456,权限级别为network-admin。//如果现场同一个本地用户既需要通过ssh登录,又需要console登录,则服务器类型需要添加 terminal[H3C] local-user abc
[H3C-luser-abc] password simple 123456[H3C-luser-abc] service-type telnet terminal
[H3C-luser-abc] authorization-attribute user-role network-admin
[H3C-luser-abc] quit
# 配置VTY接口认证模式为scheme模式(用户名+密码认证)。用于ssh登录[H3C] line vty 04[H3C-ui-vty0-4] authentication-mode scheme //另两种认证模式为None(无密码)和Password(单密码)
[H3C-ui-vty0-4] quit
4. 以下是开启WEB的参考命令:
#2、开启HTTP HTTPS功能[H3C]ip http enable[H3C]ip https 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
[H3C-luser-manage-admin]authorization-attribute user-role network-admin
[H3C-luser-manage-admin]quit
5. 配置
新的交换机使用admin/admin登录进去
5.1 基础配置
<H3C>system-view
System View:return to User View with Ctrl+Z
[H3C]sysname openstack-sw01
[openstack-sw01]user-interface aux 0[openstack-sw01-line-aux0]authentication-mode password
[openstack-sw01-line-aux0]set authentication password simple 密码
5.2 配置vlan
<openstack-sw01>system-view
[openstack-sw01-vlan2]vlan 2[openstack-sw01-vlan3]vlan 3[openstack-sw01-vlan3]vlan 4 to 20[openstack-sw01-Vlan-interface2]interface vlan-interface 2[openstack-sw01-Vlan-interface2]ip address 192.168.10.1 24
5.3 加入端口
[openstack-sw01-vlan2]vlan 2[openstack-sw01-vlan2]port GigabitEthernet 1/0/2
[openstack-sw01-vlan2]port GigabitEthernet 1/0/3 toGigabitEthernet 1/0/10
5.4 配置trunk
[openstack-sw01]interface GigabitEthernet 1/0/1
[openstack-sw01-GigabitEthernet1/0/1]port link-type trunk
[openstack-sw01-GigabitEthernet1/0/1]port trunk permit vlan 2[openstack-sw01-GigabitEthernet1/0/1]port trunk permit vlan 3
5.5 查看命令
[openstack-sw01]display current-configuration
[openstack-sw01]display saved-configuration
[openstack-sw01]display interface GigabitEthernet 1/0/1
[openstack-sw01]display vlan 2[openstack-sw01]display version
5.6 删除(原命令前加undo)
[openstack-sw01]undo vlan 2
5.7 保存(不保存的话断电配置会还原)
[openstack-sw01]save
5.8 配置web访问
[H3C]ip https enable[H3C]local-user admin
[H3C-luser-manage-admin]servi
[H3C-luser-manage-admin]service-type telnet
[H3C-luser-manage-admin]password simple ${password}[H3C-luser-manage-admin]exit
[H3C]super password role level-3 simple ${super_password}
版权归原作者 大道志远 所有, 如有侵权,请联系我们删除。