[systemd-devel] [PATCH] restore support for enslaving to bonding interface

Mark Oteiza mvoteiza at udel.edu
Tue Mar 4 16:41:32 PST 2014


networkd: Restore logic for enslaving to a master bonding interface.
---

Bonding support seems to have been removed right after being added,
between 52433f6 (22 Jan) and 54abf46 (25 Jan).

http://cgit.freedesktop.org/systemd/systemd/log/src/network/networkd-link.c

With this patch, networkd successfully configures the links.

Currently, networkd will not dhcp on the bonding interface.  Here is my
configuration:

# /etc/systemd/network/dhcp.network
[Match]
Name=bond0

[Network]
DHCP=true

# /etc/systemd/network/ethernet.network
[Match]
Name=enp5s0

[Network]
Bond=bond0

# /etc/systemd/network/virtual.netdev
[NetDev]
Name=bond0
Kind=bond

# /etc/systemd/network/wireless.network
[Match]
Name=wlp2s0

[Network]
Bond=bond0

… and the network after manually adding address/route to bond0:
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: enp5s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP group default qlen 1000
    link/ether f0:bf:97:ec:3e:ba brd ff:ff:ff:ff:ff:ff
3: wlp2s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
    link/ether f0:bf:97:ec:3e:ba brd ff:ff:ff:ff:ff:ff
4: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether f0:bf:97:ec:3e:ba brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.201/24 scope global bond0
       valid_lft forever preferred_lft forever
$ ip r
default via 192.168.1.1 dev bond0 
192.168.1.0/24 dev bond0  proto kernel  scope link  src 192.168.1.201 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: systemd-networkd_bonding.patch
Type: text/x-diff
Size: 1320 bytes
Desc: systemd-networkd bonding ifenslave
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140304/62bead62/attachment-0001.patch>


More information about the systemd-devel mailing list