Skip to content

Homenet implementation's core package (with the main Lua code, shell scripts, etc). Note that this is long deperecated, see http://www.homewrt.org for the new effort.

License

Notifications You must be signed in to change notification settings

fingon/hnet-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Author:        Markus Stenberg <[email protected]>, cisco Systems, Inc.
Created:       Tue Nov  6 16:10:45 2012 mstenber
Last modified: Thu May  2 13:34:48 2013 mstenber
Edit time:     42 min

hnet (core) package

(c) cisco Systems, Inc., 2012

License: See COPYING - GPLv2.

This package provides implementation of IP routing, prefix assignment and service discovery for a home network consisting of multiple routers connected to multiple service providers. Implementation is based upon (but not limited to) the following IETF Internet Draft documents being discussed within the IETF Homenet Working Group:

Features

  • Partial duplicate router ID detection (some parts of it have to happen elsewhere, as we only handle the LSAs that have been accepted by the OSPFv3 implementation; Bird with external LSA support has the rest)

  • Prefix assignment algorithm (for IPv4, IPv6)

  • DHCP, DHCPv6 option propagation

  • IPv4 address assignment for routers

  • Source routing which works for multihoming

Contents

  • elsa_pa.lua - entry point for the external LSA handling code within Bird with external LSA support. The contents of this repository should be within LUA_PATH for it to work.

  • pm.lua - stand-alone prefix manager process, which receives state information from within OSPF process, and configures the assorted daemons on a system, as well as IPv4 addresses, IPv6 routes, ..

Requirements on a device

Currently the code depends on Lua 5.1 being available. While some of the third-party Lua modules required are included within this package under thirdparty/, some others are also needed:

  • luasocket, which is only C-based hard dependency within Lua code

  • vstruct

  • md5 is optional - but makes things much faster

In addition to this package, some other packages are needed:

  • Bird with external LSA support

  • ISC dhclient

  • rdisc6 to find next hop

  • iproute2 tool (ip)

  • ISC DHCPv4 server - if DHCPv4 address assignment on homenet links is desired

  • ISC DHCPv6 server - if stateless/stateful DHCPv6 is desired on homenet links

  • radvd

How to run the unit tests

Only the lua dependencies mentioned earlier, and busted testing framework is needed. To install Lua on typical Debian derivative:

apt-get install luarocks liblua5.1-dev

Typically, convenient way of doing this is on a host is just to use luarocks:

luarocks install busted
luarocks install luasocket
luarocks install md5 # optional
luarocks install luacov # optional

.. and then just 'make', assuming state machine compiler is available somewhere within PATH.

How to run on a Linux device

Disclaimer: This repository contains just the source code, and some utility scripts for hnet. An OpenWrt feed, which makes this easier to install, exists, but hasn't been published yet (it also packages Bird with external LSA support, md5, and other lua dependencies OpenWrt does not yet provide).

Anyway, here's some notes..

  • This package's contents need to be in LUA_PATH, of a Bird with external LSA support.

  • The pm.lua should be started separately.

  • ISC DHCPv6 client with prefix delegation should be started on all upstream interfaces (e.g. dhclient -nw -P ). The dhclient should provide learned prefix information, and next hop router information to elsa_pa using skvtool.lua stand-alone key-value manipulation tool, like this:

skvtool.lua pd-prefix.eth0=2001:db8::/56

skvtool.lua pd-prefix.nh=aa:bb:cc:dd:ee:ff

Additionally many other DHCPv4/v6 fields can be passed along too; see elsa_pa.lua for a list.

Credits

  • Ole Troan [email protected] - a lot of input on how some aspects of the system should work.

  • Mark Townsley [email protected] - for driving ambitious set of goals even for the initial release.

  • Dave Tath [email protected] - for providing all the input on OpenWrt and open source packages to use at the start of this effort, and insights on state of Linux.

  • Jari Arkko [email protected] - bugfixing help with the implementation.

  • edderick@github - bug report on OSPF AC TLV handling.

About

Homenet implementation's core package (with the main Lua code, shell scripts, etc). Note that this is long deperecated, see http://www.homewrt.org for the new effort.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published