Op 10 aug. 2016, om 17:56 heeft Pol Vangheluwe <[email protected]> het volgende geschreven: > > I am running LFS-7.2 on my iMac G3 under system V init and LFS-7.7 on my > powerMac G4 under systemd. > > Setting up interface bonding with systemd is fairly easy: > - add Bonding driver support to the kernel (as a module, in my case); > - create the needed configuration files under /etc/systemd/network.
(…) > But I am stuck when trying to do the same with system V init. > I found an LFS-hint from 2003 for 2.4 and 2.6 kernels, using the now obsolete > ifenslave program. > I also found a “Bonding ifup-script for LFS 6.2”, most probably also > completely out-dated. > > I have the following in /lib/services: > > lfs_pol [ ~ ]$ ls -l /lib/services > totaal 44 > -rw-r--r-- 1 root root 29377 4 jan 2016 init-functions > -rwxr-xr-- 1 root root 2361 4 jan 2016 ipv4-static > -rwxr-xr-- 1 root root 1979 4 jan 2016 ipv4-static-route > -rwxr-xr— 1 root root 2343 30 apr 2014 wpa > > I don’t think that ipv4-static-route supports bonding, so I think that I must > look for, or develop, an alternate service, and possibly also updating ifup > and ifdown. > Has any one already done this? Or can any one explain how to do this? > > pvg > > -- > http://lists.linuxfromscratch.org/listinfo/blfs-support > FAQ: http://www.linuxfromscratch.org/blfs/faq.html > Unsubscribe: See the above information page No reaction so far, so let’s reply on my own mail… I was a bit too optimistic about systemd. The bond device with an ethernet interface and a wireless interface is indeed created, but is not working as expected. I applied the following changes: 1. /etc/systemd/network/20-bond1.netdev - the mode=802.3ad”was actually a copy/paste error from an example on the Internet and is not supported by my home router; - I replaced it by “active-backup”. I also removed other lines, only related to 802.3ad. 2. I learned that the kernel spontaneously creates an bonding device “bond0”, so it is better to call my own device “bond1”. 3. An interface cannot be added to the bond if it is already “up”. This is always the case for the wlan interface (the ether device has somewhere a delay to come “up” and doesn’t suffer from this problem). The result is then: bash-4.3# networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 2 enP2p32s15f0 ether carrier configured 3 sit0 sit off unmanaged 4 wlP1p16s21 wlan routable failed 5 bond0 ether off unmanaged 6 bond1 ether routable configured 6 links listed. and the journal collects a continuous list of messages like: aug 15 18:37:21 ppc125 kernel: bond1: wlP1p16s21 is up - this may be due to an out of date ifenslave aug 15 18:37:21 ppc125 systemd-networkd[1109]: wlP1p16s21 : wlP1p16s21 : could not join netdev: Operation not permitted The solution is to add a dependency for systemd-networkd.service in the service definition for the wireless device: bash-4.3# cat /etc/systemd/system/multi-user.target.wants/[email protected] [Unit] Description=WPA supplicant daemon (interface- and nl80211 driver-specific version) Requires=sys-subsystem-net-devices-%i.device systemd-networkd.service After=sys-subsystem-net-devices-%i.device systemd-networkd.service # NetworkManager users will probably want the dbus version instead. [Service] Type=simple ExecStart=/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-nl80211-%I.conf -Dnl80211 -i%I [Install] Alias=multi-user.target.wants/wpa_supplicant-nl80211@%i.service The bonding seems to work now after these changes, but I find strange things in the journal: the systemd-netword.service sends a STOPPING notification to the journal after about 30 seconds being “up”, and without mentioning any reason (I increased the logLevel of the journal to “debug”). it then spontaneously restarts when incoming traffic is detected on the socket. This process is continuously repeated. This starting/stopping is not really disturbing the IP communications; I could work with SSH as before. Also, my Wireshark sniffer is not showing any interruptions. Any suggestion to stop this strange behaviour is welcome, as well as any help to set up a bonding device under systemV init. pvg
-- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
