PPPOE only works when unplugged and replugged during power cycle

I have been using OpenWrt on my old laptop for about 2 years. It is a simple setup with one interface using PPPOE for internet, and another interface connected to a wifi access point with an ethernet cable. One quirk is that I use 2 USB-to-RJ45 adapters to get gigabit speeds on both these connections.

When a power cut happens, or when I reboot the laptop, it used to work just fine. But for the past couple of months when a reboot occurs, OpenWrt says "USER_REQUEST" in the PPPOE interface. When I unplug

I have to do the following to make it work:

  1. When the laptop is powered off, I unplug the PPPOE connection.
  2. Let it boot and wait for the status of the interface to become "device not found"
  3. Then plug the PPPOE connection back in, and it works fine.

If I unplug the PPPOE connection when the status is "USER_REQUEST", it does not become "device not found". Only the exact above-mentioned sequence of steps works. And this became the case only a couple of months back. Earlier it used to work just fine, and I can't think of any significant changes by me that could have caused this.

Any ideas on what might be happening?

Version - OpenWrt 23.05.0 r23497-6637af95aa / LuCI openwrt-23.05 branch git-23.236.53405-fc638c8

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/firewall
lsusb -t
root@OpenWrt:~# ubus call system board
{
	"kernel": "5.15.134",
	"hostname": "OpenWrt",
	"system": "Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz",
	"model": "Dell Inc. Inspiron 3537",
	"board_name": "dell-inc-inspiron-3537",
	"rootfs_type": "ext4",
	"release": {
		"distribution": "OpenWrt",
		"version": "23.05.0",
		"revision": "r23497-6637af95aa",
		"target": "x86/64",
		"description": "OpenWrt 23.05.0 r23497-6637af95aa"
	}
}
root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd02:931d:28d3::/48'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0'

config device
	option name 'usblan-dev'
	option type 'bridge'
	list ports 'eth1'

config device
	option name 'usbwan-dev'
	option type 'bridge'
	list ports 'eth2'

config interface 'lan'
	option device 'usblan-dev'
	option proto 'static'
	option ipaddr '192.168.0.10'
	option netmask '255.255.255.0'
	list dns '1.1.1.1'

config interface 'wan'
	option proto 'pppoe'
	option device 'usbwan-dev'
	option username 'REDACTED'
	option password 'REDACTED'
	option ipv6 'auto'

config interface 'docker'
	option device 'docker0'
	option proto 'none'
	option auto '0'

config device
	option type 'bridge'
	option name 'docker0'
root@OpenWrt:~# cat /etc/config/firewall 

config defaults
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option synflood_protect '1'

config zone 'lan'
	option name 'lan'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'ACCEPT'
	list network 'lan'
	list device 'tun+'

config zone 'wan'
	option name 'wan'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option masq '1'
	option mtu_fix '1'
	list network 'wan'
	list network 'wan6'

config rule
	option name 'Allow-DHCP-Renew'
	option src 'wan'
	option proto 'udp'
	option dest_port '68'
	option target 'ACCEPT'
	option family 'ipv4'

config rule
	option name 'Allow-Ping'
	option src 'wan'
	option proto 'icmp'
	option icmp_type 'echo-request'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-IGMP'
	option src 'wan'
	option proto 'igmp'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-DHCPv6'
	option src 'wan'
	option proto 'udp'
	option dest_port '546'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-MLD'
	option src 'wan'
	option proto 'icmp'
	option src_ip 'fe80::/10'
	list icmp_type '130/0'
	list icmp_type '131/0'
	list icmp_type '132/0'
	list icmp_type '143/0'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Input'
	option src 'wan'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	list icmp_type 'router-solicitation'
	list icmp_type 'neighbour-solicitation'
	list icmp_type 'router-advertisement'
	list icmp_type 'neighbour-advertisement'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Forward'
	option src 'wan'
	option dest '*'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-IPSec-ESP'
	option src 'wan'
	option dest 'lan'
	option proto 'esp'
	option target 'ACCEPT'

