I will give an example of quickly setting up a range of ports on Huawei S2300 series switches; for example, I will perform the settings on Huawei Quidway S2326TP-EI.
To select multiple ports, run the commands:
port-group 1
group-member Ethernet 0/0/1 to Ethernet 0/0/24
Now you can make settings for this port range, for example:
port link-type access
port default vlan 228
port-isolate enable
loopback-detect enable
loopback-detect action shutdown
loopback-detect recovery-time 255
broadcast-suppression 1
Another example, using Notepad++ we automatically change the vlan number in the commands below and simply copy them all at once and paste them into the device console:
interface Ethernet0/0/1
port default vlan 228
interface Ethernet0/0/2
port default vlan 228
interface Ethernet0/0/3
port default vlan 228
interface Ethernet0/0/4
port default vlan 228
interface Ethernet0/0/5
port default vlan 228
interface Ethernet0/0/6
port default vlan 228
interface Ethernet0/0/7
port default vlan 228
interface Ethernet0/0/8
port default vlan 228
interface Ethernet0/0/9
port default vlan 228
interface Ethernet0/0/10
port default vlan 228
interface Ethernet0/0/11
port default vlan 228
interface Ethernet0/0/12
port default vlan 228
interface Ethernet0/0/13
port default vlan 228
interface Ethernet0/0/14
port default vlan 228
interface Ethernet0/0/15
port default vlan 228
interface Ethernet0/0/16
port default vlan 228
interface Ethernet0/0/17
port default vlan 228
interface Ethernet0/0/18
port default vlan 228
interface Ethernet0/0/19
port default vlan 228
interface Ethernet0/0/20
port default vlan 228
interface Ethernet0/0/21
port default vlan 228
interface Ethernet0/0/22
port default vlan 228
interface Ethernet0/0/23
port default vlan 228
interface Ethernet0/0/24
port default vlan 228
interface GigabitEthernet0/0/2
port default vlan 228
All that remains is to configure the Uplink port, for example:
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 207 228
See also my article:
Configuring Huawei Quidway S2326TP-EI