== IPv6 Management SetUp ==

Come abbiamo notato sui device utilizzati in bridge mode con il routing a terra, abbiamo fin'ora configurato solamente un IPv4 per il management del device. 

Vediamo allora come regalargli anche un IPv6.

 
 * Per i device con OpenWRT basterà inserire la relativa parte nel file di configurazione network

localhost@localdomain:~$ vi /etc/config/network

{{{

config interface 'lan'
	option ifname 'eth0'
	option proto 'static'
	option ipaddr '10.CAP.X.Y'
	option netmask '255.255.255.0'
	option gateway '10.CAP.X.Z'
	option ip6addr '2001:4c00:893b:SUBNET::IP/64' ## ip coerente con la propria subnet IPv6
	option ip6gw '2001:4c00:893b:SUBNET::IP_GW' ## ip del gateway IPv6, ovvero del Ground Router
	option dns '10.10.10.10 10.11.12.13 10.11.12.14'

}}}

Il device è pronto e basta riavviarlo.


* Per i device con AirOS con firmware ''flat'' (non SDK) apriamo una shell e, nella cartella /etc/persistent/ aggiungiamo due file

localhost@localdomain:~$ vi /etc/persistent/rc.postsysinit

{{{

echo ipv6 >> /etc/startup.list
cp /etc/persistent/ipv6.conf /etc/sysinit/

}}}


localhost@localdomain:~$ vi /etc/persistent/ipv6.conf

{{{

plugin_start() {
	ip -6 a a 2001:4c00:893b:SUBNET::IP/64 dev eth0
	ip -6 r a default via 2001:4c00:893b:SUBNET::IP_GW
	echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
	true
}
plugin_stop() {
	echo 0 > /proc/sys/net/ipv6/conf/all/forwarding
	true
}

}}}

Ora non resta che salvare con il comando ''save'' e riavviare la macchina con ''reboot''