4

I can get the ipv4 address using dhcp,But can't get the ipv6 address.

the dhcp server also support the ipv6 service.
ifconfig eth0

eth0      Link encap:Ethernet  HWaddr: 00:21:85:d3:a3:36  
          inet addr:10.16.31.183  broadcast:10.16.31.255  netmask:255.255.255.0
          inet6 addr: fe80::221:85ff:fed3:a336/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

Other configurations about ipv6:

$ cd /proc/sys/net/ipv6/conf/all
$ grep "" disable_ipv6 forwarding autoconf 
disable_ipv6:0
forwarding:1
autoconf:1

Is there any solution for solving this problem?

1
  • Are you trying to connect to an network that is IPv6 enabled? Also, are you on a Desktop install or a Command line only install?
    – Azendale
    May 27, 2011 at 0:12

2 Answers 2

3

From the output of ifconfig, it appears that IPv6 is not enabled on that interface.

There's two ways to automatically get IPv6 addresses on a network:

  • Autoconfiguration (common, supported by nearly everything IPv6 compatible), &
  • DHCPv6 (rarer, not supported by Mac OS X, just got easy support in Natty, it required config files before Natty)

Autoconfiguration will automatically get an address from a router running on the network that is running a daemon such as radvd. I would assume that autoconf=1 enables it. However, you cannot do IP forwarding on an interface that you have an autoconfigured address on. So forwarding=1 is probably turning getting addresses via autoconfiguration off.

1

IPv6 addresses are not distributed via DHCP. But you can install radvd which distributes IPv6 addresses and also handles the routing if required. After installing via apt-get install radvd you can find example configuration files in /usr/share/doc/radvd/examples/

Also read /usr/share/doc/radvd/README.Debian.

1
  • 4
    IPv6 addresses can be distributed by DHCP version 6. (There is two ways of distributing addresses; see my answer) The dhcpv6 client is in Natty. Also, installing radvd will only give IPV6 addresses to the rest of the network. Getting autoconf to work would make it possible to have an IPv6 address and service if the network has IPv6 access.
    – Azendale
    May 27, 2011 at 0:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .