Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #202680 > unrolled thread

systemd-networkd and bonding

Started byGary Dale <garyndp@gmail.com>
First post2018-11-22 16:30 +0100
Last post2018-11-23 06:40 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.debian.user


Contents

  systemd-networkd and bonding Gary Dale <garyndp@gmail.com> - 2018-11-22 16:30 +0100
    Re: systemd-networkd and bonding john doe <johndoe65534@mail.com> - 2018-11-22 17:20 +0100
      Re: systemd-networkd and bonding Gary Dale <garyndp@gmail.com> - 2018-11-23 05:40 +0100
        Re: systemd-networkd and bonding john doe <johndoe65534@mail.com> - 2018-11-23 06:40 +0100

#202680 — systemd-networkd and bonding

FromGary Dale <garyndp@gmail.com>
Date2018-11-22 16:30 +0100
Subjectsystemd-networkd and bonding
Message-ID<wWZ5w-5dO-11@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

I'm running Debian/Stretch (AMD64).

I'm trying to create a bond between two network devices (currently 
testing on my laptop but also have a couple of servers I'd like to use 
it on) following the Debian Wiki at https://wiki.debian.org/Bonding.

I got the ifenslave method working as per the first two examples. Then I 
noticed the systemd-networkd method which looks to be the way of the 
future. I put the laptop's networking back to it's original settings and 
removed ifenslave then proceeded with the example, changing the bond 
device's IP to one that works on my network.

The network seems to come up and the bond device has the correct IP but 
my network doesn't work. Since Mode=802.3ad could have problems, I 
switched it to active-backup, which worked with ifenslave. Rebooting was 
slow and when I logged in, I found the network still wasn't working, 
although ifconfig showed exactly what I thought I should see (the bond 
device with an IP address and the two slave devices working but without 
an IP).

There's not a lot of online documentation that I've found that doesn't 
use ifenslave. Has anyone got this to work using systemd-networkd?

Also, for my laptop, using dhcp to set the IP makes more sense. The wiki 
article sets a static IP:

[Match]
Name=test-lag
[Network]
Address=192.168.1.13/24
Gateway=192.168.1.1

is how I set it on my laptop. What would that be for a dhcp IP address?

Thanks.

[toc] | [next] | [standalone]


#202683

Fromjohn doe <johndoe65534@mail.com>
Date2018-11-22 17:20 +0100
Message-ID<wWZRT-5KQ-1@gated-at.bofh.it>
In reply to#202680
On 11/22/2018 4:11 PM, Gary Dale wrote:
> I'm running Debian/Stretch (AMD64).
> 
> I'm trying to create a bond between two network devices (currently
> testing on my laptop but also have a couple of servers I'd like to use
> it on) following the Debian Wiki at https://wiki.debian.org/Bonding.
> 
> I got the ifenslave method working as per the first two examples. Then I
> noticed the systemd-networkd method which looks to be the way of the
> future. I put the laptop's networking back to it's original settings and
> removed ifenslave then proceeded with the example, changing the bond
> device's IP to one that works on my network.
> 
> The network seems to come up and the bond device has the correct IP but
> my network doesn't work. Since Mode=802.3ad could have problems, I
> switched it to active-backup, which worked with ifenslave. Rebooting was
> slow and when I logged in, I found the network still wasn't working,
> although ifconfig showed exactly what I thought I should see (the bond
> device with an IP address and the two slave devices working but without
> an IP).
> 
> There's not a lot of online documentation that I've found that doesn't
> use ifenslave. Has anyone got this to work using systemd-networkd?
> 

Not tested:

https://www.reversengineered.com/2014/08/21/setting-up-bonding-in-systemd/

> Also, for my laptop, using dhcp to set the IP makes more sense. The wiki
> article sets a static IP:
> 
> [Match]
> Name=test-lag
> [Network]
> Address=192.168.1.13/24
> Gateway=192.168.1.1
> 

[Network]
DHCP=yes

See "Example 2. DHCP on ethernet links" and the "Network" section
"DHCP=" at the following URL :

https://www.freedesktop.org/software/systemd/man/systemd.network.html

-- 
John Doe

[toc] | [prev] | [next] | [standalone]


#202702

