Can't get ipv6 address using dhcp
Solution 1
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.
Solution 2
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
.
Related videos on Youtube
kit.yang
Updated on September 18, 2022Comments
-
kit.yang over 1 year
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?
-
Dan Hibbert almost 13 yearsAre you trying to connect to an network that is IPv6 enabled? Also, are you on a Desktop install or a Command line only install?
-
-
Dan Hibbert almost 13 yearsIPv6 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.