SRX Services Gateway
SRX Services Gateway

vlan tagging on subinterface

‎10-17-2017 12:24 PM

Hi all,

I have an srx running on a customer site and i want to add a virtual interface with a vlan tagging on it.

My experience with Pfsense or Sophos UTM or VyOS is that i can create a virtual subinterface on a logical interface (L3) and give this new subinterface a Vlan tag

 

In Junos i am not able to achieve this

 

fe-0/0/7 {
unit 0 {
family inet {
address 192.168.0.254/24;
}
}
unit 30 {
vlan-id 30;
family inet {
address 192.168.30.1/24;
}
}
}

fe-0/0/7 is the lan interface and this cannot have a vlan tagging because the local network has to reach this ip

When i set vlan-tagging on fe-0/0/7 i have to give unit 0 a vlan tag but my network is not sending any tags so my router becomes unreachable.

 

So what i want to achieve is  unit 0 untagged and unit 30 tagged so i can run a dhcp server behind unit 30 so it won't affect unit 0

There are multiple platforms  that  can do this easily so i am sure Juniper should also be able to achieve something like this

 

 

Regards,


Robbert

1 REPLY 1
SRX Services Gateway

Re: vlan tagging on subinterface

‎10-17-2017 12:39 PM

I guess i already found it

fe-0/0/7 {
    flexible-vlan-tagging;
    native-vlan-id 1;
    unit 0 {
        vlan-id 1;
        family inet {
            address 192.168.0.254/24;
        }
    }
    unit 30 {
        vlan-id 30;
        family inet {
            address 192.168.30.1/24;
        }
    }
}

Because i set the native-vlan-id to 1 i guess this vlan is accessible from  any  vlan even if it  has no vlan tag