Subject: Re: [homenet] upstream dhcp with hnetd

From: Tim Coote <[email-masked]>
Date: Wed, 4 Jan 2017 13:55:42 +0000

> On 18 Sep 2016, at 18:20, Massimiliano Stucchi <[email-masked]> wrote:
> 
Quick response from me, eh?
> 
>> Additionally, this is an ADSL connection so I need a pppoe connection to
>> my external modem, including a username/password. What’s the canonical
>> way to add this extra step with hnetd?  I can add it to a uci interface
>> (even an interface not called WAN) and the connection is made, but I
>> don’t know whether this will interfere with hnet. 
> 
> I have a similar situation, although on a fiber connection that requires
> PPPoE for IPv4.  I solved it like this:
> 
> config interface 'homenet4'
> 	option ifname 'eth0.6'
> 	option proto 'pppoe'
> 	option username 'username'
> 	option password 'password'
> 
> config interface 'homenet4ext'
> 	option ifname 'pppoe-homenet4'
> 	option proto 'hnet'
> 	option mode 'external'
> 	option _orig_ifname 'pppoe-homenet4'
> 
> Basically, you "piggyback" on the interface created by PPPoE to use it
> for hnet.

That approach made great strides. However, when my ISP resets the dsl link, IPv4 disappears from my internal networks. I can still log into the router over ipv6 (usually). If I do get onto the router, than restarting the network is usually sufficient, although sometimes the wifi does not restart at all. 

My guess is that there’s  a missing hook somewhere to hnetd and deleted subnets are not getting re-added. I’ve not managed to spot where in the reams of log data. I can at least reproduce the issue by resetting the modem (which is external to the router).

Is this a problem that you’ve encountered?

Tim

---

From: Tim Coote <[email-masked]>
Date: Fri, 13 Jan 2017 10:05:41 +0000

Just to document an approach that avoids the link failure issue:
> On 4 Jan 2017, at 13:55, Tim Coote <[email-masked]> wrote:
> 
> 
I got help on this from the openwrt-devel list. The second interface should use an ifname that’s an alias of the first (whatever that means). In this case that would be @homenet4, rather than pppoe-homenet4.

I confirmed that with this change, bouncing the first interface restores the ipv4 for the second and restores a comparable ifstatus result to a reboot.

Tim