Modify

Opened 6 years ago

Closed 5 years ago

Last modified 4 years ago

#11679 closed defect (fixed)

WAN interface auto disabled when DHCP lease expires

Reported by: Cristian Deluxe <djcristiandeluxe@…> Owned by: nbd
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: dhcp wan disabled down interface lease Cc:

Description

Hello, for some versions, when the DHCP lease expires on the WAN interface, the interface will be auto disabled, the WAN LED is off, and does not restart until you get up the interface manually or reboot the router.

Here's my log tested with TP-Link WRT740N v1/v4, last time today with r32376

############################ I'VE SET MY DHCP LEASE TIME TO 15 MIN ############################ 

Jun 15 10:37:51 OPENWRT daemon.notice netifd: Interface 'wan' is now up
Jun 15 10:37:51 OPENWRT daemon.info dnsmasq[1420]: reading /tmp/resolv.conf.auto
Jun 15 10:37:51 OPENWRT daemon.info dnsmasq[1420]: using nameserver 91.232.76.10#53
Jun 15 10:37:51 OPENWRT daemon.info dnsmasq[1420]: using nameserver 8.8.8.8#53
Jun 15 10:37:51 OPENWRT daemon.info dnsmasq[1420]: using nameserver 8.8.4.4#53
Jun 15 10:37:51 OPENWRT daemon.info dnsmasq[1420]: using nameserver 208.67.220.220#53
Jun 15 10:37:51 OPENWRT daemon.info dnsmasq[1420]: using nameserver 208.67.222.222#53
Jun 15 10:37:51 OPENWRT daemon.info dnsmasq[1420]: using local addresses only for domain lan
Jun 15 10:37:53 OPENWRT user.notice ifup: Allowing Router Advertisements on wan (eth1)
Jun 15 10:37:54 OPENWRT user.info firewall: adding wan (eth1) to zone wan
Jun 15 10:37:54 OPENWRT daemon.notice miniupnpd[3557]: received signal 15, good-bye
Jun 15 10:37:55 OPENWRT user.info syslog: SNet version started
Jun 15 10:37:55 OPENWRT daemon.notice miniupnpd[4119]: HTTP listening on port 5000
Jun 15 10:37:55 OPENWRT daemon.notice miniupnpd[4119]: Listening for NAT-PMP traffic on port 5351
Jun 15 10:37:55 OPENWRT user.notice miniupnpd: adding firewall rules for eth1 to zone wan

############################ LEASE EXPIRED ############################ 

Jun 15 10:51:55 OPENWRT daemon.notice netifd: Interface 'wan' has lost the connection
Jun 15 10:51:55 OPENWRT daemon.err miniupnpd[4119]: ioctl(s, SIOCGIFADDR, ...): Cannot assign requested address
Jun 15 10:51:55 OPENWRT daemon.err miniupnpd[4119]: Failed to get IP for interface eth1
Jun 15 10:51:55 OPENWRT daemon.warn miniupnpd[4119]: SendNATPMPPublicAddressChangeNotification: cannot get public IP address, stopping

############################ INTERFACE LOST ############################ 

Jun 15 10:51:55 OPENWRT kern.info kernel: [ 1357.510000] eth1: link down
Jun 15 10:51:55 OPENWRT user.info firewall: removing wan (eth1) from zone wan
Jun 15 10:51:56 OPENWRT user.notice miniupnpd: removing firewall rules for eth1 from zone wan
root@OPENWRT:/# cat /etc/config/network

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

config interface 'lan'
        option ifname 'eth0'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.2.1'
        option stp '1'

config interface 'wan'
        option ifname 'eth1'
        option proto 'dhcp'
        option hostname 'OPENWRT'

config switch
        option name 'eth0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'eth0'
        option vlan '1'
        option ports '0 1 2 3 4'
root@OPENWRT:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr F8:D1:11:3C:CE:77
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7638 errors:0 dropped:48 overruns:0 frame:0
          TX packets:9324 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:978533 (955.5 KiB)  TX bytes:3062633 (2.9 MiB)

eth0      Link encap:Ethernet  HWaddr F8:D1:11:3C:CE:77
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7748 errors:0 dropped:13 overruns:0 frame:0
          TX packets:10396 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1102290 (1.0 MiB)  TX bytes:3118371 (2.9 MiB)
          Interrupt:5

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:73 errors:0 dropped:0 overruns:0 frame:0
          TX packets:73 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5156 (5.0 KiB)  TX bytes:5156 (5.0 KiB)

Tell me if need something more, I've a router in this status rigth now. Thanks

