1

I always used static ip or dhcp configurations in past, and this is what normally happens:

  • when I pull out the cable my interface goes down
  • when I plug back the cable the interface goes back up and in case of dhcp it gets a new ip

This time I moved to pppoe with the autoconfiguration did by debian installer (running the command line modules=ppp-udeb pressing TAB key before running the installer).

What i found is that pppoe interface starts up automatically when the system boot but if i unplug the cable and plug it back the interface is stuck.

The interface is keept up until some kind of timeout happens and there's no way to have the pppoe reconnect and getting a new ip once plugged in back.

How can i fix this? My auto generated /etc/network/interfaces file is the following:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# PPPoE connection
auto provider
iface provider inet ppp
        pre-up /sbin/ifconfig eth0 up
        provider provider

# The primary network interface
allow-hotplug eth0
iface eth0 inet manual

# The secondary network interface used for
allow-hotplug eth1
iface eth1 inet static
        address 192.168.1.1
        netmask 255.255.255.0

I would also ask why the interface name is called provider ?

shouldn't be ppp0 ?

When the system boot and I go in ifconfig the interface is named ppp0 not provider!

user3450548
  • 2,868
  • 2
    I'm voting to close this question as off-topic because, a problem that can't be reproduced as the user explained on my answer comment that the real problem was the configuration of Energy Efficiency of it´s NIC. –  Jan 18 '16 at 13:12
  • 1
    It's still possible that it provides help, it just means the answer needs to be written up as an answer surely? – EightBitTony Jan 18 '16 at 15:16

1 Answers1

2

No.

provider is the file where the ppp configuration is stored, probably at /etc/ppp/peers/provider. It´s somehow a "profile" of your ppp connection. What defines the interface name is the last part of the second line, inet ppp.

To redial automatically your ppp conection, you should add the persist parameter to this provider file.

Aditional documentation:

  • Sadly this is not working for me, if i pull back the cable the pppoe connection never starts again, i have to manually issue this commands in order to have it back: ifconfig eth0 up && pon provider . Could it be that i have to make some kind of complex post-up and post-down scripts to have the pppoe go back auotomatically? – user3450548 Jan 16 '16 at 12:00
  • I think there's a confusion between the disconnect dropped by the provider and what I was talking about: disconnecting and plugging back the ethernet cable on eth0 the interface ppp0 relies on.. – user3450548 Jan 16 '16 at 15:57
  • But the same way, the ppp interface should keep up and retry from time to time...there must be another config –  Jan 16 '16 at 19:00
  • After a real load of time we discovered is a problem with the eee setting of the nic, Energy Efficient Ethernet aka green ethernet, a stupid feature that made the eth0 in a sort of sleep status. I'm trying to disable this feauture but with ethtool on my device this is not working, i will post a new question for it: http://unix.stackexchange.com/questions/255810/turn-down-the-energy-efficient-ethernet-eee-aka-green-ethernet – user3450548 Jan 17 '16 at 02:12
  • An alternative was found by installing the latest driver but for the 8168 nic card, because seemingly in the kernel 3.16 the driver for the 8169 is proposed for 8168 cards for unknown reasons. Moving to 8168 driver or upgrading to kernel 4.3 (that keeps in mind the driver swap written before) solved the problem for me without having to deal with eee setting still unchangeable tho. I understand that this is not a generic question anymore, but someone with the same problem could get benefit of the resolution. I propose to freeze the question rather than completely delete it but it is your call. – user3450548 Jan 19 '16 at 14:39
  • Sounds good. For sure it will help others :) –  Jan 19 '16 at 16:49