OcNOS-SP : Layer 2 Guide : Layer 2 Command Reference : Layer 2 Subinterface Commands : rewrite
rewrite
Use this command to manipulate the VLAN tags in the incoming packet. Supported operations are PUSH, DOUBLE PUSH, POP, DOUBLE POP and TRANSLATE on the VLAN tag with any of this ethertype - 8100/ 88a8/ 9100/ 9200.
Use the no form of this command to unconfigure rewrite.
Command Syntax
rewrite ((pop| push | translate (1-to-1|1-to-2|2-to-1|2-to-2) (TPID_VALUE) (VID_RANGE))
rewrite push (TPID_VALUE) (VID_RANGE) inner-dot1q (VID_RANGE)
rewrite pop-2tag
no rewrite
Parameters
pop
Pop the outer VID
push
Push the outer VID
translate
Translate the outer VID
1-to-1
Translates the outermost tag to another tag
1-to-2
Translates the outermost tag to two tags (is translate & push)
2-to-1
Translates the outermost two tags to another tag
2-to-2
Translates the outermost two tags to two other tags
TPID_VALUE
Set service TPID value as 0x8100/0x88a8/0x9100/0x9200
VID_RANGE
<2-4094>
inner-dot1q
Inner-VLAN for double-tagged
pop-2tag
Pop both the outer VID and inner VID
Command Mode
Interface mode
Applicability
This command was introduced in OcNOS version 3.0.
Example
(config)#interface xe1.1 switchport
(config-if)#rewrite pop
(config-if)#exit
 
(config)#interface xe1.2 switchport
(config-if)#rewrite push 9100 3
(config-if)#exit
 
(config)#interface xe1.10 switchport
(config-if)#rewrite translate 9200 4
(config-if)#exit
 
(config)#interface xe1.10 switchport
(config-if)#rewrite push 0x8100 200 inner-dot1q 300
(config-if)#exit
 
(config)#interface xe1.1 switchport
(config-if)#rewrite pop-2tag
(config-if)#exit
(config)#interface xe1.1 switchport
(config-if)#no rewrite
(config-if)#ex
 
Last modified date: 07/06/2023