The remark vlan-id command configures an action of re-marking the VLAN tag in VLAN packets in a traffic behavior.
The undo remark vlan-id command deletes the configuration.
By default, an action of re-marking the VLAN tag in VLAN packets is not configured in a traffic behavior.
Parameter |
Description |
Value |
---|---|---|
vlan-id |
Specifies the VLAN tag of packets in a VLAN. |
The value is an integer that ranges from 1 to 4094. |
Usage Scenario
You can use the remark vlan-id command to re-mark the VLAN tag in VLAN packets in a traffic behavior so that the downstream device can identify packets and provide differentiated services.
The remark vlan-id command re-marks only the outer VLAN tag of double-tagged packets.
Follow-up Procedure
Run the traffic policy command to create a traffic policy and run the classifier behavior command in the traffic policy view to bind the traffic classifier to the traffic behavior containing VLAN tag re-marking.
Precautions
If the remark vlan-id command is used on an inbound interface, on the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S, add the outbound interfaces to the replaced VLAN and the original VLAN. Otherwise, packets cannot be forwarded correctly. On other models, add the inbound and outbound interfaces to the replaced VLAN and the original VLAN. Otherwise, packets cannot be forwarded correctly.
If a traffic policy containing remark vlan-id is applied to the outbound direction on an interface, the VLAN that the interface belongs to must work in tag mode.
After the remark vlan-id, remark 8021p, remark cvlan-id command is used, the system modifies the VLAN tag of packets based on the device configuration. The behavior configured through these commands is called VLAN-based action.
To perform VLAN-based actions and non-VLAN-based actions in an upstream traffic policy, you need to configure VLAN-based actions and non-VLAN-based actions in different traffic behaviors.
If you run the remark vlan-id command in the same traffic behavior view multiple times, only the latest configuration takes effect.