Difference between revisions of "Ubuntu IPv6"
From Teknologisk videncenter
m (→In flight) |
m (→Configure radvd) |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 17: | Line 17: | ||
<source lang=cli> | <source lang=cli> | ||
ifconfig eth0 add 2001:16d8:dd85:139::50/64 | ifconfig eth0 add 2001:16d8:dd85:139::50/64 | ||
| + | </source> | ||
| + | ==Static configuration== | ||
| + | Example of configuration of IPv6 on eth1 in ''/etc/network/interfaces'' | ||
| + | <source lang=cli> | ||
| + | iface eth1 inet6 static | ||
| + | pre-up modprobe ipv6 | ||
| + | address 2001:0470:51dc:1::1 | ||
| + | netmask 64 | ||
</source> | </source> | ||
| Line 26: | Line 34: | ||
net.ipv6.conf.lo.disable_ipv6 = 1 | net.ipv6.conf.lo.disable_ipv6 = 1 | ||
</source> | </source> | ||
| + | =Configure as IPv6 Router= | ||
| + | Uncomment the line ''net.ipv6.conf.all.forwarding=1'' in ''/etc/sysctl.conf'' and reboot | ||
| + | ==Install Route Advertisement daemon for IPv6== | ||
| + | <source lang=cli> | ||
| + | sudo apt-get install radvd | ||
| + | </source> | ||
| + | ==Configure radvd== | ||
| + | Example configuration of ''/etc/radvd.conf'' shown below. (See /usr/share/doc/radvd/examples) | ||
| + | <source lang=cli> | ||
| + | interface eth1 | ||
| + | { | ||
| + | AdvSendAdvert on; | ||
| + | prefix 2001:470:51dc:1::/64 | ||
| + | { | ||
| + | AdvOnLink on; | ||
| + | AdvAutonomous on; | ||
| + | }; | ||
| + | }; | ||
| + | </source> | ||
| + | ===DHCP Other-Config flag=== | ||
| + | <source lang=cli> | ||
| + | interface eth1 | ||
| + | { | ||
| + | AdvSendAdvert on; | ||
| + | <notice>AdvOtherConfigFlag on;</notice> | ||
| + | prefix 2001:470:51dc:1::/64 | ||
| + | { | ||
| + | AdvOnLink on; | ||
| + | #//MaxRtrAdvInterval 10; | ||
| + | AdvAutonomous on; | ||
| + | }; | ||
| + | }; | ||
| + | </source> | ||
| + | |||
| + | =Links= | ||
| + | *[https://wiki.ubuntu.com/IPv6 Ubuntu IPv6] | ||
{{Source cli}} | {{Source cli}} | ||
[[Category:Linux]][[Category:IPv6]] | [[Category:Linux]][[Category:IPv6]] | ||
Latest revision as of 10:18, 1 December 2014
Contents
Enabling/Disabling IPv6
In flight
- Note
- Enabling or disabling IPv6 this way is only in effect until next boot.
Disabling
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
sysctl -w net.ipv6.conf.lo.disable_ipv6=1Enabling
sysctl -w net.ipv6.conf.all.disable_ipv6=0
sysctl -w net.ipv6.conf.default.disable_ipv6=0
sysctl -w net.ipv6.conf.lo.disable_ipv6=0Manually adding an IPv6 Address
ifconfig eth0 add 2001:16d8:dd85:139::50/64Static configuration
Example of configuration of IPv6 on eth1 in /etc/network/interfaces
iface eth1 inet6 static
pre-up modprobe ipv6
address 2001:0470:51dc:1::1
netmask 64Disable permanent
Add the following lines to /etc/sysctl.conf.
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1Configure as IPv6 Router
Uncomment the line net.ipv6.conf.all.forwarding=1 in /etc/sysctl.conf and reboot
Install Route Advertisement daemon for IPv6
sudo apt-get install radvdConfigure radvd
Example configuration of /etc/radvd.conf shown below. (See /usr/share/doc/radvd/examples)
interface eth1
{
AdvSendAdvert on;
prefix 2001:470:51dc:1::/64
{
AdvOnLink on;
AdvAutonomous on;
};
};DHCP Other-Config flag
interface eth1
{
AdvSendAdvert on;
<notice>AdvOtherConfigFlag on;</notice>
prefix 2001:470:51dc:1::/64
{
AdvOnLink on;
#//MaxRtrAdvInterval 10;
AdvAutonomous on;
};
};