[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 08:00:51 EDT 2015


This is my original switch config:

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

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '0t 1 2 3 4'
    option vid '1'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '0t'
    option vid '3'

config switch_vlan
    option device 'switch0'
    option vlan '3'
    option ports '0t'
    option vid '2'

config switch_vlan
    option device 'switch0'
    option vlan '4'
    option vid '4'
    option ports '0t'

config switch_vlan
    option device 'switch0'
    option vlan '5'
    option vid '5'
    option ports '5 6'

But in wiki they say that wan must be vlan2, but I didnt notice difference
if it is on vlan5.

Anyway I revert switch to original config and add force_link=0 for wan:
config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'
        option metric '1'
        option force_link '0'

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option vid '1'
        option ports '0 1 2 3 4'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option vid '2'
        option ports '5 6'




It seems that switch noticed link down on port 5:



$swconfig dev switch0 port 5 show
Port 5:
    mib: Port 5 MIB counters
RxBroad     : 65
RxPause     : 0
RxMulti     : 47
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 310
Rx128Byte   : 960
Rx256Byte   : 101
Rx512Byte   : 16
Rx1024Byte  : 62
Rx1518Byte  : 1
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 149935
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 322
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 668
Tx128Byte   : 493
Tx256Byte   : 135
Tx512Byte   : 9
Tx1024Byte  : 12
Tx1518Byte  : 494
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 715736
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

    pvid: 2
    link: port:5 link:down


Link port 6 stays ON, probably because it is "cpu".



--
S pozdravom Jakub Janco

2015-05-15 12:28 GMT+02:00 Conor O'Gorman <i at conorogorman.net>:

> On 15/05/15 10:48, Jakub Jančo wrote:
>
>> 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
>>
>
> Do you have the switch configured correctly? You can use swconfig to check
> the physical port status.
> http://wiki.openwrt.org/toh/tp-link/tl-wr1043nd
> _______________________________________________
> 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/b270bf86/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