Italiano English
Modifica History Actions

Differenze per "TunnelAnycast"

Differenze tra le versioni 1 e 2
Versione 1 del 2015-10-03 07:22:00
Dimensione: 194
Autore: nino
Commento:
Versione 2 del 2015-10-03 07:25:14
Dimensione: 1086
Autore: nino
Commento:
Le cancellazioni sono segnalate in questo modo. Le aggiunte sono segnalate in questo modo.
Linea 2: Linea 2:



'''Server side'''
In the olsr.conf file make sure you are announcing the anycast address
{{{
Hna 10.0.162.1 255.255.255.0
}}}

Server site bash script:
{{{
#!/bin/bash
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


'''Client side'''
olsr.conf (on nearest olsr node):
{{{
... Hna <assigned pub ip> 255.255.255.255 ...
}}}
client script:

{{{
#!/bin/bash

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

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.

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

Hna 10.0.162.1 255.255.255.0

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

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

... 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