Configurare tinc seguendo la pagina IsoleVPNBGP#Configurare_Tinc
vi /etc/bird4.conf
log syslog all; #SE NON SI VUOLE LOGGARE SI PUO' COMMENTARE # Override router ID router id 10.89.1.254; #INSERIRE IP LOCALE DELLA MACCHINA CHE TIENE IL BGP # This pseudo-protocol performs synchronization between BIRD's routing # tables and the kernel. You can run multiple instances of the kernel # protocol and synchronize different kernel tables with different BIRD tables. protocol kernel { scan time 20; # Scan kernel routing table every 20 seconds import none; # Default is import all export filter { krt_prefsrc = 10.89.1.254; # Set SRC for routes added by BIRD if net ~ 172.16.0.0/12 then accept; #INSERIRE LE SUBNET CHE SI VOGLIONO ACCETTARE (LE 3 DI NINUX) if net ~ 192.168.0.0/16 then accept; if net ~ 10.0.0.0/8 then accept; else reject; }; } # This pseudo-protocol watches all interface up/down events. protocol device { scan time 10; # Scan interfaces every 10 seconds } protocol static reggio_bgp { #DARE IL NOME CHE SI VUOLE route 10.89.0.0/16 reject; #AGGIUNGI I PREFISSI DELL'ISOLA route 172.17.89.0/24 reject; } protocol bgp { import all; export where proto = "reggio_bgp"; #RICHIAMARE IL NOME DATO AL BGP QUALCHE RIGA SU local as 64516; #INSERIRE IL NOSTRO AS neighbor 10.150.254.4 as 64512; #INSERIRE AS E IP DEL BGP DI ROMA (O DI QUELLO A CUI CI COLLEGHIAMO) source address 10.150.254.7; # What local address we use for the TCP connection }
vi /etc/config/olsrd
Alla classica configurazione di olsrd aggiungiamo in coda l'annuncio delle tre subnet
config Hna4 option netaddr '10.0.0.0' option netmask '255.0.0.0' config Hna4 option netaddr '172.16.0.0' option netmask '255.240.0.0' config Hna4 option netaddr '192.168.0.0' option netmask '255.255.0.0'