aparcar / openwrt

Staging tree of Paul Spooren
Other
8 stars 1 forks source link

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

Open aparcar opened 7 years ago

aparcar commented 7 years ago

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://

//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://

after boot up, with no dhcp running

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

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.

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'

aparcar commented 7 years ago

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?