OPNsense Forum

English Forums => Tutorials and FAQs => Topic started by: netnut on January 31, 2021, 01:07:26 am

Title: [HowTo] - PPPoE, VLAN & RFC4638
Post by: netnut on January 31, 2021, 01:07:26 am
PPPoE, VLAN & RFC4638

Most modern Internet Broadband connections (VDSL, Fiber) are based on ethernet instead of ATM, but still using PPP for connectivity and subscriber management. Many ISP's also offering extra services (besides IPv4 & IPv6 Internet) like IPTV and VOIP, most of the time provided via different VLAN's.

A PPP header is 8 bytes, so when you're using PPP over Ethernet your (usable) MTU size will be slightly lowered from it's default (1500) to 1492. I'm not going to explain here why this might be problematic or at least suboptimal in a standard Ethernet network, DuckDuckGo is your friend ;-). Try: "MTU and Fragmentation" if you like to learn more about this topic.

Now the good news is that configuring PPPoE with VLAN's is extremly simple using OPNSense. Even better, if your ISP supports RFC4638 (Baby Jumbo's) on it's PPPoE connection, things get really awesome.....


“To Whom It May Concern”:

The instructions below are for OPNSense configurations that are DIRECTLY connected to an ISP infrastrucure and terminate the PPPoE connection at the OPNSense box itself or using a CPE (modem) that provides PPPoE passthrough functionality.

MAC Spoofing:

If you need to use a custom MAC Address, configure it on the physical interface (01:01:01:01:01:01 in this example). When you don't know if you need a custom MAC, you probably don't need one, just leave this item blank.

MTU Size:

If your ISP supports RFC4638, configure the MTU size on the Physical NIC (1512) and the PPPoE VLAN (1508), otherwise leave these two settings blank. If your ISP supports RFC4638, but it doesn't work, first configure everything WITHOUT custom MTU settings, this should work anyway. Double check if your physical NIC supports custom MTU (>1500) sizes.
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: netnut on January 31, 2021, 01:07:58 am
1 - Configure your WAN interface
    - Unnumbered
    - Custom MAC Address (if needed)
    - Custom MTU Size (if supported by NIC & ISP)


Login to view screenshot:
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: netnut on January 31, 2021, 01:08:22 am
2 - Add Service VLAN (IPTV)
    - Use WAN Interface as parent
    - My ISP is using VLAN4 for IPTV
    - Check YOUR ISP instructions for the right VLAN id

Login to view screenshot:
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: netnut on January 31, 2021, 01:08:40 am
3 - Add Service VLAN (IP)
    - Use WAN Interface as parent
    - My ISP is using VLAN6 for regular IPv4 & IPv6 Internet
    - Check YOUR ISP instructions for the right VLAN id

Login to view screenshot:
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: netnut on January 31, 2021, 01:08:59 am
4 - Both Service VLAN's configured

Login to view screenshot:
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: netnut on January 31, 2021, 01:09:24 am
5 - Assign the configured Service VLAN Interfaces

Login to view screenshot:
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: netnut on January 31, 2021, 01:09:44 am
6 - Configure the VLAN (IP)
    - Configure IPv4 Configuration Type: PPPoE
    - Custom MTU Size (if supported by NIC & ISP)

Login to view screenshot:
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: netnut on January 31, 2021, 01:10:08 am
7 - Configure the VLAN (IP) - PPPoE
    - Provide username & password for the PPPoE configuration
    - A Service Name is not required in most cases

Login to view screenshot:
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: netnut on January 31, 2021, 01:10:26 am
8 - OPNSense Automagicly configured your PPP Interface

Login to view screenshot:
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: netnut on January 31, 2021, 01:10:51 am
9 - Check, Check, Double Check

Login to view screenshot:
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: netnut on January 31, 2021, 01:11:06 am
10 - Configure the VLAN (IPTV)
    - If needed configure the other Service VLAN
    - My ISP is using DHCP for the IPTV Service VLAN, with some custom request settings
    - Check YOUR ISP instructions for the required DHCP options
    - I don't use IPTV, so no futher details

Login to view screenshot:
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: netnut on January 31, 2021, 01:11:17 am
Really, that's all...

Check your PPPoE Connection from "Interfaces -> Overview -> PPPOE-INTERFACE"
If everything went well, you see a MTU size of 1500 and an active IPv4 address.


Validated with OPNsense 21.1 - It works for Me!!!
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: hushcoden on January 31, 2021, 02:51:01 pm
Thanks for the guide, very useful. Quck one: why don't you set the physical WAN at 1508 too? Why 1512?

Thanks.
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: netnut on January 31, 2021, 07:15:16 pm
Quick one: why don't you set the physical WAN at 1508 too? Why 1512?

Extra 4 bytes for the 802.1q VLAN
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: fd0 on March 12, 2021, 05:10:49 pm
Great HowTo

-fd0
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: Taomyn on March 25, 2021, 06:57:33 am
So if I understand this correctly and I already have my PPPoE set up and that hopefully my ISP supports this, all I need to do is adjust the MTUs at the same places? I don't have one for VoIP so I can just adjust things for the two interfaces.
Title: Re: [HowTo] - PPPoE, VLAN & RFC4638
Post by: joeyboon on January 21, 2022, 01:52:01 pm
Thanks! This post made me realize I needed to enable the phisical interface in order to change the MTU to 1508 (in my case). I thought I already implemented rfc4638 by changing the settings on the WAN interface (vlan). Thanks again!