AnsweredAssumed Answered

eth0 does not get ipv6 address - yocto build env

Question asked by Aparna K on Aug 31, 2015
Latest reply on Sep 7, 2015 by igorpadykov

I am trying to get an ipv4 and ipv6 address on eth0. Our board is based on imx28evk, but has only eth0 (no eth1).

My question is what configuration am I missing in the yocto build that eth0 does not get both ipv4 and ipv6 addresses ?

In the absence of an IPV6 dhcp server, I thought eth0 would get alteast a link local ipv6 address ?

 

Here is my configuration:

/etc/network/interfaces:

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

 

# The loopback interface

auto lo

iface lo inet loopback

 

# Wired or wireless interfaces

auto eth0

iface eth0 inet dhcp

        hwaddress ether 00:04:0F:03:52:02

        pre-up ifconfig $IFACE up

        post-down IFCONDIG $IFACE down

 

iface eth0 inet6 manual

        pre-up ifconfig $IFACE up

        post-down ifconfig $IFACE down

        hwaddress ether 00:04:0F:03:52:02

 

avahi-autoipd kicks in when there is no dhcp. When there is no ipv4 dhcp server, ifconfig gives me:

 

root@imx28evk:~# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:04:0F:03:52:02

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:57 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 B)  TX bytes:11600 (11.3 KiB)

          Base address:0x8000

 

eth0:avahi Link encap:Ethernet  HWaddr 00:04:0F:03:52:02

          inet addr:169.254.154.166  Bcast:169.254.255.255  Mask:255.255.0.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          Base address:0x8000

 

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:126 errors:0 dropped:0 overruns:0 frame:0

          TX packets:126 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:9240 (9.0 KiB)  TX bytes:9240 (9.0 KiB)

 

sysctl does not have eth0 related keys. It does have keys for l0 and eth1. Trying to enable ipv6 for eth0 gives me an "sysctl error: unknown keys.

net.ipv6.conf.all.forwarding = 0

net.ipv6.conf.all.hop_limit = 64

net.ipv6.conf.all.mtu = 1280

net.ipv6.conf.all.accept_ra = 1

net.ipv6.conf.all.accept_redirects = 1

net.ipv6.conf.all.autoconf = 1

net.ipv6.conf.all.dad_transmits = 1

net.ipv6.conf.all.router_solicitations = 3

net.ipv6.conf.all.router_solicitation_interval = 4

net.ipv6.conf.all.router_solicitation_delay = 1

net.ipv6.conf.all.force_mld_version = 0

net.ipv6.conf.all.max_addresses = 16

net.ipv6.conf.all.accept_ra_defrtr = 1

net.ipv6.conf.all.accept_ra_pinfo = 1

net.ipv6.conf.all.proxy_ndp = 0

net.ipv6.conf.all.accept_source_route = 0

net.ipv6.conf.all.disable_ipv6 = 0

net.ipv6.conf.all.accept_dad = 1

net.ipv6.conf.all.force_tllao = 0

net.ipv6.conf.default.forwarding = 0

net.ipv6.conf.default.hop_limit = 64

net.ipv6.conf.default.mtu = 1280

net.ipv6.conf.default.accept_ra = 1

net.ipv6.conf.default.accept_redirects = 1

net.ipv6.conf.default.autoconf = 1

net.ipv6.conf.default.dad_transmits = 1

net.ipv6.conf.default.router_solicitations = 3

net.ipv6.conf.default.router_solicitation_interval = 4

net.ipv6.conf.default.router_solicitation_delay = 1

net.ipv6.conf.default.force_mld_version = 0

net.ipv6.conf.default.max_addresses = 16

net.ipv6.conf.default.accept_ra_defrtr = 1

net.ipv6.conf.default.accept_ra_pinfo = 1

net.ipv6.conf.default.proxy_ndp = 0

net.ipv6.conf.default.accept_source_route = 0

net.ipv6.conf.default.disable_ipv6 = 0

net.ipv6.conf.default.accept_dad = 1

net.ipv6.conf.default.force_tllao = 0

net.ipv6.conf.lo.forwarding = 0

net.ipv6.conf.lo.hop_limit = 64

net.ipv6.conf.lo.mtu = 16436

net.ipv6.conf.lo.accept_ra = 1

net.ipv6.conf.lo.accept_redirects = 1

net.ipv6.conf.lo.autoconf = 1

net.ipv6.conf.lo.dad_transmits = 1

net.ipv6.conf.lo.router_solicitations = 3

net.ipv6.conf.lo.router_solicitation_interval = 4

net.ipv6.conf.lo.router_solicitation_delay = 1

net.ipv6.conf.lo.force_mld_version = 0

net.ipv6.conf.lo.max_addresses = 16

net.ipv6.conf.lo.accept_ra_defrtr = 1

net.ipv6.conf.lo.accept_ra_pinfo = 1

net.ipv6.conf.lo.proxy_ndp = 0

net.ipv6.conf.lo.accept_source_route = 0

net.ipv6.conf.lo.disable_ipv6 = 0

net.ipv6.conf.lo.accept_dad = -1

net.ipv6.conf.lo.force_tllao = 0

net.ipv6.conf.eth1.forwarding = 0

net.ipv6.conf.eth1.hop_limit = 64

net.ipv6.conf.eth1.mtu = 1500

net.ipv6.conf.eth1.accept_ra = 1

net.ipv6.conf.eth1.accept_redirects = 1

net.ipv6.conf.eth1.autoconf = 1

net.ipv6.conf.eth1.dad_transmits = 1

net.ipv6.conf.eth1.router_solicitations = 3

net.ipv6.conf.eth1.router_solicitation_interval = 4

net.ipv6.conf.eth1.router_solicitation_delay = 1

net.ipv6.conf.eth1.force_mld_version = 0

net.ipv6.conf.eth1.max_addresses = 16

net.ipv6.conf.eth1.accept_ra_defrtr = 1

net.ipv6.conf.eth1.accept_ra_pinfo = 1

net.ipv6.conf.eth1.proxy_ndp = 0

net.ipv6.conf.eth1.accept_source_route = 0

net.ipv6.conf.eth1.disable_ipv6 = 0

net.ipv6.conf.eth1.accept_dad = 1

net.ipv6.conf.eth1.force_tllao = 0

 

if_net6 has only lo.

root@imx28evk:/proc# cat /proc/net/if_inet6

00000000000000000000000000000001 01 80 10 80       lo

 

Avahi assigns an ipv6 address to eth0 only if  "face eth0 inet dhcp" is not commented in /etc/network/interfaces.

avahi-daemon.conf has

under [server]:

use-ipv4=yes

use-ipv6=yes

allow-interfaces=eth0

#deny-interfaces=eth1

 

and under [publish]

publish-aaaa-on-ipv4=yes

publish-a-on-ipv6=yes

 

Thanks,

Aparna

Outcomes