Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#765 - Ethernet Carrier does NOT trigger Hotplug Event on TPLink CPE510 (DHCP not working) #5739

Open
openwrt-bot opened this issue May 6, 2017 · 1 comment
Labels

Comments

@openwrt-bot
Copy link

Bluse:

Hi all,

//Symptoms of the Problem://
In our Freifunk Mesh we do operate several TPLink CPE510 as mesh routers in combination with a CPE210 as AP. The DHCP server of dnsmasq got not started on the ethernet interfaces and hence no clients get a lease.

//Setup://

  • Hardware: The Mesh CPE510 & the AP CPE210 are in a daisy-chain setup: PoE power supply comes into the CPE510 via LAN, the WAN port is connected to the CPE210 LAN port. When the CPE510 boots up it triggers a script that sets the GPIO pins for PoE path-through on the CPE510's WAN port to power-up the connected CPE210.

  • Software: latest LEDE trunk 4094

//Current Workaround://
Trigger "ifup lan" after 60sec timeout by /etc/rc.local in order to get the DHCP ranges applyed to the ethernet interfaces

//Troubleshooting://

  • compare output of /etc/init.d/dnsmasq after booting and after manually triggering the "ifup lan" event:

after boot up, with no dhcp running

  • local stamp=/var/run/dnsmasq.cfg02411c.eth0.1.dhcp
  • local rv=0
  • [ -s /var/run/dnsmasq.cfg02411c.eth0.1.dhcp ]
  • devstatus eth0.1
  • jsonfilter -e @.carrier
  • return 1
  • return 0

after "ifup lan", where dhcp is properly working
+ local stamp=/var/run/dnsmasq.cfg02411c.eth0.1.dhcp

  • local rv=0
  • [ -s /var/run/dnsmasq.cfg02411c.eth0.1.dhcp ]
  • jsonfilter -e @.carrier
  • devstatus eth0.1
  • udhcpc -n -q -s /bin/true -t 1 -i eth0.1
    udhcpc: started, v1.26.2
    udhcpc: sending discover

So while booting of the CPE510, there is not yet a ethernet carrier, hence no dhcp is started. But there seems to be the hotplug event missing once the attached CPE210 is booted up.

  • add debug output to the hotplug events leeds to:
    hotplug: block

TYPE: block ACTION: add INTERFACE: DEVICE:
TYPE: block ACTION: add INTERFACE: DEVICE:
TYPE: block ACTION: add INTERFACE: DEVICE:
TYPE: block ACTION: add INTERFACE: DEVICE:
TYPE: block ACTION: add INTERFACE: DEVICE:
TYPE: net ACTION: add INTERFACE: tunl0 DEVICE:
TYPE: net ACTION: add INTERFACE: ifb0 DEVICE:
TYPE: net ACTION: add INTERFACE: ifb1 DEVICE:
TYPE: ieee80211 ACTION: add INTERFACE: DEVICE:
TYPE: net ACTION: add INTERFACE: wlan0 DEVICE:
TYPE: net ACTION: add INTERFACE: eth0.7 DEVICE:
TYPE: iface ACTION: ifup INTERFACE: evergate DEVICE: roaming0 roaming0
TYPE: net ACTION: add INTERFACE: roaming0 DEVICE:
TYPE: net ACTION: add INTERFACE: eth0.1 DEVICE:
TYPE: net ACTION: remove INTERFACE: wlan0 DEVICE:
TYPE: net ACTION: add INTERFACE: wlan0 DEVICE:
TYPE: firewall ACTION: add INTERFACE: lan DEVICE: eth0.1 eth0.1
TYPE: firewall ACTION: add INTERFACE: evergate DEVICE: roaming0 roaming0
TYPE: firewall ACTION: add INTERFACE: mesh0 DEVICE: wlan0 wlan0
TYPE: iface ACTION: ifup INTERFACE: lan DEVICE: eth0.1 eth0.1
TYPE: firewall ACTION: remove INTERFACE: lan DEVICE: eth0.1 eth0.1
TYPE: firewall ACTION: remove INTERFACE: mesh0 DEVICE: wlan0 wlan0
TYPE: firewall ACTION: remove INTERFACE: evergate DEVICE: roaming0 roaming0
TYPE: firewall ACTION: add INTERFACE: lan DEVICE: eth0.1 eth0.1
TYPE: firewall ACTION: add INTERFACE: mesh0 DEVICE: wlan0 wlan0
TYPE: firewall ACTION: add INTERFACE: evergate DEVICE: roaming0 roaming0
TYPE: iface ACTION: ifup INTERFACE: loopback DEVICE: lo lo
TYPE: iface ACTION: ifup INTERFACE: mesh0 DEVICE: wlan0 wlan0
TYPE: firewall ACTION: remove INTERFACE: lan DEVICE: eth0.1 eth0.1
TYPE: firewall ACTION: remove INTERFACE: mesh0 DEVICE: wlan0 wlan0
TYPE: firewall ACTION: remove INTERFACE: evergate DEVICE: roaming0 roaming0
TYPE: firewall ACTION: add INTERFACE: lan DEVICE: eth0.1 eth0.1
TYPE: firewall ACTION: add INTERFACE: mesh0 DEVICE: wlan0 wlan0
TYPE: firewall ACTION: add INTERFACE: evergate DEVICE: roaming0 roaming0
CPE210 via gpio poe truned on

After the CPE210 got powered up via gpio & PoE pass-through, there is no further hotplug event triggered, as someone would expect.
So maybe swconfig for that device is not working properly ?

Any hints how to solve that problem ?

GReetings from Berlin
Bluse

///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 globals 'globals'
option ula_prefix 'fd1b:ca05:dc2e::/48'

config interface 'lan'
option ifname 'eth0.1'
option proto 'static'
option ipaddr '10.14.4.1'
option netmask '255.255.255.0'

config interface 'evergate'
option ifname 'roaming0'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.0.0'

config device 'roaming0'
option ifname 'eth0.7'
option name 'roaming0'
option type 'macvlan'
option macaddr 'AA:BB:CC:DD:EE:77'

config interface 'mesh0'
option proto 'static'
option ipaddr '10.14.10.4'
option netmask '255.0.0.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 '4t 0t'

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

///etc/config/dhcp//

config dnsmasq
option domainneeded '1'
option boguspriv '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option sequential_ip '1'
option allservers '1'
option noping '0'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
option localservice '0'
option cachesize '8192'
option cachelocal '1'
list server '8.8.8.8'
list server '8.8.4.4'
list server '208.67.222.222'
option nonwildcard '0'

config dhcp 'lan'
option interface 'lan'
option start '10.14.4.100'
option limit '100'
option leasetime '1h'
list dhcp_option '3,10.14.4.1'
list dhcp_option '6,10.14.4.1'

config dhcp 'mesh'
option interface 'mesh0'
option ignore '1'

config dhcp 'evergate'
option interface 'evergate'
option start '192.168.14.100'
option limit '100'
option leasetime '1h'
list dhcp_option '3,192.168.1.1'
list dhcp_option '6,192.168.1.1'

@openwrt-bot
Copy link
Author

bjonglez:

Commit https://git.lede-project.org/?p=source.git;a=commit;h=a1681ce39bbbab20c46150ee28b63351396662c2 replaced the iface hotplug script with a procd trigger. Not sure if it changes anything though.

Was your setup working correctly in an earlier version of LEDE or OpenWRT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant