Discussion:
[yocto] [meta-raspberrypi] Configure eth0 to come up with Link-Local IPv6 address only
Thomas Thorne
2017-06-19 11:15:12 UTC
Permalink
Good afternoon,

I am trying to generate an image for a Raspberry Pi 3 that includes a `/etc/network/interfaces` file which causes the Pi to start with an "up" eth0 connection with only an IPv6 link local address.

The Pi will be connected to an active switch on boot so the copper ethernet interface will by electrically up. So far I have found that unless I set a static IPv4 address or connect to a network that uses DHCP to handout IPv4 addresses by eth0 interface does not come up on boot. Based on reading the interfaces man page I have attempted the following variations I in the interfaces file:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
iface eth0 inet6 manual


auto lo
iface lo inet loopback

auto eth0
iface eth0 inet6 manual


auto lo
iface lo inet loopback

auto eth0
iface eth0 inet6 static



auto lo
iface lo inet loopback

auto eth0
iface eth0 inet6 manual
autoconf 1


auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
iface eth0 inet6 manual
autoconf 1


auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
iface eth0 inet6 auto


auto lo
iface lo inet loopback

auto eth0
#iface eth0 inet manual
iface eth0 inet6 auto



This could well be a more general problem with my understanding of how to write IPv6 interface files than something specific to the Raspberry Pi running a Yocto build. It is much easier for me to send this email question now though, before I start trying to mess around with the same settings on my Ubunut PC to see if I can get the behaviour I want out of that.

Any advice or suggestions would be greatfully received.

Regards,

Thomas A. F. Thorne MEng. AUS MIET
Software Engineer

Tel: +44 3450 130 030<tel:+44-3450-130-030>
Email: ***@Net2Edge.com<mailto:***@Net2Edge.com>
Web: http://www.Net2Edge.com/<http://www.net2edge.com/>

[Net2Edge Logo]
Khem Raj
2017-06-19 19:46:43 UTC
Permalink
Post by Thomas Thorne
Good afternoon,
I am trying to generate an image for a Raspberry Pi 3 that includes a
`/etc/network/interfaces` file which causes the Pi to start with an “up”
eth0 connection with only an IPv6 link local address.
​I get IPV4 address assigned automatically on my
image (core-image-full-cmdline)​

​try with

iface eth0 inet auto
​
Post by Thomas Thorne
The Pi will be connected to an active switch on boot so the copper
ethernet interface will by electrically up. So far I have found that
unless I set a static IPv4 address or connect to a network that uses DHCP
to handout IPv4 addresses by eth0 interface does not come up on boot.
Based on reading the interfaces man page I have attempted the following
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
iface eth0 inet6 manual
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet6 manual
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet6 static
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet6 manual
autoconf 1
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
iface eth0 inet6 manual
autoconf 1
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
iface eth0 inet6 auto
auto lo
iface lo inet loopback
auto eth0
#iface eth0 inet manual
iface eth0 inet6 auto
This could well be a more general problem with my understanding of how to
write IPv6 interface files than something specific to the Raspberry Pi
running a Yocto build. It is much easier for me to send this email
question now though, before I start trying to mess around with the same
settings on my Ubunut PC to see if I can get the behaviour I want out of
that.
Any advice or suggestions would be greatfully received.
Regards,
Thomas A. F. Thorne MEng. AUS MIET
*Software Engineer*
*Tel:* *+44 3450 130 030 <+44-3450-130-030>*
*Web:* *http://www.Net2Edge.com/ <http://www.net2edge.com/>*
[image: Net2Edge Logo]
--
_______________________________________________
yocto mailing list
https://lists.yoctoproject.org/listinfo/yocto
Thomas Thorne
2017-06-19 16:45:05 UTC
Permalink
I was unable to get the Raspberry Pi 3 I am targeting to start with eth0 up and only an IPv6 link local address present on eth0, using only a /etc/network/interfaces file. In the end I added shell script under /etc/rc5.d which called out to `ifconfig eth0 up`. This brought eth0 up with only a IPv6 link local address.

If someone has a solution using just /etc/network/interface based settings I would be interested to hear it.

Regards, Thomas Thorne

Loading...