doc:appunti:net:ipv6
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:appunti:net:ipv6 [2013/03/11 10:33] – [Shorewall6: iptables con IPv6] niccolo | doc:appunti:net:ipv6 [2019/08/26 11:06] (current) – [Configurazione automatica] niccolo | ||
|---|---|---|---|
| Line 34: | Line 34: | ||
| ip -6 route add < | ip -6 route add < | ||
| ip -6 route del < | ip -6 route del < | ||
| - | ip -6 route add default via < | + | ip -6 route add default via < |
| - | ip -6 route del default via < | + | ip -6 route del default via < |
| </ | </ | ||
| Line 49: | Line 49: | ||
| Quindi se esiste un host che annuncia la configurazione IPv6 (ad esempio un host GNU/Linux che esegue **radvd**, //Router Advertisement Daemon//), gli host nella stessa LAN si assegnano automaticamente un indirizzo IPv6 valido (ma non il default gateway). | Quindi se esiste un host che annuncia la configurazione IPv6 (ad esempio un host GNU/Linux che esegue **radvd**, //Router Advertisement Daemon//), gli host nella stessa LAN si assegnano automaticamente un indirizzo IPv6 valido (ma non il default gateway). | ||
| + | |||
| + | Per modificare uno di quei parametri creare un file **/ | ||
| + | |||
| + | < | ||
| + | net.ipv6.conf.eth1.accept_ra=0 | ||
| + | </ | ||
| + | |||
| + | Per rendere immediatamente attive le modifiche: | ||
| + | |||
| + | < | ||
| + | cat / | ||
| + | 1 | ||
| + | sysctl --system | ||
| + | cat / | ||
| + | 0 | ||
| + | </ | ||
| ===== Configurazione manuale ===== | ===== Configurazione manuale ===== | ||
| Line 243: | Line 259: | ||
| </ | </ | ||
| - | ---- | + | ===== IPv6 su PPP ===== |
| + | |||
| + | Alcuni provider forniscono indirizzi IPv6 sulla normale connessione ADSL. In generale funziona l' | ||
| + | |||
| + | === Configurazione manuale === | ||
| + | |||
| + | Se lo stack PPP non è opportunamente configurato, | ||
| + | |||
| + | < | ||
| + | ip -6 addr add 2a02: | ||
| + | ip -6 route add default via fe80:: | ||
| + | </ | ||
| + | |||
| + | === Configurazione automatica === | ||
| + | |||
| + | La configurazione standard di una connessione PPPoE con Debian prevede la creazione di una istanza in **/ | ||
| + | |||
| + | < | ||
| + | auto adsl | ||
| + | iface adsl inet ppp | ||
| + | provider dsl-provider | ||
| + | </ | ||
| + | |||
| + | |||
| + | Nel file **/ | ||
| + | |||
| + | < | ||
| + | +ipv6 | ||
| + | </ | ||
| + | |||
| + | Per ottenere la **configurazione automatica** si sfrutta il protocollo //Stateless Address Autoconfiguration// | ||
| + | |||
| + | Il kernel di Linux espone il parametro **accept_ra** delle varie interfacce di rete tramite lo pseudo filesystem **/ | ||
| + | |||
| + | ^ 0 | Do not accept Router Advertisements. | ||
| + | ^ 1 | Accept Router Advertisements if forwarding is disabled (default). | ||
| + | ^ 2 | Overrule forwarding behaviour. Accept Router Advertisements even if forwarding is enabled. | ||
| + | |||
| + | Il valore predefinito **1** ovviamente **non va bene per un firewall** che effettua il forward dei pacchetti da una LAN verso internet. | ||
| + | |||
| + | Si potrebbe impostare a 2 il valore di default con questo comando: | ||
| + | |||
| + | < | ||
| + | echo 2 > / | ||
| + | </ | ||
| + | |||
| + | In questo modo - quando viene attivata l' | ||
| + | |||
| + | Sembra che la soluzione migliore sia quella di creare un file **/ | ||
| + | |||
| + | <code bash> | ||
| + | #!/bin/sh | ||
| + | # Accept Router Advertisements; | ||
| + | echo 2 > "/ | ||
| + | </ | ||
| + | |||
| + | **NOTA**: invece di utilizzare il comando **echo** è possibile, in alternativa, | ||
| + | |||
| + | < | ||
| + | sysctl -w net.ipv6.conf.ppp0.accept_ra=2 | ||
| + | </ | ||
| + | |||
| + | === Riferimenti web === | ||
| + | |||
| + | Vedere questo post: **[[http:// | ||
| + | |||
| + | //By default, a Linux host on an IPv6 network will listen for and | ||
| + | solicit router advertisements in order to choose an IPv6 address | ||
| + | for itself and to set up its default route. This is referred to | ||
| + | as stateless address autoconfiguration (SLAAC).// | ||
| - | <php> | + | //In this context, what makes the difference between router or not |
| - | echo '<a rel=" | + | are the settings of the /proc/sys/net/ipv6/ |
| - | </php> | + | files (or the net.ipv6.conf.*.forwarding sysctl). If you turn |
| + | your host into a router by setting one of those to “1”, you may | ||
| + | find that your host removes any IPv6 address and default route | ||
| + | it learnt via SLAAC.// | ||
doc/appunti/net/ipv6.1362994410.txt.gz · Last modified: by niccolo
