GRE bridge and 802.1q


is there a way to encapsulate 802.1q tag in a Ethernet Transparent Bridge GRE tunnel ?


Yes, you should be able to do this using the gre-bridge encapsulation type on a tunnel. Bridge the tunnel to an ethernet interface (like an access port for a customer) - then the customer device can send tagged packets through.


Thanks for these answer.
For doing what i need, i will passe the shell commands :

sudo ip link add link tun0 name tun0.2422 type vlan id 2422 sudo brctl addif br2422 tun0.2422 sudo ip link set tun0.2422 up

These commands are not included in native VyOS CLI, so I create them in the “configure CLI” part :
Surely very incomplete et aproximate job…

[code]root@VRT-APHW:/opt/vyatta/share/vyatta-cfg/templates# cat interfaces/tunnel/node.tag/vif/node.def
priority: 319
type: u32
help: Virtual Local Area Network (VLAN) ID in gre-bridge tunnel
syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4094; “VLAN ID must be between 0 and 4094”
val_help: u32:0-4094; VLAN ID

create: if ! ip link add link $VAR(…/@) name “$VAR(…/@).$VAR(@)” type vlan id $VAR(@)
then echo “Error creating VLAN device $VAR(…/@).$VAR(@)”
exit 1
# if parent is up, then bring VLAN up
if [ $(( $(cat /sys/class/net/(…/@)/flags) & 1 )) -eq 1 ]
then ip link set “$VAR(…/@).$VAR(@)” up
/opt/vyatta/sbin/vyatta-link-detect “$VAR(…/@).$VAR(@)” on

delete: [ -d /sys/class/net/$VAR(…/@).$VAR(@) ] || exit 0
ip link delete dev “$VAR(…/@).$VAR(@)” type vlan id $VAR(@)


And sorry for my bad english written …


I don’t quite understand what you are trying to accomplish. Are you running a GRE tunnel between two VyOS devices? Can you sketch a network diagram?