Personal tools

VLAN Trunking

From PFSenseDocs

Jump to: navigation, search


Contents

Summary

This article will give a brief overview on VLANs and VLAN trunking to be used in pfSense.

There is a lot more detail on VLANs, security issues with VLANs, pfSense VLAN configuration, VLAN switch configuration, and more in pfSense: The Definitive Guide.

Definitions

VLANs are virtual LAN segments of a managed switch, and when pfSense is plugged into a trunk port it can utilize VLANs to have multiple virtual interfaces, one for each available VLAN. In this manner, you can have pfSense talk to a large number of networks without the need for more physical interfaces.

In pfSense, you must create a new VLAN under Interfaces > (assign), on the VLANs tab. After creating the VLAN interface, it can be assigned just like any other interface.

Creating VLANs

  • Connect to the managed switch using a console cable and terminal client.

Putty

  • Create the relevant amount of vlans required and commit the changes made to the managed switch.
  • An example of creating a VLAN
Switch>enable
Switch#vlan database
Switch(vlan)#vlan 10
  • View the vlans created

Show_vlandb

Creating a vlan trunk

  • Use the switch management interface to create the trunk.
  • An example of creating a VLAN trunk using the management interface.
Switch#configure terminal
Switch(config)#interface fastEthernet 0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport trunk encapsulation dot1q
Switch#show interface fastEthernet 0/1 switchport
  • View the VLAN trunk created.

Show_trunk

See also HOWTO setup vlans with pfSense