FromGary Dale <garyndp@gmail.com>
Date2018-11-23 05:40 +0100
Message-ID<wXbq1-4uA-5@gated-at.bofh.it>
In reply to#202683
On 2018-11-22 11:02 a.m., john doe wrote:
> On 11/22/2018 4:11 PM, Gary Dale wrote:
>> I'm running Debian/Stretch (AMD64).
>>
>> I'm trying to create a bond between two network devices (currently
>> testing on my laptop but also have a couple of servers I'd like to use
>> it on) following the Debian Wiki at https://wiki.debian.org/Bonding.
>>
>> I got the ifenslave method working as per the first two examples. Then I
>> noticed the systemd-networkd method which looks to be the way of the
>> future. I put the laptop's networking back to it's original settings and
>> removed ifenslave then proceeded with the example, changing the bond
>> device's IP to one that works on my network.
>>
>> The network seems to come up and the bond device has the correct IP but
>> my network doesn't work. Since Mode=802.3ad could have problems, I
>> switched it to active-backup, which worked with ifenslave. Rebooting was
>> slow and when I logged in, I found the network still wasn't working,
>> although ifconfig showed exactly what I thought I should see (the bond
>> device with an IP address and the two slave devices working but without
>> an IP).
>>
>> There's not a lot of online documentation that I've found that doesn't
>> use ifenslave. Has anyone got this to work using systemd-networkd?
>>
> Not tested:
>
> https://www.reversengineered.com/2014/08/21/setting-up-bonding-in-systemd/
>
>> Also, for my laptop, using dhcp to set the IP makes more sense. The wiki
>> article sets a static IP:
>>
>> [Match]
>> Name=test-lag
>> [Network]
>> Address=192.168.1.13/24
>> Gateway=192.168.1.1
>>
> [Network]
> DHCP=yes
>
> See "Example 2. DHCP on ethernet links" and the "Network" section
> "DHCP=" at the following URL :
>
> https://www.freedesktop.org/software/systemd/man/systemd.network.html
>
Thanks. It took a different approach and used different files than the 
Debian Wiki article but it did the trick. My laptop setup currently uses 
some ideas from both (I have .network files using the pci addresses for 
the laptop network hardware that I refer to in the .netdev file). It's 
now running with dhcp and Mode=mode802.3ad.

One thing I did notice is that I did need a reboot in at least one point 
to get things working properly. Simply restarting the systemd-networkd 
service didn't do the trick.

[toc] | [prev] | [next] | [standalone]


#202703

Fromjohn doe <johndoe65534@mail.com>
Date2018-11-23 06:40 +0100
Message-ID<wXcm5-56v-1@gated-at.bofh.it>
In reply to#202702
On 11/23/2018 5:23 AM, Gary Dale wrote:
> On 2018-11-22 11:02 a.m., john doe wrote:
>> On 11/22/2018 4:11 PM, Gary Dale wrote:
>>> I'm running Debian/Stretch (AMD64).
>>>
>>> I'm trying to create a bond between two network devices (currently
>>> testing on my laptop but also have a couple of servers I'd like to use
>>> it on) following the Debian Wiki at https://wiki.debian.org/Bonding.
>>>
>>> I got the ifenslave method working as per the first two examples. Then I
>>> noticed the systemd-networkd method which looks to be the way of the
>>> future. I put the laptop's networking back to it's original settings and
>>> removed ifenslave then proceeded with the example, changing the bond
>>> device's IP to one that works on my network.
>>>
>>> The network seems to come up and the bond device has the correct IP but
>>> my network doesn't work. Since Mode=802.3ad could have problems, I
>>> switched it to active-backup, which worked with ifenslave. Rebooting was
>>> slow and when I logged in, I found the network still wasn't working,
>>> although ifconfig showed exactly what I thought I should see (the bond
>>> device with an IP address and the two slave devices working but without
>>> an IP).
>>>
>>> There's not a lot of online documentation that I've found that doesn't
>>> use ifenslave. Has anyone got this to work using systemd-networkd?
>>>
>> Not tested:
>>
>> https://www.reversengineered.com/2014/08/21/setting-up-bonding-in-systemd/
>>
>>
>>> Also, for my laptop, using dhcp to set the IP makes more sense. The wiki
>>> article sets a static IP:
>>>
>>> [Match]
>>> Name=test-lag
>>> [Network]
>>> Address=192.168.1.13/24
>>> Gateway=192.168.1.1
>>>
>> [Network]
>> DHCP=yes
>>
>> See "Example 2. DHCP on ethernet links" and the "Network" section
>> "DHCP=" at the following URL :
>>
>> https://www.freedesktop.org/software/systemd/man/systemd.network.html
>>
> Thanks. It took a different approach and used different files than the
> Debian Wiki article but it did the trick. My laptop setup currently uses
> some ideas from both (I have .network files using the pci addresses for
> the laptop network hardware that I refer to in the .netdev file). It's
> now running with dhcp and Mode=mode802.3ad.
> 

Glad to hear that you got it working.

> One thing I did notice is that I did need a reboot in at least one point
> to get things working properly. Simply restarting the systemd-networkd
> service didn't do the trick.
> 

This is expected:

From:

https://www.freedesktop.org/software/systemd/man/systemd-networkd.service.html

"This also means that when configuration is updated and systemd-networkd
is restarted, netdev interfaces for which configuration was removed will
not be dropped, and may need to be cleaned up manually."

-- 
John Doe

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web