Security
Security

Scripting How-To: Can I configure tagged and untagged sub-interfaces in vSRX?

by Juniper Employee on ‎04-20-2016 08:20 AM - edited on ‎09-22-2017 03:57 PM by Administrator Administrator (2,880 Views)

Question

 It is possible to create tagged and untagged sub-interfaces simultaneously in vSRX?

Something like this:

ge-0/0/0 {
    unit 0 {
        family inet {
            address 192.168.2.100/24;
        }
    }
    unit 1 {
        vlan-id 10;
        family inet {
            address 192.168.1.100/24;
        }
    }
}

 

Answer

Yes you can, but you will need to enable flexible-vlan-tagging and use a native vlan (documentation).

 

Your configuration would look like the following:

 

ge-0/0/0 {
    flexible-vlan-tagging;
    native-vlan-id 20;
    unit 0 {
        vlan-id 20;
        family inet {
            address 192.168.2.100/24;
        }
    }
    unit 1 {
        vlan-id 10;
        family inet {
            address 192.168.1.100/24;
        }
    }
}