[arch-general] bridge with netctl

arnaud gaboury arnaud.gaboury at gmail.com
Thu Mar 6 08:03:54 EST 2014


Dear list,

I am running a machine "hortensia" with a container "dahlia". As the
container will be a server, I want to have one IP for hortensia and
another one for dahlia.

On hortensia, with dhcpcd.service and systemd-networkd both disabled,
I start at boot two netctl profiles.

/etc/netctl/bridge-hortensia
Description="Bridge connection to container"
Interface=br0
Connection=bridge
BindsToInterfaces=()
IP=no

/etc/netctl/static-hortensia
Description='hortensia static ethernet connection'
Interface=enp7s0
Connection=ethernet
IP=static
Address=('192.168.1.87/24')
Gateway=('192.168.1.254')
DNS=('192.168.1.254')

Then here is the result:
$ ip addr

2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
    link/ether 14:da:e9:b5:7a:88 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.87/24 brd 192.168.1.255 scope global enp7s0
       valid_lft forever preferred_lft forever
    inet6 fe80::16da:e9ff:feb5:7a88/64 scope link
       valid_lft forever preferred_lft forever
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
UNKNOWN group default
    link/ether 22:6d:8b:ac:6e:31 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::206d:8bff:feac:6e31/64 scope link
       valid_lft forever preferred_lft forever

Two questions :
- is the command output correct for br0 ?
- all wiki said to bind bridge interface to my ethernet device
(enp7s0). But if I modified the /etc/netctl/bridge-hortensia this way
:
BindsToInterfaces=(enp7s0)
I have no working network on machine hortensia. Is this behavior correct ?


Now let's start the dahlia container
# systemd-nspawn --machine=dahlia --network-bridge=br0 -bD /dahlia'

On hortensia, now a new ip addr output, as supposed it shall be (vb-dahlia):
$ ip addr
2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
    link/ether 14:da:e9:b5:7a:88 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.87/24 brd 192.168.1.255 scope global enp7s0
       valid_lft forever preferred_lft forever
    inet6 fe80::16da:e9ff:feb5:7a88/64 scope link
       valid_lft forever preferred_lft forever
3: br0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
state DOWN group default
    link/ether 1a:2d:eb:58:8e:db brd ff:ff:ff:ff:ff:ff
    inet6 fe80::206d:8bff:feac:6e31/64 scope link
       valid_lft forever preferred_lft forever
5: vb-dahlia: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master br0
state DOWN group default qlen 1000
    link/ether 1a:2d:eb:58:8e:db brd ff:ff:ff:ff:ff:ff

My issue is that br0 is DOWN and can't make it up with this command:
 # ip link set dev br0 up
This has no effect.

Then, I can see NO-CARRIER in the br0 status. Is it the expected output ?
Why is br0 DOWN ? Why can't I bring it UP ?

All this leaves me with a broken network on the container dahlia:
$ ip addr
2: host0: <NO-CARRIER,BROADCAST,MULTICAST,ALLMULTI,NOTRAILERS,UP> mtu
1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether b2:25:69:eb:ea:a9 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

host0 is DOWN with again NO-CARRIER


I have no idea what part of the setup is missing.

I run a custom kernel, so is there any wrong configuration on it ? The
kernel is moderately customized, but maybe did I disabled some needed
flag ?

Thank you for help.


More information about the arch-general mailing list