Attachments (0)

Change History (10)

comment:1 Changed 6 years ago by jow

  • Owner changed from developers to nbd
  • Status changed from new to assigned

comment:2 Changed 6 years ago by Whitelighter

I have a similar problem when using pppoe (r32500)

Jul  4 13:43:29 RouterBoard daemon.info pppd[718]: LCP terminated by peer
Jul  4 13:43:29 RouterBoard daemon.info pppd[718]: Connect time 12.2 minutes.
Jul  4 13:43:29 RouterBoard daemon.info pppd[718]: Sent 14041681 bytes, received 888810 bytes.
Jul  4 13:43:29 RouterBoard daemon.notice netifd: Interface 'wan' has lost the connection
Jul  4 13:43:29 RouterBoard kern.info kernel: [  770.130000] eth1: link down
Jul  4 13:43:29 RouterBoard daemon.notice pppd[718]: Modem hangup
Jul  4 13:43:29 RouterBoard daemon.notice pppd[718]: Connection terminated.
Jul  4 13:43:29 RouterBoard daemon.info pppd[718]: Connect time 12.2 minutes.
Jul  4 13:43:29 RouterBoard daemon.info pppd[718]: Sent 14041681 bytes, received 888810 bytes.
Jul  4 13:43:30 RouterBoard user.info firewall: removing wan (pppoe-wan) from zone wan
Jul  4 13:43:59 RouterBoard daemon.err pppd[718]: error sending pppoe packet: Network is down
Jul  4 13:43:59 RouterBoard daemon.err pppd[718]: error receiving pppoe packet: Network is down
Jul  4 13:44:04 RouterBoard daemon.err pppd[718]: error sending pppoe packet: Network is down
Jul  4 13:44:09 RouterBoard daemon.err pppd[718]: error sending pppoe packet: Network is down
Jul  4 13:44:14 RouterBoard daemon.warn pppd[718]: Timeout waiting for PADO packets
Jul  4 13:44:14 RouterBoard daemon.err pppd[718]: Unable to complete PPPoE Discovery

comment:3 follow-up: Changed 6 years ago by jow

That is neither related nor similar.

comment:4 in reply to: ↑ 3 Changed 6 years ago by anonymous

Replying to jow:

That is neither related nor similar.

Sorry, I should have explained a little further. I believe it is related as in both cases the interface link is being shutdown on loss of connection.

Jun 15 10:51:55 OPENWRT daemon.notice netifd: Interface 'wan' has lost the connection
Jun 15 10:51:55 OPENWRT kern.info kernel: [ 1357.510000] eth1: link down
and
Jul  4 13:43:29 RouterBoard daemon.notice netifd: Interface 'wan' has lost the connection
Jul  4 13:43:29 RouterBoard kern.info kernel: [  770.130000] eth1: link down

As a result of the interface being down, neither dhcp nor pppoe can re-establish a link. I suspect the problem is in netifd, but I'm not familiar enough with it to trace it through.

Hope that helps clear things up.

comment:5 Changed 6 years ago by TallFurryMan

It's quite difficult for me to understand what exactly causes the "Timeout waiting for PADO packets".

From what I could gather:

  • PADO packets won't appear if the modem still has a PPPoE connection running, but the router cannot use it anymore.
    • In some cases the ISP will decide the client is gone and close the connection by itself, and the router will reopen it automatically.
    • In other cases that situation remains locked up.
  • The ISP renewing the DHCP lease is a frequent cause of this.
    • Most cases had their iptables configured to allow UDP:68 packets.
    • Some cases have the ISP renewing a static IP.
    • Most cases have the wan interface set to pppoe, no static IP set between the modem and the router.
  • Other ideas:
    • VLAN switch ports changing output
    • cloned MAC addresses
    • DSL line desyncs
    • link keepalive too low

Any expert could clarify that situation? What happens exactly? What debug information is useful?

comment:6 Changed 6 years ago by TallFurryMan

Sorry, comment #5 is not close enough to the issue described.
There's clearly a relation with DHCP, but the chain may be different.
I'll post a forum thread instead.

comment:7 Changed 6 years ago by anonymous

I have the same problem on TP-Link TL-WR740N/ND v4 r32130 (trunk). Sometimes WAN interface lose ip address. I must click connect to get IP address from modem.

comment:8 Changed 5 years ago by anonymous

could also this bug have been fixed with r33325 ?

comment:9 Changed 5 years ago by nbd

  • Resolution set to fixed
  • Status changed from assigned to closed

yes, I think so.

comment:10 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.