Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Configure Q-in-Q Tunneling to Receive Both Tagged and Untagged Traffic

    Q-in-Q tunneling enables service providers to create a Layer 2 Ethernet connection between two customer sites. Service providers can use Q-in-Q tunneling to isolate customer traffic within a single site or to enable customer traffic flows across geographic locations.

    You configure Q-in-Q tunneling on a Gigabit Ethernet interface by configuring an input and output VLAN map. Additionally, you explicitly configure the input VLAN map with the push function on customer facing interfaces in a bridge domain.

    This example shows how to configure Q-in-Q tunneling to receive both tagged and untagged traffic for a VLAN. Figure 1 shows the topology used in this example.

    Figure 1: Q-in-Q Tunneling for Tagged and Untagged VLAN

    Q-in-Q Tunneling for Tagged and
Untagged VLAN

    In this example:

    • Any type of frames (tagged or untagged) is accepted from the Client devices (ce1 and ce2).

    • VLAN-ID 3410 was pushed and sent to the remote device (another vendor’s device).

    • Traffic was returned from the remote device with the returning traffic containing VLAN-ID 3410.

    • The outer VLAN-ID 3410 was popped and the VLAN-ID was re-sent back to the clients.

    Note: Junos OS supports the IEEE 802.1ad standard for implementing Q-in-Q tunneling. For this example, protocol-id 0x88a8 was used, however, you can also use the standard protocol-id 0x8100.

    On the ACX Series router, configure and apply the following information on Client 1 (ce1):

    1. Configure the ge-0/0/0 interface.
      [edit interfaces ge-0/0/0]
      user@CE1# set flexible-vlan-tagging
      user@CE1# set native-vlan-id 123
      user@CE1# set encapsulation flexible-ethernet-services
      user@CE1# set gigether-options ethernet-switch-profile tag-protocol-id 0x88a8
      user@CE1# set gigether-options ethernet-switch-profile tag-protocol-id 0x8100
      user@CE1# set gigether-options ethernet-switch-profile tag-protocol-id 0x9100
      user@CE1# set unit 0 encapsulation vlan-bridge
      user@CE1# set unit 0 vlan-id-list 121-122
      user@CE1# set unit 0 input-vlan-map push
      user@CE1# set unit 0 input-vlan-map tag-protocol-id 0x88a8
      user@CE1# set unit 0 input-vlan-map vlan-id 3410
      user@CE1# set unit 0 output-vlan-map pop
    2. Configure the ge-0/1/0 interface.
      [edit interfaces ge-0/1/0]
      user@CE1# set flexible-vlan-tagging
      user@CE1# set media-type copper
      user@CE1# set encapsulation flexible-ethernet-services
      user@CE1# set gigether-options ethernet-switch-profile tag-protocol-id 0x88a8
      user@CE1# set gigether-options ethernet-switch-profile tag-protocol-id 0x8100
      user@CE1# set gigether-options ethernet-switch-profile tag-protocol-id 0x9100
      user@CE1# set unit 3410 encapsulation vlan-bridge
      user@CE1# set unit 3410 vlan-tags outer 0x88a8.3410
    3. Configure the bridge-domain for the interfaces.
      [edit bridge-domains]
      user@CE1# set test interface ge-0/0/0.0
      user@CE1# set test interface ge-0/1/0.3410

    On the MX Series router, configure and apply the following information on Client 2 (ce2):

    1. Configure the ge-0/3/0 interface.
      [edit interfaces ge-0/3/0]
      user@CE2# set flexible-vlan-tagging
      user@CE2# set encapsulation flexible-ethernet-services
      user@CE2# set gigether-options ethernet-switch-profile tag-protocol-id 0x88a8
      user@CE2# set gigether-options ethernet-switch-profile tag-protocol-id 0x8100
      user@CE2# set gigether-options ethernet-switch-profile tag-protocol-id 0x9100
      user@CE2# set unit 3410 encapsulation vlan-bridge
      user@CE2# set unit 3410 vlan-tags outer 0x88a8.3410
    2. Configure the ge-0/3/1 interface.
      [edit interfaces ge-0/3/1]
      user@CE2# set encapsulation ethernet-bridge
      user@CE2# set gigether-options ethernet-switch-profile tag-protocol-id 0x88a8
      user@CE2# set gigether-options ethernet-switch-profile tag-protocol-id 0x8100
      user@CE2# set gigether-options ethernet-switch-profile tag-protocol-id 0x9100
      user@CE2# set unit 0 input-vlan-map push
      user@CE2# set unit 0 input-vlan-map tag-protocol-id 0x88a8
      user@CE2# set unit 0 input-vlan-map vlan-id 3410
      user@CE2# set unit 0 output-vlan-map pop
    3. Configure the bridge-domain for the interfaces.
      [edit bridge-domains]
      user@CE2# set test interface ge-0/3/0.3410
      user@CE2# set test interface ge-0/3/1.0

    As a result, traffic flow is working properly and flows from Client ce1 to Client ce2:

    1. Client ce1 sends traffic to ge-0/0/0 on the ACX Series device with VLAN ID 121.
    2. The ACX Series device adds VLAN tag ID 3410 and sends it to the MX Series device.
    3. The MX Series device then forwards it to ge-0/3/1 and on to Client ce2.

    To verify the results, traffic was sent from Client ce1 to Client ce2. ICMP echo (ping) requests were sent and received correctly:

    For the untagged VLAN (viewed from ce2):

    Frame 1: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
    Ethernet II, Src: 00:00:00_67:d2:95 (00:00:00:67:d2:95), Dst: 00:00:00_67:d2:94 (00:00:00:67:d2:94)
    Internet Protocol Version 4, Src: 121.1.1.2, Dst: 121.1.1.1
    Internet Control Message Protocol
         Type: 8 (Echo (ping) request)
         Code: 0
         Checksum: 0xafae [correct]
         Identifier (BE): (0x0000)
         Identifier (LE): (0x0000)
         Sequence number (BE): 0 (0x0000)
         Sequence number (LE): 0 (0x0000)
         [Response frame: 2]
         Data (18 bytes)
    Frame 1: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
    Ethernet II, Src: 00:00:00_67:d2:95 (00:00:00:67:d2:95), Dst: 00:00:00_67:d2:94 (00:00:00:67:d2:94)
    Internet Protocol Version 4, Src: 121.1.1.2, Dst: 121.1.1.1
    Internet Control Message Protocol
         Type: 8 (Echo (ping) request)
         Code: 0
         Checksum: 0xafae [correct]
         Identifier (BE): (0x0000)
         Identifier (LE): (0x0000)
         Sequence number (BE): 0 (0x0000)
         Sequence number (LE): 0 (0x0000)
         [Response frame: 2]
         Data (18 bytes)
    

    For the tagged VLAN (viewed from ce2):

    Frame 1: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface 0
    Ethernet II, Src: 00:00:00_67:d2:95 (00:00:00:67:d2:95), Dst: 00:00:00_67:d2:94 (00:00:00:67:d2:94)
    802.1Q Virtual LAN, PRI: 0, CFI: 0, ID: 121
    Internet Protocol Version 4, Src: 121.1.1.2, Dst: 121.1.1.1
    Internet Control Message Protocol
    

    Note: The tagged VLAN ping results show 802.1Q VLAN with an ID of 121.

    Modified: 2018-05-17