OPNsense Forum

Archive => 19.7 Legacy Series => Topic started by: zhakrin on February 24, 2020, 04:52:43 PM

Title: VLan ID, DHCP, and misery
Post by: zhakrin on February 24, 2020, 04:52:43 PM
This is a weird situation so please allow me to explain...

My internet provider provides both internet and IPTV.  For Internet, it is a standard PPPoE situation.  For IPTV, the way that they do it is that they use VLan 85 for a separate block of IP addresses, so IPTV boxes connected would need to send DHCP requests tagged with VLan ID 85 to get the addresses.

What I want to do in a nutshell -- I want to send out a DHCP request tagged with VLan ID 85 so I can get the IPTV IP address on my router.  (Eventually, will try and setup IGMP proxy for my LAN as well but one step at a time for now.)

What my setup is:

WAN interface -- PPPoE on igb1
LAN interface -- igb0

what I did:
setup a VLAN with tag 85 on igb1
setup an assignment -- OPT1 with the VLAN just created
set the OPT1 Interface type to DHCP

The problem -- Packet capture show that the DHCP queries are not tagged with the VLAN ID tag.  So they are being ignored...

What am I doing wrong?  Any help would be greatly appreciated...
Title: Re: VLan ID, DHCP, and misery
Post by: AdSchellevis on February 24, 2020, 05:07:30 PM
Hi,

If I'm not mistaken, you need to assign both interfaces (with and without vlan tag) to the pppoe interface.
The last entry in this port https://forum.opnsense.org/index.php?topic=9324.0 seems to point to that.

Best regards,

Ad
Title: Re: VLan ID, DHCP, and misery
Post by: zhakrin on February 24, 2020, 05:36:01 PM
Thanks for the response!

The best I can parse on that last post you referred is that
1)  The VLAN was still created on the physical interface
2)  He added a point-to-point device (of which there are only 4 options, L2TP, PPP, PPPoE, and PPTP -- none seems to apply here)
3)  I guess from that post his ICP requires that he does PPPoE dial-up using a VLAN tag and I'm glad that worked out for him... All the same I tried creating the VLAN on the PPPoE interface and nothing...

4) my question is that if I create an interface based on a VLAN presumably all packets emitted from that interface should be tagged with the VLAN id, but it seems that the DHCP Client isn't getting the tag...

attaching a cap file so you see what I mean...
Title: Re: VLan ID, DHCP, and misery
Post by: AdSchellevis on February 24, 2020, 05:44:14 PM
Just to be sure, your pppoe contains both interfaces? Sometimes it helps to google a bit on the provider name, quite often other people have similar setups.
Title: Re: VLan ID, DHCP, and misery
Post by: zhakrin on February 24, 2020, 05:56:08 PM
Not sure what you mean -- the PPPoE doesn't need to be VLAN tagged to work?  Only the IPTV...

I've tried to google with no luck -- not many opnsense users with Shanghai Telcom, I guess.  I did find other posts that this works with Merlin/OpenWRT, which is why I'm going down this rabbit hole...
Title: Re: VLan ID, DHCP, and misery
Post by: AdSchellevis on February 24, 2020, 05:59:58 PM
As I understand it from the other post (I'm not using this myself), the pppoe interface (Interfaces -> Point to Point -> Devices) is linked to both interfaces (the one with vlan and the one without).
Title: Re: VLan ID, DHCP, and misery
Post by: zhakrin on February 24, 2020, 06:14:46 PM
Ah, I see.

I think in that post he was trying to get PPPoE to work, and his ISP restricted that PPPoE to a VLAN.  So essentially he setup a VLAN, and created a point-to-point link for the PPPoE dial-up to work.  So I assume that that way, the request packets for PPPoE handshaking was tagged properly.

In my use case, the PPPoE works without VLAN tagging, but I need to send out a separate DHCP query tagged with a VLAN id.  point-to-point doesn't seem to provide that functionality, and PPPoE is a separate interface (and would need to remain separate as if I tag it with a vlan id it wouldn't be able to access the internet).\

Back to my original question is, in the simplest case, if I create a vlan with a VLAN id of x, and assigns it to an interface with the type DHCP, why is the DHCP request from that interface not tagged with the VLAN id?
Title: Re: VLan ID, DHCP, and misery
Post by: AdSchellevis on February 24, 2020, 06:19:19 PM
I think it's the same situation, a tagged interface over pppoe, logically the vlan tagged interface should be in the pppoe tunnel, but I don't have this kind of installation on our end.

Maybe someone else has other/more ideas.

Best regards,

Ad