Trouble getting PPPoE working, any ideas?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Trouble getting PPPoE working, any ideas?

Adam Van Ymeren
I've been trying to replace my ISP provided router with an OpenBSD 5.6
system, but I can't get PPPoE working.  Using the userspace pppd
daemon on a linux machine appears to work, but no luck using pppoe(4).

I did some debugging using wireshark, and for some reason
when my OpenBSD system sends the very first PPP discovery packet, it
receives no response.  I can't find any meaningful difference between
the packet that OpenBSD is sending and the packet that my linux machine
is sending.

As reported by wireshark, the successful packet from linux is describe
below.  My ISP decided that the internet service needs to be under a
VLAN with id 35.

Length: 36-bytes
Ethernet II, Src: 00:b5:6d:03:b8:9a, Dst: ff:ff:ff:ff:ff:ff
802.1Q Virtual Lan, PRI: 0, CFI: 0, ID: 35
  Type: PPPoE Discovery (0x8863)
PPPoE Discovery:
  Version: 1
  Type: 1
  Code: Active Discovery Initiation (PADI) (0x09)
  Session ID: 0x0000
  Payload Length: 12
  PPPoE Tags:
    Host-Uniq: bf0f0000

Raw hex:

0000   ff ff ff ff ff ff 00 b5 6d 03 b8 9a 81 00 00 23
0010   88 63 11 09 00 00 00 0c 01 01 00 00 01 03 00 04
0020   bf 0f 00 00

The unsuccessful packet from my OpenBSD machine looks like this

Length: 64-bytes
Ethernet II, Src: 00:0d:b9:35:ac:Dc Dst: ff:ff:ff:ff:ff:ff
802.1Q Virtual LAN, PRI: 3, CFI: 0, ID: 35
  Type: PPPoE Discovery (0x8863)
PPPoE Discovery
  Version: 1
  Type: 1
  Code: Active Discovery Initiation (PADI) (0x09)
  Session Id: 0x0000
  Payload Length: 12
  PPPoE Tags
    Host-Uniq: 54c6dda5

Raw Hex:

0000   ff ff ff ff ff ff 00 0d b9 35 ac dc 81 00 60 23
0010   88 63 11 09 00 00 00 0c 01 01 00 00 01 03 00 04
0020   54 c6 dd a5 00 00 00 00 00 00 00 00 00 00 00 00
0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

The main differences I see are:

MAC addresses are different, obviously.

The BSD ethernet frame has extra padding to bring it to 64-bytes,
whereas the linux packet is only 36-bytes

The BSD vlan tag has priority 3 set, rather than priority 0 in the linux
packet.

The PPPoE Host-Uniq tag is different, but this appears to be a random or
pseudo-random value.

I also plugged in to the other end of my ISP provided router and
captured the discovery packet from it.  It looks the same as the linux
packet, except it's padded to 60-bytes and the host-uniq tag is
different.  The vlan priority is set to 0 in that packet as well.


I've tried to get pf to set the pri tag on my vlan packets to 0, but I'm
new to pf and I couldn't get it to work.  I tried this rule and a few
other variants

match out all set prio 0


My best guesses at what's going wrong:

1)  Some sort of MTU failure that isn't visible in wireshark.  I messed
around with the MTU values for the pppoe0 and re0 interfaces, but didn't
have any luck there yet.

2)  Some lame bug in my ISP's equipment that is failing due to the
VLAN priority being 3 instead of 0, or the packet being padded to 64-bytes.


Sorry for the marathon long email, I wanted to include everything I
thought was relevant.

If anyone has any ideas on where I can look to debug this further I'd
really appreciate it.

Anyone know why I can't get the vlan pri set to 0?  Or is there a way I
can write raw ethernet frames to the wire.  Is a raw socket low-level
enough for this?

Thanks for the help!
-Adam

Reply | Threaded
Open this post in threaded view
|

Re: Trouble getting PPPoE working, any ideas?

Adam Van Ymeren
On Sun, Apr 12, 2015 at 4:28 PM, Adam Van Ymeren <[hidden email]> wrote:
> I did some debugging using wireshark, and for some reason
> when my OpenBSD system sends the very first PPP discovery packet, it
> receives no response.

> My best guesses at what's going wrong:

> 2)  Some lame bug in my ISP's equipment that is failing due to the
> VLAN priority being 3 instead of 0, or the packet being padded to 64-bytes.

For anyone following along or anyone who may hit the same issue, setting
the VLAN priority to 0 fixes the issue.  My ISP is Bell in Ontario.

I was unable to set the priority using PF however, I ended up compiling
a custom kernel that always sets it to 0.

I was linked to this thread in private of someone hitting the same issue
and it appears that this at least used to be a bug in PF.

https://www.marc.info/?l=openbsd-misc&m=138003688820372&w=2

I'll investigate futher when I have time and hopefully follow up with a
bug report.

Cheers,
-Adam