68
Web login example
HTTP login example
Network requirements
As shown in
, configure the device to allow the PC to log in over the IP network.
Figure 27
Network diagram
Configuration procedure
1.
Configure the device
# Create VLAN 999, and add interface GigabitEthernet 1/0/1 on the device that connects to the PC to
VLAN 999.
<Sysname> system-view
[Sysname] vlan 999
[Sysname-vlan999] port GigabitEthernet 1/0/1
[Sysname-vlan999] quit
# Configure the IP address of VLAN 999 as 192.168.0.58 and the subnet mask as 255.255.255.0.
[Sysname] interface vlan-interface 999
[Sysname-VLAN-interface999] ip address 192.168.0.58 255.255.255.0
[Sysname-VLAN-interface999] quit
# Create a local user named
admin
, and set the password to
admin
for the user. Specify the Telnet
service type for the local user, and set the command level to 3 for this user.
[Sysname] local-user admin
[Sysname-luser-admin] service-type web
[Sysname-luser-admin] authorization-attribute level 3
[Sysname-luser-admin] password simple admin
2.
Verify the configuration
# On the PC, run the web browser. Enter the IP address of the device in the address bar. The web login
page appears, as shown in
.