Creating a Sub-VLAN
Context
In VLAN aggregation, a sub-VLAN can contain only physical interfaces (it cannot contain VLANIF interfaces). All the interfaces in a sub-VLAN use the same IP address of the VLANIF interface associated with the super-VLAN. VLAN aggregation reduces the number of subnet IDs, subnet default gateway addresses, and directed broadcast IP addresses needed on the network segment and ensures that IP addresses are assigned efficiently. VLAN aggregation allows each sub-VLAN to function as a broadcast domain to implement broadcast isolation and saves IP address resources.
Procedure
- Run system-view
The system view is displayed.
- Run vlan vlan-id
A sub-VLAN is created and the sub-VLAN view is displayed.
If a device is configured with multiple VLANs, it is recommended that you configure a name for each VLAN.
To do so, run the name vlan-name command in the VLAN view. After a VLAN name is configured, run the vlan vlan-name vlan-name command in the system view to enter the corresponding VLAN view.
- Run quit
Return to the system view.
- Configure the link type of the interface.
- Configure the link type of the interface as access.
Run interface interface-type interface-number
The interface view is displayed.
Run port link-type access
The link type of the interface is set to access.
- Run port default vlan vlan-id
The interface is added to the sub-VLAN.
- Run quit
Return to the system view.
- Configure the link type of the interface as trunk.
Run interface interface-type interface-number
The interface view is displayed.
Run port link-type trunk
The link type of the interface is set to trunk.
- Run port trunk allow-pass vlanvlan-id
The interface is added to the sub-VLAN.
- Run quit
Return to the system view.
- Configure the link type of the interface as hybrid.
Run interface interface-type interface-number
The interface view is displayed.
Run port link-type hybrid
The link type of the interface is set to hybrid.
- Run port hybrid tagged vlanvlan-id
Or run port hybrid untagged vlanvlan-id
The interface is added to the sub-VLAN.
- Run quit
Return to the system view.
- Configure the link type of the interface as access.
- Run commit
The configuration is committed.