[OpenWrt-Devel] WAN dhcp client doesnt recognize unplugged cable and doesnt request new IP on replugged

Jakub Jančo kubco2 at gmail.com
Fri May 15 05:48:04 EDT 2015


Hello,
After I unplug cable:

ifconfig
eth0      Link encap:Ethernet  HWaddr 14:CC:20:4D:3D:B5
          inet addr:10.1.5.246  Bcast:10.1.5.255  Mask:255.255.255.0
          inet6 addr: fe80::16cc:20ff:fe4d:3db5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:747 errors:0 dropped:0 overruns:0 frame:0
          TX packets:896 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:84708 (82.7 KiB)  TX bytes:487679 (476.2 KiB)
          Interrupt:4

ip link
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP
mode DEFAULT group default qlen 1000
    link/ether 14:cc:20:4d:3d:b5 brd ff:ff:ff:ff:ff:ff

After plug in cable, no change, no logs.

ModelTP-Link TL-WR1043N/ND v2 Firmware Version OpenWrt Barrier Breaker
14.07 / LuCI Trunk (svn-r10472) Kernel Version3.10.49



--
S pozdravom Jakub Janco

2015-05-15 9:34 GMT+02:00 Hans Dedecker <dedeckeh at gmail.com>:

> On Thu, May 14, 2015 at 10:45 PM, Jakub Jančo <kubco2 at gmail.com> wrote:
> > No I havent, I thought it is "Bring on boot" but it is another option.
> So my
> > problem persist.
> > config interface 'wan'
> >     option ifname 'eth0'
> >     option proto 'dhcp'
> >     option metric '1'
> >
> > config interface 'wan6'
> >     option ifname '@wan'
> >     option proto 'dhcpv6'
> >
> > This is my wan config, and after turn off and on lan port on remote
> site, no
> > logs entries.
> netifd relies on events from the kernel to detect link changes; when
> the cable is unplugged the NO_CARRIER flag of eth0 needs to be set
> which can be checked via the ip utility (ip link show) or ifconfig
> (RUNNING flag not set in this case). Further the cmd ubus call
> network.device status dumps the netifd status of the devices
> (including the link state).
>
> Hans
> >
> >
> > 2015-05-14 22:29 GMT+02:00 Hans Dedecker <dedeckeh at gmail.com>:
> >
> >> On Thu, May 14, 2015 at 8:23 PM, Jakub Jančo <kubco2 at gmail.com> wrote:
> >> > Thank you for explanation.
> >> >
> >> > Why does openwrt use force_link on WAN, when it can break internet
> >> > connection and remote access?
> >> > Or what are advantages of force_link?
> >> I don't see any added value of using force_link on a WAN interface
> >> unless you would use a static IP address.
> >> You verified force_link is enabled on the WAN interface for your board ?
> >>
> >> Hans
> >> >
> >> > Thanks.
> >> >
> >> >
> >> > --
> >> > S pozdravom Jakub Janco
> >> >
> >> > 2015-05-14 17:32 GMT+02:00 Hans Dedecker <dedeckeh at gmail.com>:
> >> >>
> >> >> On Wed, May 13, 2015 at 12:35 PM, Conor O'Gorman <i at conorogorman.net
> >
> >> >> wrote:
> >> >> > On 12/05/15 17:57, Jakub Jančo wrote:
> >> >> >>
> >> >> >> Hello,
> >> >> >>
> >> >> >> I have tplink 1043nd with BB
> >> >> >>
> >> >> >> Problem is that I have dhcp client on WAN and if I unplug cable
> from
> >> >> >> WAN, it doesnt change status, give up dhcp address.
> >> >> >>
> >> >> >> Even worse is that if I plug cable with another end point with
> >> >> >> another
> >> >> >> network, WAN dhcp client doesnt  pull new IP, I must click on
> >> >> >> "Connect"
> >> >> >> to refresh dhcp client, then new ip is assigned and internet
> works.
> >> >> >> Or
> >> >> >> restart device.
> >> >> >
> >> >> >
> >> >> > Have a look at ifpugd.
> >> >> >
> >> >> > But maybe netifd should/could/might do something for this scenario?
> >> >> >
> >> >> > Conor
> >> >> > _______________________________________________
> >> >> > openwrt-devel mailing list
> >> >> > openwrt-devel at lists.openwrt.org
> >> >> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >> >> netifd has support for link state changes; the network interface will
> >> >> be brought up/down
> >> >> if the link is active/inactive. However if the force_link parameter
> is
> >> >> enabled for a network
> >> >> interface netifd will ignore link state changes.
> >> >>
> >> >> Hans
> >> >> _______________________________________________
> >> >> openwrt-devel mailing list
> >> >> openwrt-devel at lists.openwrt.org
> >> >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >> >
> >> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150515/706a22ba/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list