I am new to Juniper and has a basic doubt about assigning an interface to a VLAN. I have read that JunOS admits both approaches. My question is, what method prevalence when you use both of them?

I mean, I have encountered this real config in a device:

xe-5/1/0 {
        unit 0 {
            family ethernet-switching {
                port-mode trunk;
                vlan {
                    members [ v20 v30 ];
vlans {
    v40 {
        description OTHERVLAN;
        vlan-id 40;
        interface {
    v50 {
        description v50;
        vlan-id 50;
        interface {

In this case, what Vlan IDs are being transmitted by interface xe-5/1/0.0, v20 and v30? v40 and v50? all of them?


  • I'm not around a switch right now, but you will be able to see what those interfaces are tagging with show ethernet-switching interfaces xe-5/1/0.
    – Ryan Foley
    Sep 10 '14 at 20:05
  • It's worked. Seems that both configs are compatible because 4 vlans are being transmitted.
    – KorXo
    Sep 11 '14 at 9:42
  • hm, junipers are nice ;-) cisco cant do vlan-centric, imho it can seriously reduce config length in access switches at least...) curious, there no "trunk mode" commands in vlan-centric config, so port became trunked when was "used" for more than 1 vlan? if yes, which one vlan will be untagged(native), first?
    – pyatka
    Sep 11 '14 at 19:19
  • 1
    Pyatka - Junos does not have a default native vlan. Native vlan must be configured separately via 'native-vlan-id' statement. One thing of note is that if a vlan is explicitly added as a trunk port member that vlan becomes tagged even if it is explicitly configured as the native vlan. There are a few docs explaining this behaviour from Juniper.
    – APA
    Sep 11 '14 at 21:54
  • Thanks! I haven't juniper switches(only ns25 fw, at home collection), asked this just for curious )
    – pyatka
    Sep 12 '14 at 3:57

As @Ryan suggests, I use show ethernet-switching interfaces xe-5/1/0 to show what VLAN id are being transported.

According to this info, the 4 VLANs are being transported. So VLAN-centric and interface-centric are compatible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.