In a huawei switch of model S2720-52TP-EI I want 5 Eth ports in vlan 16 as access, one…
- User
In a huawei switch of model S2720-52TP-EI I want 5 Eth ports in vlan 16 as access, one ethport in vlan 1000 as access and one Gigabiteth port as trunk passing 1 to 4094, please provide cli commands for that
- Assistant
To configure the specified VLANs and ports on the Huawei S2720-52TP-EI, use the following CLI commands. Replace the port numbers (e.g., X/Y) with the correct ones for your switch:
- Enter the system view by typing 'system-view':
system-view- Create VLAN 16 and VLAN 1000:
vlan batch 16 1000- Configure ports X/Y as access ports in VLAN 16 (repeat for each of the five ports you want in VLAN 16, replacing "X/Y" with the appropriate port numbers):
interface Ethernet X/Y port link-type access port default vlan 16- Configure port X/Y as an access port in VLAN 1000 (replace "X/Y" with the correct port number):
interface Ethernet X/Y port link-type access port default vlan 1000- Configure GigabitEthernet port X/Y as a trunk port and allow VLANs 1 to 4094 to pass through (replace "X/Y" with the correct port number):
interface GigabitEthernet X/Y port link-type trunk port trunk allow-pass vlan 1 to 4094 - User
Ethernet0/0/1 18 Access -- Ethernet0/0/10 18 Access -- Ethernet0/0/11 1 Auto 1 to 4094 Ethernet0/0/12 1 Auto 1 to 4094 Ethernet0/0/13 1 Auto 1 to 4094 Ethernet0/0/14 1 Auto 1 to 4094 Ethernet0/0/15 1 Auto 1 to 4094 Ethernet0/0/16 1 Auto 1 to 4094 Ethernet0/0/2 18 Access -- Ethernet0/0/3 18 Access -- Ethernet0/0/4 18 Access -- Ethernet0/0/5 18 Access -- Ethernet0/0/6 18 Access -- Ethernet0/0/7 18 Access -- Ethernet0/0/8 18 Access -- Ethernet0/0/9 18 Access -- GigabitEthernet0/0/1 1 Auto 1 to 4094 GigabitEthernet0/0/10 1 Auto 1 to 4094 GigabitEthernet0/0/11 1 Auto 1 to 4094 GigabitEthernet0/0/12 1 Auto 1 to 4094 GigabitEthernet0/0/2 1 Auto 1 to 4094 GigabitEthernet0/0/3 1 Auto 1 to 4094 GigabitEthernet0/0/4 1 Auto 1 to 4094 GigabitEthernet0/0/5 1 Auto 1 to 4094 GigabitEthernet0/0/6 1 Auto 1 to 4094 GigabitEthernet0/0/7 1 Auto 1 to 4094 GigabitEthernet0/0/8 1 Auto 1 to 4094 GigabitEthernet0/0/9 1 Auto 1 to 4094 Provide configuration for above on huawei switch
- Assistant
Based on the given ports and their respective VLANs and types, here are the CLI commands to apply these configurations to the Huawei S2720-52TP-EI switch:
Enter the system-view mode:
system-viewCreate VLAN 1 and VLAN 18 if they do not already exist.
vlan batch 1 18Configure Ethernet ports in VLAN 18 as access ports:
interface range Ethernet 0/0/1 to Ethernet 0/0/10 port link-type access port default vlan 18Configure remaining Ethernet ports in VLAN 1 with the default Auto mode:
interface range Ethernet 0/0/11 to Ethernet 0/0/16 port link-type autoConfigure GigabitEthernet ports with the default Auto mode and allow VLANs 1 to 4094:
interface range GigabitEthernet 0/0/1 to GigabitEthernet 0/0/12 port link-type auto port trunk allow-pass vlan 1 to 4094Save the configuration to be used at the next system startup:
saveNow, you should have the specified Ethernet ports in VLAN 18 as access, remaining Ethernet ports in VLAN 1 with the default auto mode, and GigabitEthernet ports in auto mode, allowing VLANs 1 to 4094 to pass through.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.