Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: pppoe discovery  (Read 3269 times)

bilbokitz

  • Reg Member
  • ***
  • Posts: 211
pppoe discovery
« on: December 11, 2017, 11:37:53 AM »

Is this a particularly sensitive process?

The reason I ask is that I cant seem to get this to work over a vlan, I have a vlan setup due to where my modem and router are located.

If I have my equipment powered down for an extended period of time the router will not connect to the isp, timeout waiting for PADO packets. If I switch the router off for only a minute and back on again it will connect again absolutely fine (presumably as the ppp session is still alive)

When my router wont connect I find that if I move it and connect it directly to my modem it will connect again (most of the time) I can then switch the router off and put it back into its original location which is a bit of a pain.  I ran a wire shark and I do see the padi request hitting the modem, it just doesn't get a response from the ISP.

When testing at one point last night I could not get the router to re-connect even when directly connected but for some reason trying a different modem cleared it and it connected, I then reverted immediately to my original setup and all was ok.

Any reason why this process doesn't seem to be occurring over a vlan. The request is untagged when it leaves the modem.

Logged
Alcatel Cab 200/20 Vectored VDSL 35b - Technicolor DGA4130 Bridged + Asus RT-AC86U Asuswrt-Merlin

Dray

  • Kitizen
  • ****
  • Posts: 2361
Re: pppoe discovery
« Reply #1 on: December 11, 2017, 11:42:56 AM »

I had that working without using a vlan, just plugging in the modem and router into my LAN at different switches.
Logged

bilbokitz

  • Reg Member
  • ***
  • Posts: 211
Re: pppoe discovery
« Reply #2 on: December 11, 2017, 12:33:29 PM »

It works fine over the vlan if the ppp session has already been initiated recently, thats the odd thing.

Its an asus router and it has a field for additional pppd options, anything I could try there?
Logged
Alcatel Cab 200/20 Vectored VDSL 35b - Technicolor DGA4130 Bridged + Asus RT-AC86U Asuswrt-Merlin

Dray

  • Kitizen
  • ****
  • Posts: 2361
Re: pppoe discovery
« Reply #3 on: December 11, 2017, 12:42:45 PM »

Some likely candidates here https://ppp.samba.org/pppd.html
passive perhaps?
Logged

WWWombat

  • Kitizen
  • ****
  • Posts: 1674
Re: pppoe discovery
« Reply #4 on: December 12, 2017, 12:44:54 AM »

Is this a particularly sensitive process?

I wouldn't have thought so.

So long as the switch can cope with the L2 broadcast required for PADI, to flood the packet to all ports in the VLAN.

If I have my equipment powered down for an extended period of time the router will not connect to the isp, timeout waiting for PADO packets.

An extended period of time being how long? My initial thought would be how behaviour changes when entries timeout in any ARP caches, or in the MAC table in the switch.

If I switch the router off for only a minute and back on again it will connect again absolutely fine (presumably as the ppp session is still alive)

Surely the PPP session won't still be alive if the router has been power cycled. The router must surely go through the whole PPPoE discovery process again, before then starting a new PPP session.

In the end, it looks as though the modem will talk via a switch only if it has recently talked directly to a router. It is almost as though it is "conditioned" to only be able to deal with one partner MAC address... and only communicates with the same MAC as the first talker.

That makes me wonder if, after the router has been turned off for "an extended period of time". the modem learns to talk to the MAC of the switch (eg if the switch talks VTP, DTP, CDP, LLDP or STP) and refuses to talk to any other piece of equipment (ie the modem).

However, when the modem is directly connected, it learns that the "primary partner MAC" is the router. A short power-cycle isn't enough to dislodge "primary partner" status, so the modem then ignores any frames sent by the switch (VTP, DTP etc) but allows fresh PADIs from the router.

In which case... are there some L2 protocols that you need to turn off?

When my router wont connect I find that if I move it and connect it directly to my modem it will connect again (most of the time) I can then switch the router off and put it back into its original location which is a bit of a pain.  I ran a wire shark and I do see the padi request hitting the modem, it just doesn't get a response from the ISP.

How exactly do you see that the PADI hits the modem?

When testing at one point last night I could not get the router to re-connect even when directly connected but for some reason trying a different modem cleared it and it connected, I then reverted immediately to my original setup and all was ok.

Makes me wonder just what kind of MAC caching is going on.

I had that working without using a vlan, just plugging in the modem and router into my LAN at different switches.

Dray has a point here. How do the router & modem behave if there is no VLAN, and they are connected into a single plain switch? Or network of switches?
Logged

bilbokitz

  • Reg Member
  • ***
  • Posts: 211
Re: pppoe discovery
« Reply #5 on: December 12, 2017, 11:47:48 AM »

Thanks for the replies, I will add "passive" to see what happens next time.

Extended period being - not sure of the exact amount but I leave it an hour when testing to be sure. The router can be unplugged for a few minutes and connect again.

Quote
Surely the PPP session won't still be alive if the router has been power cycled. The router must surely go through the whole PPPoE discovery process again, before then starting a new PPP session.

I read on this site that the ppp session can survive a while hence my presumption

Quote
"primary partner MAC"   In which case... are there some L2 protocols that you need to turn off?

I will have to look this primary partner thing up but it sounds plausible.

Quote
How exactly do you see that the PADI hits the modem?

I ran tcpdump on the prtm0 interface of the modem DGA4130 and looked at the file in wireshark. I also ran wireshark on the port (mirrored) of the port connected to the modem as well as the port connected to the router, they all matched up. I also have a hg612 but I am fairly sure the same happens I will have to double check that.

