| Home XFree86 Developers Download Mirrors Stats | |
DisclaimerThis is not a full-fledged HOWTO. If you are new to IPv6 or if you need more details about why things work like they do, pleaseapt-get install doc-linux-htmland look for the very comprehensive Linux+IPv6-HOWTO. |
|
|---|---|
The kernelYou will need to enable IPv6 support in the kernel, either built in or as a module. Users of ready-made Debian kernels should already have the module loaded. If it is not, simply modprobe ipv6. Users of a custom kernel will need to recompile. Once you have done it right, ifconfig lo will show this line:inet6 addr: ::1/128 Scope:HostWelcome on board! |
|
Configuring a static addressLet's start with something simple. You can permanently configure a static address using the common scheme in /etc/network/interfaces. This is how I do it on my net:iface eth0 inet6 static address 3ffe:1234:5678:fffd::1 netmask 64This way, a simple ifup eth0 will configure the ipv6 address for your lan card. You will need to add these lines after the existing iface eth0 inet static stanza. |
|
Configuring a 6in4 tunnelNow something more fancy. You wil probably need a few of these tunnels as the providers giving native IPv6 are very few. First of all, don't even think of using ifconfig to accomplish this. You will need to apt-get install iproute. The iproute toolset is far more powerful and moreover you will be able to name your tunnels, instead of having those boring sit0, sit1... interfaces ;-).auto Fabbione iface Fabbione inet6 v4tunnel address 3ffe:abcd:ef::a netmask 64 endpoint 192.168.2.5 pre-up echo -n "Starting IPv6 tunnel to fabbione..." up ip tunnel change Fabbione local 192.168.2.254 ttl 128 up echo " done." down echo -n "Stopping IPv6 tunnel to fabbione..." post-down echo " done." |
|
Simple routingIf you have a single IPv6 connection, you can live with a default route. You will define it in /etc/network/interfaces, by simply adding a gateway line to the interface definition:iface eth0 inet6 static address 3ffe:dead:beef::a netmask 64 gateway 3ffe:dead:beef::9This will result, more or less, in the following output of the ip -6 route command: 3ffe:dead:beef::/64 dev eth0 proto kernel metric 256 mtu 1500 advmss 1440 fe80::/10 dev eth0 proto kernel metric 256 mtu 1500 advmss 1440 ff00::/8 dev eth0 proto kernel metric 256 mtu 1500 advmss 1440 default via 3ffe:dead:beef::9 dev eth0 metric 1 mtu 1500 advmss 1440 default dev eth0 proto kernel metric 256 mtu 1500 advmss 1440 unreachable default dev lo metric -1 error -101Obviously, if your only IPv6 connection to the world is via a 6in4 tunnel, the default route will be via the tunnel interface. |
|
Configuring the daemons |
|
snmpdThis will assume that you have just installed snmpd, and that you have the sample config file, instead of running snmpconf. I have not experimented with anything fancy, but a good read at man snmpd.conf will give you all the details and more. First, you need to get snmpd to listen to IPv6 by editing /etc/default/snmpd so as to read:SNMPDOPTS='-s -l /dev/null -P /var/run/snmpd.pid udp6:161'Note about 2.6.x kernels: you need to explicitly enable both ipv4 and ipv6, like this: SNMPDOPTS='-s -l /dev/null -P /var/run/snmpd.pid udp6:161 udp:161'Then you need to edit /etc/snmp/snmpd.conf to add a few lines to support IPv6. Probably there's a better way, but I've chosen not to eliminate the IPv4 configuration, even though apparently with Linux it is not possible to have separate configs. The IPv6 one will override the other. Maybe USAGI will change this, in the future. I've done this: # sec.name source community #com2sec paranoid default public com2sec readonly default public com2sec readwrite default private com2sec6 readonly6 default public com2sec6 readwrite6 default private [...] group MyROGroup6 v2c readonly6 group MyRWGroup6 v2c readwrite6 [...] access MyROGroup6 "" any noauth exact all none none access MyRWGroup6 "" any noauth exact all all noneRemember to set decent community names, this is just an example. If everything is correct, you'll be able to query your daemon in IPv6: ik5pvx@penny:~ $ snmpwalk -v 2c -c public udp6:::1 sysname SNMPv2-MIB::sysName.0 = STRING: penny |
|
...more?Contributions are welcome! Please drop yours on the mailing list or contact ik5pvx on IRC. |
|
Last modified: Sun Feb 1 11:04:51 CET 2004