Junos Basics – 802.1Q Trunks

By | July 25, 2013

In my previous Junos Basics post I covered creating RVI’s to enable routing between different VLAN’s. In this post I’ll cover configuring an uplink port on an EX2200-C switch to trunk the VLAN’s out to an access layer switch – in this case a Cisco 2960S. This will also allow us to compare the trunk config in Junos Vs Cisco IOS.

Juniper uses the IEEE 802.1Q standard for VLAN trunking, whereas Cisco has it’s own proprietary trunking protocol ISL (Inter Switch Link) as an option on some of it’s switch models. The 2960S range of switches can use only 802.1Q which means both ends of our trunk will talk the same language by default and play together nicely!

Firstly, to configure the port on the Juniper switch as a trunk:

set interfaces ge-0/1/0 unit 0 family ethernet-switching port-mode trunk

This sets the port as a trunk, but it is still not actively trunking for any VLAN’s at this point. We need to specify which VLAN’s should be trunked on the interface:

set interfaces ge-0/1/0 unit 0 family ethernet-switching vlan members [SALES IT]

Moving onto the Cisco side of the trunk, the configuration is equally as simple:

interface GigabitEthernet1/0/47
 switchport trunk allowed vlan 100,200
 switchport mode trunk

The main difference between the two platforms is that as soon as you set the Cisco switch port mode to Trunk, it starts to trunk for ALL VLAN’s, until you tell it which VLAN’s are allowed to be trunked on it. With Juniper it’s almost the reverse in that the port does not trunk for any VLAN’s until you explicitly configure it to do so.

Now both sides of the trunk are configured and connected, we can verify our Juniper config with a couple of show commands:

rich@EX2200C> show interfaces ge-0/1/0.0
  Logical interface ge-0/1/0.0 (Index 79) (SNMP ifIndex 529)
    Flags: SNMP-Traps 0x40004000 Encapsulation: ENET2
    Bandwidth: 0
    Input packets : 0
    Output packets: 4600
    Protocol eth-switch
      Flags: Trunk-Mode
rich@EX2200C> show ethernet-switching interfaces
Interface    State  VLAN members        Tag   Tagging  Blocking
ge-0/0/0.0   down   default                   untagged blocked by STP
ge-0/0/1.0   down   default                   untagged blocked by STP
ge-0/0/2.0   down   default                   untagged blocked by STP
ge-0/0/3.0   down   default                   untagged blocked by STP
ge-0/0/4.0   down   default                   untagged blocked by STP
ge-0/0/5.0   down   default                   untagged blocked by STP
ge-0/0/6.0   down   default                   untagged blocked by STP
ge-0/0/7.0   down   default                   untagged blocked by STP
ge-0/0/8.0   down   default                   untagged blocked by STP
ge-0/0/9.0   down   default                   untagged blocked by STP
ge-0/0/10.0  down   default                   untagged blocked by STP
ge-0/0/11.0  down   default                   untagged blocked by STP
ge-0/1/0.0   up     IT                  200   tagged   unblocked
                    SALES               100   tagged   unblocked
ge-0/1/1.0   down   default                   untagged blocked by STP

Note the VLAN Tags in the above output indicating that both the SALES and IT VLAN’s are being trunked over interface ge-0/1/0.0.

I hope this has been a useful explanation.  In my next Junos Basics post I’ll cover aggregated Ethernet interfaces using the Link Aggregation Control Protocol (LACP).

Thanks for reading.

Rich

Follow Rich on Twitter

2 thoughts on “Junos Basics – 802.1Q Trunks

  1. Joao

    Hi Rich,

    Thank you for your post. Unfortunately, I am not able to pass traffic on the trunk ports other than the native VLAN (and only if the native vlan is the default 1). The spanning tree protocol on the Cisco Catalyst (2960) is rapid-pvst and on the EX2200 is the default RSTP. I already tried many combinations, including following your above instructions to the letter. I have ports on both sides trunking vlans 1,10 and 23.

    Do you have any suggestion on what might be happening? I would appreciate your help.

    BR,

    Reply
  2. Pingback: Junos Basics – Aggregated Ethernet Interfaces (LACP) | Thuong Nguyen Site

Leave a Reply to Joao Cancel reply

Your email address will not be published. Required fields are marked *