Quote
How do the router & modem behave if there is no VLAN, and they are connected into a single plain switch? Or network of switches?
More testing to do - the kids will love me


ps I do see broadcasts from the tplink switches in the capture, when looked up the protocol has something to so with the way the switches communicate with the tplink configuration utility.

« Last Edit: December 12, 2017, 12:08:03 PM by bilbokitz »
Logged
Alcatel Cab 200/20 Vectored VDSL 35b - Technicolor DGA4130 Bridged + Asus RT-AC86U Asuswrt-Merlin

WWWombat

  • Kitizen
  • ****
  • Posts: 1674
Re: pppoe discovery
« Reply #6 on: December 12, 2017, 12:25:04 PM »

I read on this site that the ppp session can survive a while hence my presumption

I think that's the other way around - the PPP session survives when the router stays powered up, but the modem goes down (power or resync).

I will have to look this primary partner thing up but it sounds plausible.

You won't find anything - that terminology is made up, because I can't think of a "proper" way to describe this.

In Cisco switches, once of the security features is to make a port "sticky". It doesn't care what MAC address is used for a device connected to a port, but once one MAC address is used, then the port will accept no other address. All other frames will be discarded.

If your modem has a similar restriction, then it might lock out the "second" device, no matter that the first device is just the switch sending out dumb management broadcasts. And, because the designer of the cheap modem might expect that the modem is always directly connected to the router, they might have made a shortcut that ends up working like this.

I ran tcpdump on the prtm0 interface of the modem DGA4130 and looked at the file in wireshark. I also ran wireshark on the port (mirrored) of the port connected to the modem as well as the port connected to the router, they all matched up.

Yeah, that sounds comprehensive enough.

ps I do see broadcasts from the tplink switches in the capture, when looked up the protocol has something to so with the way the switches communicate with the tplink configuration utility.

If my theory is right, then at least you're seeing the packets from the switch that could trigger that behaviour.
Logged

niemand

  • Kitizen
  • ****
  • Posts: 1836
Re: pppoe discovery
« Reply #7 on: December 12, 2017, 09:50:00 PM »

So most things with a modem mode will cache the first MAC address they see and that's all they'll talk to. They have an ARP table with a single entry on the LAN side.

This is probably what's happening to you here as mentioned earlier. There's nothing arcane about PPP particularly, but modems will only learn a single MAC address usually, for obvious reasons - a modem is breaking out traffic from a different protocol that doesn't have any layer 2/3 addressing the modem can use. It doesn't have an IP address to distinguish between destinations, it doesn't even have the luxury of being able to use PPPoE as some providers don't, so needs either some code to snoop traffic and bind a PPP / IPoE / whatever session to the MAC address that initiated it or a simple bind to first MAC address it sees.

Guess which one gets used?  :)
Logged

bilbokitz

  • Reg Member
  • ***
  • Posts: 211
Re: pppoe discovery
« Reply #8 on: December 12, 2017, 10:03:10 PM »

Sounds like were onto a winner just need to figure out how to stop the tplink broadcasting. It looks like there are inherent problems with these easy smart switches.

Can we do a manual bind?  What is the mechanism, like an arp entry?

edit: I think it is a setting called loop detection that has been causing the broadcast as I have switched it off and can no longer detect the broadcast. Now to test when I can switch off the internet.
« Last Edit: December 13, 2017, 12:30:00 AM by bilbokitz »
Logged
Alcatel Cab 200/20 Vectored VDSL 35b - Technicolor DGA4130 Bridged + Asus RT-AC86U Asuswrt-Merlin

WWWombat

  • Kitizen
  • ****
  • Posts: 1674
Re: pppoe discovery
« Reply #9 on: December 13, 2017, 10:25:01 AM »

Loop detection is probably a variant of the spanning tree protocol (STP).

It is used when you deliberately create multiple connections to other switches (loops) for redundancy reasons. STP then blocks the excess connections, leaving them as a standby ready for tailored. Great for enterprise networks. Not so useful here.

It is indeed one of the first packets sent by the switch when a connection is made (is when cable is plugged in).

Are there any other settings to turn on/off?
Logged

bilbokitz

  • Reg Member
  • ***
  • Posts: 211
Re: pppoe discovery
« Reply #10 on: December 13, 2017, 11:07:58 AM »

There must be more to it, I had a slight mare this morning trying to get the internet working. As a test last night I switched the wan connection off on the asus router.

Woke up turned wan connection on again  - PADO Time out
rebooted the asus  - PADO Time out
connected the asus router directly to the technicolor DGA4130  - PADO Time out
 :wall:
Rebooted the modem - PADO Time out 
:wall:  :wall: :wall: :wall:
Plugged in the hg612 - PADO Time out
 :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall:
Turned asus wan connection off / on and it connected phew.

Didn't have time to restore the orginal setup before coming to work but I am sure it will work again when swapped over.

« Last Edit: December 13, 2017, 11:52:02 AM by bilbokitz »
Logged
Alcatel Cab 200/20 Vectored VDSL 35b - Technicolor DGA4130 Bridged + Asus RT-AC86U Asuswrt-Merlin

bilbokitz

  • Reg Member
  • ***
  • Posts: 211
Re: pppoe discovery
« Reply #11 on: December 18, 2017, 02:03:53 PM »

The HG612 works first time, every time now since the last post.
Logged
Alcatel Cab 200/20 Vectored VDSL 35b - Technicolor DGA4130 Bridged + Asus RT-AC86U Asuswrt-Merlin
 

anything