Re: [homenet] upstream dhcp with hnetd

2017-01-13 Thread Tim Coote
Just to document an approach that avoids the link failure issue:
> On 4 Jan 2017, at 13:55, Tim Coote  wrote:
> 
> 
>> On 18 Sep 2016, at 18:20, Massimiliano Stucchi  wrote:
>> 
>> 
>> 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?
> 
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
___
homenet mailing list
homenet@ietf.org
https://www.ietf.org/mailman/listinfo/homenet


Re: [homenet] upstream dhcp with hnetd

2017-01-04 Thread Tim Coote

> On 18 Sep 2016, at 18:20, Massimiliano Stucchi  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
___
homenet mailing list
homenet@ietf.org
https://www.ietf.org/mailman/listinfo/homenet


Re: [homenet] upstream dhcp with hnetd

2016-09-23 Thread Tim Coote
On 15 Sep 2016, at 11:45, Tim Coote  wrote:
> 
> 
> My ISP requires dhcpv4 parameters to establish a connection, both clientid 
> and vendorid.

Following up this question, I stumbled across this thread from 2015: 
http://bit.ly/2cLUZrV , in which, Steven Barth  noted:

“Additional note:

Do NOT run DHCP or DHCPv6 manually (either server or client) on interfaces you 
run hnet on as this will cause confusion or worse. hnet takes care of anything 
DHCP(v6).”

So I do need to find a way to set those dhcpv4 parameters (options 60 and 61) 
using hnetd.

Is it possible?
Tim

___
homenet mailing list
homenet@ietf.org
https://www.ietf.org/mailman/listinfo/homenet


Re: [homenet] upstream dhcp with hnetd

2016-09-19 Thread Tim Coote

> On 18 Sep 2016, at 18:20, Massimiliano Stucchi  wrote:
> 
> I would suggest moving to head.  I spent an inordinate amount of time
> trying to debug issues I was having with 15.05.1, and then found out
> that upgrading to head made the network more robust.
> 
Thanks for that assurance. Is HEAD always stable enough to at least avoid 
bricking the router? I note that there’s also some enthusiasm for LEDE, but I 
don’t think that all installs of homenet work.

> 
> 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’s pretty much where I got to for pppoe, although I wasn’t (still amn’t?) 
confident that I understand what ‘interface’ does within OpenWRT, especially 
if/how it stacks up use of different ifname’s within /etc/config/network and 
/etc/config/wireless. I have noticed that WAN/LAN and WAN6 have special 
meanings: WAN6 is not aware of all protocols, for instance. There are also 
oddities such as WAN_6 which seem to appear.  I believe that the _orig_ifname 
is an artifact of Luci. But I could be wrong.
> 
> 
> Again, I suggest moving to head.  You'll find more mature code.
Ok. And clearly hnetd in particular will have moved on.

Any insight into how I can get the hnetd use of dhcp to send the clientid and 
vendor class identifiers (options 61 and 60) as these are used by my isp to 
establish the connection? I think that they also have some timing constraints 
relative to dhcpv6 exchange.
> 
> Ciao!
> 
> -- 
> 
> Massimiliano Stucchi
> MS16801-RIPE
> 

Tim

___
homenet mailing list
homenet@ietf.org
https://www.ietf.org/mailman/listinfo/homenet


Re: [homenet] upstream dhcp with hnetd

2016-09-18 Thread Rich Brown
Hi Massimiliano,

I'll happily update the "Installing Homenet..." guide if you could give me a 
few hints about installing a head version of Homenet on OpenWrt 15.05.1. - 
http://www.homewrt.org/installation/hnet-openwrt I will also test the procedure 
before posting, so I know that it worked at least once. :-)

Thanks,

Rich


