TunnelAnycast

Procedura per la configurazione di un tunnel Anycast con i router di bordo della rete ninux.org di Roma ai fini di distribuire gli indirizzi pubblici nella rete, senza l'uso di policy routing. Chiedere su contatti [AT] ninux [DOT] org l'assegnazione di un indirizzo pubblico <assigned pub ip>

Client side olsr.conf (on nearest olsr node):

#olsr.conf
...
Hna <assigned pub ip> 255.255.255.255
...

client script:

greifname=$1
local_ip=$2
pub_ip=$3
remote_ip=10.0.162.1
ip tunnel add $greifname  mode gre remote $remote_ip local $local_ip ttl 255
ip link set $greifname up
ip addr add $pub_ip dev $greifname
ip rule add from $pub_ip table 115
ip route add default dev $greifname table 115

usage example: tunnel_gre.sh ninuxpub <priv_ipv4> <assigned pub ip>/32

Server side (ON BORDER ROUTER ONLY)

In the olsr.conf file make sure you are announcing the anycast address

#olsr.conf
...
Hna 10.0.162.1 255.255.255.255
...

Server site bash script:

greifname=$1
ip addr add 10.0.162.1/32 dev lo
ip tunnel add $greifname  mode gre local 10.0.162.1 ttl 255
ip link set $greifname up

tunnel script: example: ./bgpsidescript.sh ninuxpub

Video

l'ultima modifica รจ del 2015-10-03 13:56:17, fatta da host49-175-dynamic