Hi,
Since everyone seems to like to use the most unusual script with
"original" settings without trying ever to understand what's happening,
I would remind you that there is a more or less "plug-and-play" solution
called amprd...
Let's assume a system with:
- 44net assignment: 44.128.1.0/24
- WAN on eth0 (let's assume 1.2.3.4)
- LAN on eth0 (192.168.1.1/24)
- AMPR on eth2 (44.128.1.0/24)
- We choose our GW IP to be 44.128.1.1
and that the internet access from the system is already set up, with NAT
and default gateway via WAN.
Now:
1. compile (make) and install (make install) amprd
2. create the following /etc/amprd.cfg:
-----------------------------------------------------------------
[ampr0]
prefix = 44.128.1.1
rip_receive = yes
rip_save = yes
-----------------------------------------------------------------
3. Set address 44.128.1.1/24 to your eth2 interface
4. Start amprd. And basically that's it: a fully functional mesh gateway.
If you want access from the internet to your subnet, too, instead of
just starting amprd, create the following ampr startup script:
-----------------------------------------------------------------
amprd
ip route add default via 169.228.34.84 dev ampr0 onlink table default
ip rule add from 44.128.1.1 table default
ip rule add from 44.128.1.1 to 44.128.1.0/24 table main
-----------------------------------------------------------------
This should do the trick.
Marius, YO2LOJ