L3 = layer3 ( ip routing )
L2 = layer2
802.1q is a layer2 protocol and once you build the vlan' d subinterfaces you assigned layer3 information to them. The switchport that your on, need 802.1q enable and the appropiate vlans created
Here' s a FGT with a few layer3 subinterfaces built for port2
edit " PV_NET01"
set vdom " root"
set ip 10.200.210.1 255.255.254.0
set allowaccess ping https ssh
set description " misc network #1"
config ipv6
set ip6-address 2001:xx:xxa:4::1/64
set ip6-allowaccess ping https ssh
end
set interface " port2"
set vlanid 50
next
edit " PV_NET02"
set vdom " root"
set ip 10.200.211.1 255.255.254.0
set allowaccess ping https ssh
set description " misc network #2"
config ipv6
set ip6-address 2001:xx:xxa:5::1/64
set ip6-allowaccess ping https ssh
end
set interface " port2"
set vlanid 51
next
The Port 2 is set up for trunking on the switch side of things;
eg ( using the nexus we are plugged on )
interface Ethernet1/30
description mia-dc firewall fgt#1 port2
switchport mode trunk
switchport trunk native vlan 999
switchport trunk allowed vlan 50,51
logging event port link-status
udld aggressive
Once you build the 802.1q subinterfaces on the FGT and then allowed vlan 802.1q on the physical switchpoprts. You apply L3 fwpolicy just like any other interface.
btw: I like to use names on my subinterfaces or make references to the vlan;
e.g I could have written it like;
re' s a FGT with a few layer3 subinterfaces built for port2
edit " vlan50"
set vdom " root"
set ip 10.200.210.1 255.255.254.0
set allowaccess ping https ssh
set description " misc network #1"
config ipv6
set ip6-address 2001:xx:xxa:4::1/64
set ip6-allowaccess ping https ssh
end
set interface " port2"
set vlanid 50
next
edit " vlan51"
set vdom " root"
set ip 10.200.211.1 255.255.254.0
set allowaccess ping https ssh
set description " misc network #2"
config ipv6
set ip6-address 2001:xx:xxa:5::1/64
set ip6-allowaccess ping https ssh
end
set interface " port2"
set vlanid 51
next
etc.....
I hope that make better sense and clears up the picture.