Received: from mail-oa1-x35.google.com (mail-oa1-x35.google.com [IPv6:2001:4860:4864:20::35]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 4B95B22361A for <~alpine/users@lists.alpinelinux.org>; Wed, 11 Oct 2023 11:31:40 +0000 (UTC) Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-1dd5b98d9aeso445812fac.0 for <~alpine/users@lists.alpinelinux.org>; Wed, 11 Oct 2023 04:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697023899; x=1697628699; darn=lists.alpinelinux.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=eR4aUx9Q6dZrp0HQ1yaQwTRlUHbU8VYNFux2hpORgo4=; b=cte2kjCHoso6ebfn9O9oNEig4taTNKeqEAEIMvRBD1kSG97WEHaXWZ5orYx9VA+kds 0K23BcnQL3I8dbtb/Ji2a9F5Uz3iFJI6zYXCGRNS5R3O1/1nlqwHHU9etn2tAoXGskoz i3btq/QBlrnvdo/ZbXALQqlSl/KKBKl5xj42a6g6+k8UTN0WlhJukLhWugC9oE2H6Meh PuCixbFhPmKvLXIPpbupkGp6wK10z0ltDj8NAKuxcl3Nma6ERFOz5qbNuaLvdfT8eh1K lvI7ICIEIHhuqCD5RSIsmzF4kkJVfbmgk8e1ZQMMoaYY0qAtcjr9fgMMqHPqhoAqVyDW 0dig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697023899; x=1697628699; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eR4aUx9Q6dZrp0HQ1yaQwTRlUHbU8VYNFux2hpORgo4=; b=kcRErVSqjVoWd7NZAI0PnGUxkeYJ7/tMhI7d/Rp780ZglGgBnHWK1CddIsYQfJyBCS QFO058aGod1/YgfzVrF249F18UxoIM8ozS6StKWVsscXKNkoin+jCmTCxNGeggIk2Y8N wYxg347dAuakHMQDyhnKeaogqRcnCLvzbF4gTwVgO4x9z6en5wMVfR5iZ3CrkYBWVyrf g2eBf5n16+NY3ITU4qabccCB/c826R3z0Wtsz+j9ja44luRvJ9yhvrbCfH2IN08jiLG+ zqZH1s7JOZmyUzppagXXP/fN64cawRhuTfx/iwHzFeQRUfWncYmfvk9MBy+SD2lJjaFK +CCQ== X-Gm-Message-State: AOJu0YxkEJ4zQNs/GvD5PS7+ZlTUya9fRe7leYItlNskIhw1nXGuPmfN Ud9diMzSF2yWMLWzndOEm0Xp0gThrOGruy5MyLA= X-Google-Smtp-Source: AGHT+IHWeyNMxiDX88e+UegnSr6Cc2Os04H5dGlMvefsGZlXbc+3UiD9aV8kJWeS4Y/JfKVM1k1nDSyRiWRnrdEOrmk= X-Received: by 2002:a05:6870:d207:b0:1b0:45cb:706e with SMTP id g7-20020a056870d20700b001b045cb706emr11300007oac.28.1697023898984; Wed, 11 Oct 2023 04:31:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Guning Lin Date: Wed, 11 Oct 2023 19:31:27 +0800 Message-ID: Subject: Re: using ip command to config bond interface To: Guido Trotter Cc: ~alpine/users@lists.alpinelinux.org Content-Type: multipart/alternative; boundary="000000000000acca6d06076f2a66" --000000000000acca6d06076f2a66 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Guido: Thanks for your reply. The command you mentioned above is what I am going to run. But I am trapped in the bond-type interface args not being effected. My target is to set the bond0 interface in mode active-backup(mode 2), and the command I run to create this interface bond0 did not work And in my situation, I just want to run the command once without saving any file on disk.But I will consider your opinion. If we can find the `ip` command or `bond type` manaul , i think we can solve the problem. Guido Trotter =E4=BA=8E2023=E5=B9=B410=E6=9C=8811=E6= =97=A5=E5=91=A8=E4=B8=89 19:14=E5=86=99=E9=81=93=EF=BC=9A > On Wed, 11 Oct 2023 at 09:53, Guning Lin wrote: > > > > Hi: > > > > I want to use ip command to config bond interface at once, but it didn'= t > work, Can you help me? Here are context: > > > > 1. I have two native interfaces eth0 and eth1 > > > > 2. I've tried this command blow to add a bond interface bond0 > >> > >> ip link add bond0 type bond mode active-backup miimon 200 downdelay 10= 0 > updelay 100 > >> > >> ip link add bond0 type bond mode 2 miimon 200 downdelay 100 updelay 10= 0 > >> > >> ip link add bond0 type bond mod=3D2 miimon=3D200 downdelay=3D100 updel= ay=3D100 > > > > 3. all of them return code 0 but when I see the mode using `cat > /proc/net/bonding/bond0`, it shows: > >> > >> localhost:~# cat /proc/net/bonding/bond0 > >> > >> Ethernet Channel Bonding Driver: v6.1.27-2-lts > >> > >> > >> Bonding Mode: load balancing (round-robin) > >> > >> MII Status: up > >> > >> MII Polling Interval (ms): 0 > >> > >> Up Delay (ms): 0 > >> > >> Down Delay (ms): 0 > >> > >> Peer Notification Delay (ms): 0 > >> > >> ..... > > > > > > There must be something wrong with my command, so it result in the > default params > > > > I've ried some way to find the `ip` command manaual, but got nothing > useful. > > > > Thanks! > > It seems you created the bond, but you also need to add interfaces to it? > > Something like: > > ip link set eth0 master bond0 > ip link set eth1 master bond0 > > And then of course you'll need to bring the interface up, etc... > Any reason you don't want to do this via /etc/network/interfaces ? > > Cheers, > > Guido > --000000000000acca6d06076f2a66 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Guido:
=C2=A0 Thanks for your reply. The command yo= u mentioned above is what I am going to run.
=C2=A0 But I am=C2= =A0trapped in the bond-type interface args not being effected.=C2=A0
<= div>=C2=A0 My target is to set the bond0 interface in mode active-backup(mo= de 2), and the command I run to create this interface bond0 did not work
=C2=A0 And in my situation, I just want to run the command once wit= hout saving any file on disk.But I will consider your opinion.
=C2=A0 If we can find the `ip` command or=C2=A0 `bond type` ma= naul , i think we can solve the problem.


Guido Trotter = <ultrotter@debian.org> = =E4=BA=8E2023=E5=B9=B410=E6=9C=8811=E6=97=A5=E5=91=A8=E4=B8=89 19:14=E5=86= =99=E9=81=93=EF=BC=9A
On Wed, 11 Oct 2023 at 09:53, Guning Lin <guningh@gmail.com> wrote:
>
> Hi:
>
> I want to use ip command to config bond interface at once, but it didn= 't work, Can you help me? Here are context:
>
> 1. I have two native interfaces eth0 and eth1
>
> 2. I've tried this command blow to add a bond interface bond0
>>
>> ip link add bond0 type bond mode active-backup miimon 200 downdela= y 100 updelay 100
>>
>> ip link add bond0 type bond mode 2 miimon 200 downdelay 100 updela= y 100
>>
>> ip link add bond0 type bond mod=3D2 miimon=3D200 downdelay=3D100 u= pdelay=3D100
>
> 3. all of them return code 0 but when I see the mode using=C2=A0 `cat = /proc/net/bonding/bond0`, it shows:
>>
>> localhost:~# cat /proc/net/bonding/bond0
>>
>> Ethernet Channel Bonding Driver: v6.1.27-2-lts
>>
>>
>> Bonding Mode: load balancing (round-robin)
>>
>> MII Status: up
>>
>> MII Polling Interval (ms): 0
>>
>> Up Delay (ms): 0
>>
>> Down Delay (ms): 0
>>
>> Peer Notification Delay (ms): 0
>>
>> .....
>
>
> There must be something wrong with my command, so it result in the def= ault params
>
> I've ried some way to find the `ip` command manaual, but got nothi= ng useful.
>
> Thanks!

It seems you created the bond, but you also need to add interfaces to it?
Something like:

ip link set eth0 master bond0
ip link set eth1 master bond0

And then of course you'll need to bring the interface up, etc...
Any reason you don't want to do this via /etc/network/interfaces ?

Cheers,

Guido
--000000000000acca6d06076f2a66--