Discussion:
unable to bring an interface UP with systemd-networkd
(too old to reply)
arnaud gaboury
2014-03-11 17:42:23 UTC
Permalink
Hi,

I run a dahlia container on a hortensia machine. Both are Arch boxes,
and container is managed with nspawn and networkd.

When I boot the hortensia machine, part of the ip addr output is :

***@hortensia ➤➤ ~ % ip addr
................
4: vb-dahlia: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master br0
state DOWN group default qlen 1000
link/ether 6a:91:b5:72:db:c5 brd ff:ff:ff:ff:ff:ff


***@dahlia ➤➤ ~ % ip addr
..............................
2: host0: <NO-CARRIER,BROADCAST,MULTICAST,ALLMULTI,AUTOMEDIA,UP> mtu
1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 7e:3a:5a:93:ab:ee brd ff:ff:ff:ff:ff:ff
inet 192.168.1.94/24 brd 192.168.1.255 scope global host0
valid_lft forever preferred_lft forever

I have to manually
***@hortensia ➤➤ ~ # ip link set dev vb-dahlia up
to get network up in container.


Here are my network config files on hortensia:

/etc/systemd/dahlia.netdev
[Match]
Virtualization=container

[NetDev]
Name=vb-dahlia
Kind=bridge

/etc/systemd/80-container-host0.network
[Match]
Virtualization=container
Name=host0

[Network]
DHCP=no
DNS=192.168.1.254
Bridge=br0

[Address]
Address=192.168.1.94/24

[Route]
Gateway=192.168.1.254


Ethernet and bridge are both started with netctl profiles. eth has no
IP and bridge br0 binds (enp7s0 vb-dahlia).
No network settings inside the container, and systemd-networkd disabled.

I have tried many various configurations, but the vb-dahlia interface
is always DOWN .

What am I missing or misconfiguring ?

Thank you for help
arnaud gaboury
2014-03-12 14:03:23 UTC
Permalink
Post by arnaud gaboury
I have tried many various configurations, but the vb-dahlia interface
is always DOWN .
What am I missing or misconfiguring ?
Thank you for help
/etc/systemd/network/80-container-host0.network

[Match]
Name=vb-dahlia

[Network]
DHCP=no
DNS=192.168.1.254

[Address]
Address=192.168.1.94/24

[Route]
Gateway=192.168.1.254

is the correct one with a virtual bridge UP when I boot my machine,
thus a host0 UP in the container.
Tom Gundersen
2014-03-16 12:41:22 UTC
Permalink
On Tue, Mar 11, 2014 at 6:42 PM, arnaud gaboury
Post by arnaud gaboury
I run a dahlia container on a hortensia machine. Both are Arch boxes,
and container is managed with nspawn and networkd.
................
4: vb-dahlia: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master br0
state DOWN group default qlen 1000
link/ether 6a:91:b5:72:db:c5 brd ff:ff:ff:ff:ff:ff
..............................
2: host0: <NO-CARRIER,BROADCAST,MULTICAST,ALLMULTI,AUTOMEDIA,UP> mtu
1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 7e:3a:5a:93:ab:ee brd ff:ff:ff:ff:ff:ff
inet 192.168.1.94/24 brd 192.168.1.255 scope global host0
valid_lft forever preferred_lft forever
I have to manually
to get network up in container.
/etc/systemd/dahlia.netdev
[Match]
Virtualization=container
If hortensia is your host, then this will have no effect as
"Virtualization=container" means it should only take effect in a
container.
Post by arnaud gaboury
[NetDev]
Name=vb-dahlia
Kind=bridge
You don't want to set up vb-dahlia as a bridge. This should be a veth
device created automatically by nspawn for you, and added to whatever
bridge (on the host machine) you specify. What you need to do, is to
create that bridge though. If you want to use networkd on the host to
do that use:

***
/etc/systemd/network/br0.netdev
[NetDev]
Name=br0
Kind=bridge
***
Post by arnaud gaboury
/etc/systemd/80-container-host0.network
[Match]
Virtualization=container
Name=host0
[Network]
DHCP=no
This is ok, but DHCP defaults to 'no', so you can skip it.
Post by arnaud gaboury
DNS=192.168.1.254
Bridge=br0
Hm, are you sure you want to have a bridge in your container, usually
that's on the host (and joined by nspawn itself)? You probably want to
drop this line.
Post by arnaud gaboury
[Address]
Address=192.168.1.94/24
[Route]
Gateway=192.168.1.254
Ethernet and bridge are both started with netctl profiles. eth has no
IP and bridge br0 binds (enp7s0 vb-dahlia).
No network settings inside the container, and systemd-networkd disabled.
I have tried many various configurations, but the vb-dahlia interface
is always DOWN .
What am I missing or misconfiguring ?
Thank you for help
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Tom Gundersen
2014-03-16 13:54:03 UTC
Permalink
On Tue, Mar 11, 2014 at 6:42 PM, arnaud gaboury
Post by arnaud gaboury
Hi,
I run a dahlia container on a hortensia machine. Both are Arch boxes,
and container is managed with nspawn and networkd.
................
4: vb-dahlia: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master br0
state DOWN group default qlen 1000
link/ether 6a:91:b5:72:db:c5 brd ff:ff:ff:ff:ff:ff
..............................
2: host0: <NO-CARRIER,BROADCAST,MULTICAST,ALLMULTI,AUTOMEDIA,UP> mtu
1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 7e:3a:5a:93:ab:ee brd ff:ff:ff:ff:ff:ff
inet 192.168.1.94/24 brd 192.168.1.255 scope global host0
valid_lft forever preferred_lft forever
I have to manually
to get network up in container.
/etc/systemd/dahlia.netdev
[Match]
Virtualization=container
[NetDev]
Name=vb-dahlia
Kind=bridge
/etc/systemd/80-container-host0.network
[Match]
Virtualization=container
Name=host0
[Network]
DHCP=no
DNS=192.168.1.254
Bridge=br0
[Address]
Address=192.168.1.94/24
[Route]
Gateway=192.168.1.254
Ethernet and bridge are both started with netctl profiles. eth has no
IP and bridge br0 binds (enp7s0 vb-dahlia).
No network settings inside the container, and systemd-networkd disabled.
I have tried many various configurations, but the vb-dahlia interface
is always DOWN .
So we were not automatically upping the bridged interface from nspawn.
I pushed a change to git just now which does that. Thanks for testing.

Tom
arnaud gaboury
2014-03-16 17:00:03 UTC
Permalink
Post by Tom Gundersen
So we were not automatically upping the bridged interface from nspawn.
I pushed a change to git just now which does that. Thanks for testing.
Tom
Correct. The only way for me to bring it up at boot is to create a .
network profile with this inside

[Match]
Name = vb*

This hack works but does not seem a clean way to bring the interface UP
Tom Gundersen
2014-03-16 18:32:42 UTC
Permalink
On Sun, Mar 16, 2014 at 6:00 PM, arnaud gaboury
Post by arnaud gaboury
Post by Tom Gundersen
So we were not automatically upping the bridged interface from nspawn.
I pushed a change to git just now which does that. Thanks for testing.
Tom
Correct. The only way for me to bring it up at boot is to create a .
network profile with this inside
[Match]
Name = vb*
This hack works but does not seem a clean way to bring the interface UP
Yeah, that would work, and with current git the hack is no longer needed.

Cheers,

Tom

Continue reading on narkive:
Loading...