config rule
	option name 'Allow-ISAKMP'
	option src 'wan'
	option dest 'lan'
	option dest_port '500'
	option proto 'udp'
	option target 'ACCEPT'

config zone
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option name 'lan_to_wan'
	list network 'lan'
	list network 'wan'

config forwarding
	option dest 'wan'

config forwarding
	option src 'lan'

config forwarding
	option dest 'wan'

config forwarding
	option src 'lan'

config forwarding
	option src 'lan_to_wan'
	option dest 'wan'

config forwarding
	option src 'lan'
	option dest 'lan_to_wan'

config zone 'docker'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'ACCEPT'
	option name 'docker'
	list network 'docker'

config rule 'ovpn'
	option name 'Allow-RDP'
	option src 'wan'
	option dest_port '3389'
	option target 'ACCEPT'
	list proto 'tcp'
	list proto 'udp'
	list dest_ip '192.168.0.240'

config redirect
	option dest 'lan'
	option target 'DNAT'
	option name 'PC RDP'
	option src 'wan'
	option src_dport '3389'
	option dest_ip '192.168.0.239'
	option dest_port '3389'

config redirect
	option dest 'lan'
	option target 'DNAT'
	option name 'test'
	option src 'wan'
	option src_dport '1338'
	option dest_ip '192.168.0.239'
	option dest_port '1338'
root@OpenWrt:~# lsusb -t
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    |__ Port 1: Dev 2, If 0, Class=, Driver=r8152, 5000M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/9p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=, Driver=hub/8p, 480M
        |__ Port 4: Dev 6, If 0, Class=, Driver=r8152, 480M
        |__ Port 5: Dev 3, If 0, Class=, Driver=, 12M
        |__ Port 5: Dev 3, If 1, Class=, Driver=, 12M
        |__ Port 7: Dev 4, If 0, Class=, Driver=, 480M
        |__ Port 8: Dev 5, If 0, Class=, Driver=, 480M
        |__ Port 8: Dev 5, If 1, Class=, Driver=, 480M
root@OpenWrt:~# 

USB tops out at 480 Mbps, so will not allow full gigabit, but likely substantially more then FastEthernet's100 Mbps.

Mmmh, have you tried something like:

/etc/init.d/network restart
/etc/init.d/firewall restart

After unplugging the 'pppoe dongle' and before reinserting it?

That makes sense. Since my internet speed is only 400mbps, it didn't strike me that it wasn't reaching gigabit speeds.

I just tried this. It didn't seem to work, but there's a different behavior. When the status is "USER_REQUEST" and run the network restart command, Luci stops showing any status for the PPPOE interface. It's just the mac address, 0bits/s speed, and no status.

While I was trying this, I also noticed that this issue occurs only when the power to the laptop is cut abruptly. I mistook it as something that happens with reboot as well. When I reboot from Luci / CLI, it seems to work fine. But when I unplug the laptop from power, plug it back in, and power it on, the issue occurs.

I tried with different USB ports as well. I wonder if this is a problem with the USB ports/controller, since the laptop is almost a decade old. But I'm not too sure about that.

Mmmh, generally do other USB devices also suffer? E.g. if you plug in a keyboard will that also behave oddly?

Have you investigated the possibility that devices eth0 (not used) and eth2 sometimes swap names during boot?

2 Likes

They seem to work fine, although the port needs some jamming in.

That was a great idea, thank you. I checked, and it indeed seems to be a problem.

I deleted the bridge interface I had for eth0 which was not in use. But still, the problem occurs because OpenWrt tries to use the LAN connection for PPPOE and vice versa. I'm trying to figure out how to configure it so that OpenWrt knows which one is which at the time of reboot.

Solved it!

This seems to be a problem when using USB-to-RJ45 adapters. OpenWrt does not automatically bind the device configurations to the USB adapters persistently.

Here's the solution - Stable network interface names for USB Ethernet Dongles - #18 by bobafetthotmail

Thank you so much @moeller0 and @pavelgl for the help!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.