Introduction
In this step-by-step guide, we will walk you through the process of configuring a VLAN network using a pfSense firewall and a TP-Link SG1016DE switch. This setup is ideal for small businesses or home networks that require multiple subnets and improved network security.
Prerequisites
Before you begin, ensure the following:
- You have a pfSense firewall installed and configured.
- You have a TP-Link SG1016DE switch.
- Both the pfSense firewall and the switch are connected to each other.
Creating a VLAN
1. Log in to the pfSense web interface.
2. Go to /interfaces.
3. Click on the "Assignments" tab.
4. Scroll down to the "Available Network Ports" section and click on the "Add" button.
5. In the "Interface Name" field, enter a name for your VLAN interface (e.g., "vlan10").
6. In the "Interface Type" dropdown, select "VLAN".
7. In the "VLAN ID" field, enter the VLAN ID number (e.g., "10").
8. Click "Save & Apply".
Configuring the Switch
1. Log in to the TP-Link SG1016DE web interface.
2. Go to "VLAN" under "Network" in the left-hand menu.
3. Click "Add New VLAN".
4. Enter the VLAN ID number (e.g., "10") and click "Create".
5. Go back to the "Ports" tab.
6. Select the port(s) you want to assign to the VLAN and click "Edit".
7. In the "VLAN Membership" section, select "Access" and enter the VLAN ID number (e.g., "10").
8. Click "Save & Apply".
Configuring pfSense as the VLAN Gateway
1. Go back to the pfSense web interface and go to /interfaces/vlan10.
2. Set the "IPv4 Configuration Type" to "Static IP".
3. Enter the IP address, subnet mask, and default gateway for your VLAN subnet.
4. Click "Save & Apply".
Enabling DHCP on the VLAN
1. Go to /services/dhcp-server.
2. Click "Add".
3. Enter a name for your DHCP server (e.g., "vlan10-dhcp").
4. In the "Interface" dropdown, select your VLAN interface (e.g., "vlan10").
5. Configure the DHCP range and options as needed.
6. Click "Save & Apply".
Testing the Setup
1. Connect a device to the VLAN port on the switch and verify that it receives an IP address from the DHCP server.
2. Ping the pfSense firewall from the device to ensure connectivity.
Summary
In this guide, we covered the steps to configure a VLAN network using a pfSense firewall and a TP-Link SG1016DE switch. We created a VLAN interface on the pfSense firewall, configured the switch to support the VLAN, and set up DHCP on the VLAN. By following these steps, you can create a secure and segmented network using this affordable and powerful combination of hardware and software.