I was trying to do everything from /etc/network/interfaces, but maybe that's a bad idea.
I have three interfaces in my router 1) eth0 to my ISP 2) eth1 to my regular home network 3) wlan0 for AMPRnet
Configuration:
auto ampr0 iface ampr0 inet static address 10.1.1.1 netmask 255.255.255.0 broadcast 10.1.1.255 # Bring up Tunnel pre-up iptunnel add ampr0 mode ipip local 108.160.233.78 ttl 255 # Shutdown Tunnel post-down iptunnel del ampr0 # Enable Multicast so we can recieve routing adverts up ifconfig ampr0 multicast # Tell packets destined for AMPRnet to use routing table 44 up ip rule add to 44.0.0.0/8 table 44 priority 44 || true # Tell packets from our local AMPRnet subnet to use routing table 44 up ip rule add from 44.50.128.0/24 table 44 priority 45 || true # Send packets from local AMPRnet out wireless link up ip route add 44.50.128.0/24 dev wlan0 table 44 || true # Send all unknown outgoing AMPRnet packets to global gateway up ip route add default dev ampr0 via 169.228.66.251 onlink table 44 || true # STart AMPRnet routing daemon up ampr-ripd -s -i ampr0 -a 44.50.128.1 -t 44 -p PassWord
On Sun, Aug 11, 2013 at 11:50 PM, Marius Petrescu marius@yo2loj.ro wrote:
(Please trim inclusions from previous messages) _______________________________________________ Hi Neil,
You should call a script like below e.g. from /etc/rc.local, assuming that
- your wlan0 is up and running
- your tunnel is called ampr0 and you want to use table 44 (why?)
- use 44.50.128.1 as the gw interface ip
ip tun add ampr0 mode ipip local 108.160.233.78 <----- replace with your external interface ip if behind a router ip addr add 44.50.128.1/8 dev ampr0 ip route add default via 169.228.66.251 dev ampr0 onlink table default ip rule add from 44.50.128.1 table default ip rule add from 44.50.128.1 to 44.0.0.0/8 table 44 ip rule add to 44.0.0.0/8 table 44
route add 44.50.128.0/24 dev wlan0 table 44
ampr-ripd -s -i ampr0 -p ThePassWord -t 44 -a 108.160.233.78 <---- or rip44d without the '-s' option
And delete the content of /var/lib/ampr-ripd before the first run so it starts fresh....
This should do it...
Marius, YO2LOJ
44Net mailing list 44Net@hamradio.ucsd.edu http://hamradio.ucsd.edu/mailman/listinfo/44net http://www.ampr.org/donate.html