Настройка vlan маршрутизатор huawei

Configuring IP Subnet-based VLAN Assignment

Both IP subnet-based and protocol-based VLAN assignment are called network layer-based VLAN assignment, which reduces manual VLAN configuration workload and allows users to easily join a VLAN, transfer from one VLAN to another, and exit from a VLAN. IP subnet-based VLAN assignment applies to scenarios where there are high requirements for mobility and simplified management and low requirements for security, for example, scenario where a PC configured with multiple IP addresses needs to access servers on different network segments and scenario where the switch adds PCs to other VLANs when the PCs’ IP addresses change. The switch that has IP subnet-based VLAN assignment enabled processes only untagged frames, and treats tagged frames in the same manner as interface-based VLAN assignment. After receiving untagged frames from an interface, the switch determines the VLANs to which the frames belong according to source IP addresses or network segments and transmits the frames in specified VLANs.

Procedure

  1. Run system-view The system view is displayed.
  2. Run vlanvlan-id A VLAN is created and the VLAN view is displayed. If the specified VLAN has been created, the VLAN view is directly displayed. The VLAN ID ranges from 1 to 4094 . If VLANs need to be created in a batch, run the vlan batch< vlan-id1 [ tovlan-id2 ] > & command to create VLANs in a batch, and then run the vlanvlan-id command to enter the view of a specified VLAN.

If a device is configured with multiple VLANs, configuring names for these VLANs is recommended: Run the name vlan-name command in the VLAN view. After a VLAN name is configured, you can run the vlan vlan-name vlan-name command in the system view to enter the corresponding VLAN view. The vlan configuration command completes the VLAN configuration when the VLAN is not created.

  • ip-subnet-index specifies the index of an IP subnet. The index of an IP subnet can be configured manually or automatically generated by the system according to the sequence in which IP subnets were associated with a VLAN.
  • ip-address specifies the source IP address or network segment associated with a VLAN. The value is in dotted decimal notation.
  • priority specifies the 802.1p priority of a VLAN associated with an IP address or a network segment. The value ranges from 0 to 7. A larger value indicates a higher priority. The default value is 0. After the 802.1p priority of a VLAN associated with an IP address or a network segment is specified, the switch first forwards high-priority frames in the case of congestion.
  1. Run interfaceinterface-typeinterface-number The view of the Ethernet interface to be added to the VLAN is displayed.
  2. Run port link-typehybrid The interface is configured as the hybrid interface. On access and trunk interfaces, IP subnet-based VLAN assignment can be used only when the IP subnet-based VLAN is the same as the PVID. It is recommended that IP subnet-based VLAN assignment be configured on hybrid interfaces.
  3. port hybrid untagged vlan< < vlan-id1 [ tovlan-id2 ] > & | all > The hybrid interface is configured to allow the IP subnet-based VLAN.
Читайте также:  Маршрутизатор d link dir 878

Only the S1720X, S1720X-E, S5720EI, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S5720SI, S5720S-SI, S6720EI, and S6720S-EI support the vlan precedence command. S1720X, S1720X-E, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI and S5720S-SI supports the vlan precedence command only in the system view. Other switches support the vlan precedence command only in the interface view. On the S5720EI, S6720EI, and S6720S-EI , if both the subnet VLAN and MAC VLAN with a mask are configured, the MAC VLAN with a mask is first matched regardless of whether the vlan precedence command is used.

Verifying the Configuration

  • Run the display ip-subnet-vlan vlan< all | vlan-id1 [ tovlan-id2 ] > command in any view to check information about IP subnets associated with VLANs.
  • Run the display vlan command in any view to check information about VLANs.

Источник

Оцените статью
Adblock
detector