(machine (address "01:40/5010-A3F.0") ; router's address (to access admin panel) (address "01:40/5010-A40.0") ; another adress (to access admin panel) ) ;; A 100MBit interface uplink from ;; Clients from floor 2 using only this connection (interface "wan0" (phys-location "00:00:01") (address "01:40/5010-A3F") (mtu 2048u) ; 2 kiB (address-mask "01:40/5010-(A3F-A4A)") ) ;; A 1Gbit interface uplink from (interface "wwan1" (phys-location "00:00:02") (address "01:40/5010-A3F") (mtu 2048u) (address-mask "01:40/5010-(A3F-A4A)") ) ;; All client machines connected to router (floor 1) (interface "lan0" (phys-location "00:01:01") (address "01:40/5010-A3F") (mtu 2048u) (address-mask "01:40/5010-A3F.(0-FFFF)") ) ;; All client machines connected to router (floor 2) (interface "lan1" (phys-location "00:01:02") (address "01:40/5010-A40") (mtu 2048u) (address-mask "01:40/5010-A40.(0-FFFF)") ) ;; Route announcement ;; Clients on lan0 would receive: ;; to: 01:40/5010-(A3F-A40) metric: 1 ;; to: 01:40/5010-any metric 1 ;; to: any metric 1 (route-table "global" (interface-alias "lan0" ; announce the following routes on interface lan0 (route-to "01:40/5010-(A3F-A40).*" (metric 1u) ) (route-to "01:40/5010-*" (via "wan0") (metric auto) ) ; routing globally to whole internet (route-to "*" (via "wwan1") (metric auto) ) ) (interface-alias "lan1" (route-to "01:40/5010-(A3F-A40).*" (metric 1u) ) (route-to "*" (via "wan0") (metric auto) ) ; do not route to global internet via wwan1 ) ;; inbound routing ;; announce to uplink that we have something on our network ;; if there are any machines that is local only then don't announce the ;; adress to uplink, so no route to host would be returned by uplink for the ;; remote host. (interface-alias "wan0" (route-to "01:40/5010-A3F.*" (via "lan0") (metric 1u) ) (route-to "01:40/5010-A40.*" (via "lan1") (metric 1u) ) ) (interface-alias "wwan1" (route-to "01:40/5010-A3F.*" (via "lan0") (metric 1u) ) ; no route to lan1 members via this interface ) )