LinuxReviws.org --get your your Linux knowledge
> Linux Reviews > Features > Why you want IPv6 >

IPv6 and IP routing SuperMini-Howto

Extremely simple guide to using IPv6 and the command IP on Linux


  1. Hosts and aliases should be placed in /etc/hosts
  2. Adding IP aliases for more IPs to a interface
  3. xinetd and ipv6


:)

1. Hosts and aliases should be placed in /etc/hosts

This file should atleast include

  # IPV6 versions of localhost 
  
  ::1             localhost ipv6-localhost ipv6-loopback  
  fe00::0         ipv6-localnet  
  ff00::0         ipv6-mcastprefix  
  ff02::1         ipv6-allnodes  
  ff02::2         ipv6-allrouters  
  ff02::3         ipv6-allhostsf

And perhaps some local hostnames..

  2001:0DB8:0400:000e:0000:0000:0000:402b another.example.org
  2001:0DB8:0400:000e:1234:4321:0000:402b my.host.net

2. Adding IP aliases for more IPs to a interface

2.1. Using "ip"

  /sbin/ip -6 addr add <ipv6address>/<prefixlength> dev <interface> 

Example:

  /sbin/ip -6 addr add 3ffe:ffff:0:f101::1/64 dev eth0 

2.2. Using "ifconfig"

  /sbin/ifconfig <interface> inet6 add <ipv6address>/<prefixlength>

Examples:

  ifconfig eth1 inet6 add  2001:0618:0400:965a:0000:0000:beef:babe/64 
  ifconfig eth1 inet6 add  2001:0618:0400:965a:0000:0000:dead:0101/64 

3. xinetd and ipv6

xinetd has support for IPv6. Add

  flags = IPv6

to the configuration file for all services you want. Example:

  service ircd
  {
          flags           = IPv6
          socket_type     = stream
          protocol        = tcp
          wait            = no
          user            = nobody
          server          = /usr/sbin/bitlbee
          port            = 6667
          disable         = no
  }
  
  

Meet new people