Home » How To Configure a VLAN with Juniper EX4200-24t Switch and Verizon G3100 Router

VLANs are a great way to segment your network and add security to your homelab. In this step-by-step guide, I will show you how I was able to configure a VLAN for my homelab.


I am using the following hardware in this tutorial. Feel free to follow along, but if you are using different devices, your mileage may vary.

Configuring the VLAN on the Switch

Step 1: Configure the VLAN

Visit the URL of your Switch. For me, this is

Sign in and go to the Configure Tab

J-Web Configure Tab - Configiuring VLAN

Go to Switching > VLAN and click on the Add Button at the top right.

Add a VLAN in J-Web Interface

Fill in the desired VLAN name and description.

Note: You won’t be able to change the name later on but you can delete and recreate it

Configure VLAN Ports in J-Web

In the Ports tab, you can add the ports you want to be associated with this VLAN. You can view the ports in the Dashboard of J-Web if you forget.

Configure VLAN IP Address in J-Web

In the IP address Tab, Check IPv4 and fill in the desired IP address of the VLAN gateway and the subnet.

Once you are happy with the changes, click OK.

Commit Changes in J-Web

You can now Commit your changes at the top Commit Tab

Step 2: Add DHCP for the VLAN

Configuring DHCP will allow devices to automatically be assigned IP Addresses

Add DHCP Pool in J-Web

Go to the Configure > Services > DHCP tab and Add a DHCP Pool

Configure DHCP Pool in J-Web

Fill in the DHCP Subnet and the Address Range you would like to automatically assign.

For DNS Name Servers, these are the default DNS servers that connected devices will use. I added the VLAN Gateway ( as well as Cloudflare’s DNS Servers ( and

For Gateway Routers, this is the default gateway that devices on the VLAN will use. (

Once you are happy with the changes, click on OK and commit the changes like above in Step 1.

Configuring the VLAN Routing on the Router

Now that we have the VLAN setup and ready, we need to create a new route so that we can have Internet Connectivity for our VLAN.

Go to your Router’s management URL (Default: and sign in.

Go to Advanced > Network Settings > Routing Page and configure a new Route

Verizon Router - New Route

Destination: The VLAN destination IP (
Netmask: The VLAN submask (
Gateway: The IP of the Switch (

Click Apply once you are ready.

That’s it!

We are now finished configuring our VLAN. We can now test it by connecting a device to the port(s) assigned to the VLAN. It should obtain an IP address ( automatically and have internet connectivity.

If you liked this tutorial, please be sure to check out our other Homelab guides.

Thanks for reading and happy hacking!

About Author

Leave a Reply

Your email address will not be published. Required fields are marked *