I am looking to get a layer 3 Cisco switch and I know how to setup vlans, I will have the internet connection coming in from the pfsense router on port 1 and then vlan 10 on port 10 and vlan 20 on port 20, all I need to know is how to use layer 3 to let each vlan connect to the internet?

Can someone please guide me through getting an internet connection to vlan 10 and vlan 20 from port 1 carrying the internet? I have seen people using Cisco routers too and cannot find a tutorial that isn't using a Cisco router, I may be able to use pfsense if so then can someone tell me how to configure it?

  • You need to be able to tell the router how to reach the different networks (either static routers or by sharing a routing protocol with the layer-3 switch) and NAT all the networks. Unfortunately, questions about consumer-grade routers are explicitly off-topic here.
    – Ron Maupin
    Commented Sep 25, 2017 at 0:43
  • Is pfsense classed as consumer grade? Commented Sep 25, 2017 at 0:46
  • No, which is why I didn't close the question, but the Virgin router is. You should edit the question to remove it and focus on the pfSense. You should also include your proposed layer-3 switch configuration.
    – Ron Maupin
    Commented Sep 25, 2017 at 0:47
  • Can you help me though? I just want to know how to connect the two vlans to the internet Commented Sep 25, 2017 at 0:51
  • I'm not a pfSense expert (I have seen them here from time-to-time). That is going to be the configuration that really needs to work. You can connect from a routed link on the layer-3 switch, but the router is going to need to be configured to know about and NAT the networks on the VLANs.
    – Ron Maupin
    Commented Sep 25, 2017 at 0:53

2 Answers 2


First, you need to decide which device you want to do the actual routing. Because it's a layer 3 switch the switch can actually do the routing. Alternatively, you can send all the VLANs back up to the pfSense router and have it do the routing.

In the first case you would want to setup an SVI (switched virtual interface) on the switch for each of the 3 VLANs you have (VLAN 10, VLAN 20, and whatever VLAN you are using on pfSense). You would then also need to add a default route on the switch to point all traffic towards the IP address of the pfSense router.

In the second case (where pfSense does all the routing) you would want to setup port 1 on the switch as a trunk port. You would also need to setup pfSense to be aware of VLANs 10 and 20 and accept tagged 802.1q traffic on the interface connected to the switch. You would then give pfSense an address on each of the 2 VLANs and it would handle routing between them.

Based on your question it sort of sounds like the second option is probably what you want but it's a little unclear. Note too that in the second option you don't actually need a layer 3 switch, only a managed layer 2 switch.

  • The first option will be best, how would I go about setting up SVI's and the default route? Commented Sep 25, 2017 at 6:47
  • Also wouldn't the router get confused with getting packets from a subnet say 192.168.3.X if the router is using 192.168.1.X? Commented Sep 25, 2017 at 7:24
  • No, in the second case the router would have an IP in each subnet. Commented Sep 25, 2017 at 8:00
  • If you would like more details on setting up either of these you'll need to provide more detail such as the IP addressing scheme. It's probably best to do some additional research on your own based on what you've learned here and then create a new, more specific question as needed. Commented Sep 25, 2017 at 8:07

Route all traffic from layer3 switch to pfsense device with configuring default route

IP route pointing towards psense ingress interfàce

Further configured NAT policy in pfsense .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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