> On Sep 18, 2016, at 1:20 PM, Massimiliano Stucchi  wrote:
> 
> 
> Hi,
> 
> On 15/09/16 12:45, Tim Coote wrote:
>> 
>> I’m using hnet-full on CC 15.05.1 on Linksys wrt1200ac.
> 
> I would suggest moving to head.  I spent an inordinate amount of time
> trying to debug issues I was having with 15.05.1, and then found out
> that upgrading to head made the network more robust.
> 
>> 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.
> 
>> I’d rather not go through the pain of building from source and adding
>> debug statements, but, if necessary, I will.
> 
> Again, I suggest moving to head.  You'll find more mature code.
> 
> Ciao!
> 
> -- 
> 
> Massimiliano Stucchi
> MS16801-RIPE
> 
> ___
> homenet mailing list
> homenet@ietf.org
> https://www.ietf.org/mailman/listinfo/homenet

___
homenet mailing list
homenet@ietf.org
https://www.ietf.org/mailman/listinfo/homenet


Re: [homenet] upstream dhcp with hnetd

2016-09-18 Thread Massimiliano Stucchi

Hi,

On 15/09/16 12:45, Tim Coote wrote:
> 
> I’m using hnet-full on CC 15.05.1 on Linksys wrt1200ac.

I would suggest moving to head.  I spent an inordinate amount of time
trying to debug issues I was having with 15.05.1, and then found out
that upgrading to head made the network more robust.

> 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.

> I’d rather not go through the pain of building from source and adding
> debug statements, but, if necessary, I will.

Again, I suggest moving to head.  You'll find more mature code.

Ciao!

-- 

Massimiliano Stucchi
MS16801-RIPE



signature.asc
Description: OpenPGP digital signature
___
homenet mailing list
homenet@ietf.org
https://www.ietf.org/mailman/listinfo/homenet


[homenet] upstream dhcp with hnetd

2016-09-15 Thread Tim Coote
Hullo

Still trying to get homenet working :-(

I’m using hnet-full on CC 15.05.1 on Linksys wrt1200ac.
My ISP requires dhcpv4 parameters to establish a connection, both clientid and 
vendorid.

http://www.homewrt.org/about/faq  shows how 
to set clientid by inserting it into (runtime) /lib/netifd/proto/hnet.sh. 
However, the context in the file does not seem to be present ("Between 
json_add_string name “${interface}_4” and json_close_object for IPv4”): neither 
${interface_4}, nor json_close_object. There is no equivalent instruction for 
vendorid.

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 no idea whether it’s related, but hnetd segfaults soon after starting - 
and I cannot find a core file. I can restart hnetd, spot the command running, 
and run that command manually with —loglevel 9 at the end. It ends thus:

hnetd[2736]: Router B0A0B130
hnetd[2736]: hncp_run /usr/sbin/hnetd-routing
hnetd[2736]:  bfsipv6prefix
hnetd[2736]:  fd55:dfae:42ce::/48
hnetd[2735]: Executing PA Routine for no-prefix%excluded-prefixes from 
fd55:dfae:42ce::/48 flags (- - -)
hnetd[2736]:  
hnetd[2735]: No matching rule was found.
hnetd[2735]: platform: *** begin interface update inhnet (wlan0)
hnetd[2735]:Elected(SMPHL): 0, Zone: lan
hnetd[2735]: platform: *** end interface update inhnet (wlan0)
hnetd[2735]: platform: *** begin interface update e06 (eth0)
hnetd[2735]:Elected(SMPHL): 0, Zone: wan
hnetd[2735]: platform: *** end interface update e06 (eth0)
hnetd[2735]: platform: async notify_proto for inhnet: Success
hnetd[2735]: platform: async notify_proto for e06: Success
Segmentation fault

‘inhnet’ is my internal homenet controlled interface (just wlan0). ‘e06’ is the 
hnet controlled interface on eth0. I’m also running pppoe on eth0 to establish 
the ISP connection, so I can imagine that these two are tripping over each 
other.

I’d rather not go through the pain of building from source and adding debug 
statements, but, if necessary, I will.

Tim


___
homenet mailing list
homenet@ietf.org
https://www.ietf.org/mailman/listinfo/homenet