Notes before configuration
This is a practical setup record for H3C access switches used in day-to-day field work. It is mainly intended as a quick reference when preparing a newly installed device before it goes into service. Aside from the basic commands, the examples here reflect a simple on-site configuration workflow rather than a formal engineering guide, so there may still be room for correction.
Frequently used H3C commands
These are the commands used most often during basic switch setup:
system-view— enter system viewsysname xxx— assign the device namexxxdisplay current-configuration— view the current configurationinterface GigabitEthernet1/0/1— enter interface 1/0/1poe enablb— enable PoE on the interfaceport link-type Access|Trunk|Hybrid— set the port modequit— leave the current viewvlan 9— create VLAN 9 and enter its viewundo vlan 9— delete VLAN 9display vlan— display all existing VLANsport access vlan 9— in interface view, assign the current port to VLAN 9port E1/0/2 to E1/0/5— in VLAN view, add the specified ports to the current VLANport trunk permit vlan all— allow all VLANs to passdisplay interface brief— check status information for all portsundo 已配置命令— remove a previously configured command
Example field configuration: access layer switch H3C S1
Below is a straightforward configuration record for an access switch labeled H3C S1.
Set the device name
sysname H3C S1
Create VLAN 9 through VLAN 20
vlan 9 to 20
Configure spanning tree region settings
stp region-configuration
region-name JR100
revision-level 100
active region-configuration
Create link aggregation group 1
Set the aggregation interface as a trunk, allow all VLANs, and mark it as trusted for DHCP snooping.
interface Bridge-Aggregation1
port link-type trunk
port trunk permit vlan all
dhcp snooping trust
Configure the management VLAN interface
VLAN 20 is used for management, with IP address 10.10.20.10/24.
interface Vlan-interface20
ip address 10.10.20.10 255.255.255.0
Configure access port 1
Port 1 is placed into VLAN 17, set as an edge port, and has PoE plus DHCP snooping binding record enabled.
interface GigabitEthernet1/0/1
port access vlan 17
stp edged-port
poe enable
dhcp snooping binding record
Configure trunk port 23
Port 23 is configured as a trunk, allowed to carry all VLANs, added to aggregation group 1, and trusted for DHCP snooping.
interface GigabitEthernet1/0/23
port link-type trunk
port trunk permit vlan all
port link-aggregation group 1
dhcp snooping trust
Set the default static route
ip route-static 0.0.0.0 0 10.10.10.1
Enable SSH
ssh server enable
Configure the console interface
user-interface aux 0
authentication-mode password
set authentication password simple 1999001
user-role level-15
Create a local user for SSH access
This user is granted both network-admin and network-operator roles.
local-user admin2010
password simple admin2010
service-type ssh
authorization-attribute user-role network-admin
authorization-attribute user-role network-operator
Enable DHCP globally
dhcp enable
Apply the same settings to ports 2 through 10 in batch
These interfaces are assigned to VLAN 17, marked as edge ports, and configured with PoE and DHCP snooping binding record.
interface range GigabitEthernet 1/0/2 to GigabitEthernet 1/0/10
port access vlan 17
stp edged-port
poe enable
dhcp snooping binding record
This set of notes works well as a quick deployment checklist for basic H3C access switch initialization in the field.