A useful, yet not so common knowledge use for VLANs is as a media converter. In the above video, we took a look at how to use a UniFi Switch to pass external VLANs, such as from an ISP through from fibre to our ethernet based EdgeRouter X.

In this example, our ISP will be handing off our connection as fibre, with an SFP. We'll use a UniFi Switch that has SFP ports to convert this to ethernet so it can connect to a ethernet based router, such as an EdgeRouter X or USG 3P.

Contents

Background

How to make the VLAN only networks

Adding the VLAN to the switch ports

Background

To achieve this, we'll be creating a new VLAN within UniFi, but under the "Third-party Gateway" option. This means the VLAN will be very basic and only live on the UniFi switches.

One VLAN will be made, and then untagged on both ports in the WAN bridge we'll be making. For example, if the uplink from the ISP comes into port 9 on a US-8-150W switch, then we can use port 8 to link it to the router's WAN port. On both port 9 and port 8 our new VLAN will be untagged, creating the bridge we are after.

Note: Be careful to only use this VLAN on these two ports. Untagging it and using it elsewhere internally could create issues such as loops.

How to make the VLAN only networks

First, go to UniFi, then Settings

Next, go to 'Networks'

Click on 'Create New Network'

Next, click on the 'Router' drop down

Then, select 'Third-party Gateway'

Next, select a VLAN ID and name for this new VLAN. Remember, make this one that is not in use elsewhere in your network to avoid issues. VLAN IDs can be anything from 1 to 4094.

Once done, click on 'Add Network'

Adding the VLAN to the switch ports

Next, we need to assign the new VLAN to the ports that we are going to use in the bridge.

First, go to the 'Devices' section

Next, select the UniFi Switch you are working on

Then, go to the 'Ports' tab

Then, click on 'Port Manager'

Next, select one of the ports that is going to be used in the VLAN bridge

In the next screen, select the drop down 'Port Profile'

Select the VLAN that was made earlier

Then, finally click on 'Apply Changes'

Repeat the last four steps for the second port used in the bridge.

Be careful to not use this VLAN ID / Port profile anywhere else in the network internally as this can create issues.

HostiFi

HostiFi provides hosting for Ubiquiti hardware and software, with servers for UniFi and UISP as well as professional network services with HostiFi Pro.

If you run into any issues, send an email to support@hostifi.com or contact us via live chat.

Did this answer your question?