Received: from mail-oa1-x2b.google.com (mail-oa1-x2b.google.com [IPv6:2001:4860:4864:20::2b]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 7B0E92234A5 for <~alpine/users@lists.alpinelinux.org>; Wed, 11 Oct 2023 14:03:55 +0000 (UTC) Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-1d544a4a2f2so4546169fac.3 for <~alpine/users@lists.alpinelinux.org>; Wed, 11 Oct 2023 07:03:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697033034; x=1697637834; darn=lists.alpinelinux.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=YILiKPhfIyUzV456bnFN8fhetKNR7g4tF8mwNlryd4U=; b=WW4nvehCSVFBfCkVCbaJzBQCDTvHKDJKECDhfLXI06GrpThO205ZUe+utdI0JC+stQ co9Tdj5MYBg1RCeuofdcA/pQd8+O0VAnFa5GWyXmQxedmQSWdRcarTElEmBhhtejHdQT lXuakyesolVkpJGRqMrVdcRihJ2PsYcqBLMTYwxHt0f7piinrW7LZVsJjFbyFD1wsYAQ N/lo/X5XTbocPjT5mEBiDK6FBzzzsjCoGmKPMnKzS8lBshuoAsII8wqu8/+BEmjE36mx znAdW1D1zEexBpFrQW1vDV4D29kDpT1XulM0IXRBqKIIFEKo4BOFUUeJ2D0jKjGnyaZy pETw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697033034; x=1697637834; h=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=YILiKPhfIyUzV456bnFN8fhetKNR7g4tF8mwNlryd4U=; b=gLOGcO1oU76RnVbznYFoCWZhc8lBUk+bBoM4vXDnpxqHpXnG3YGI8Qqlkd47qYK2vR fWjEtqVIW06dfleURppv5ILA2bznDM0sOvuB6kS0tKRbRoxfWWzfAPtis51ud9hCSjkN tG4AsYjBhqsVuinbFyH8Q7TGh4et6X3vG+VntatjYF4tB4h2ZyRkcrJc/2Vnl45vs7ix 26f/r+PY7ri1oqOnC8Tb15e1PTZtjW29iJZXnBm8EISs3S30YThVtATpZv6XM1OV7tzq 51hB500yq64AAsfrdysftY7Mv3bIzoeJCReEIEO7uwxyc7U1P/YdUDM71PZEte7ODngC qZ/g== X-Gm-Message-State: AOJu0YwOQhNBoDmTEDUC2dcZ7dguLqa04Zi9Qz0Fk3Be+9Aj+GQ7WezL 1v2hwK5HPgvjGQSUREun0SDhsF8W8ukQAjQ5bAI= X-Google-Smtp-Source: AGHT+IGy/KQ22v7z6Dm1MLjQkvioeye6pNuFfnXZ8zbT81dMi96lBSB0Ax2nQScDMKJK+KyJVKBhSCvLCtBmxm21Kss= X-Received: by 2002:a05:6870:f808:b0:1e9:6722:b428 with SMTP id fr8-20020a056870f80800b001e96722b428mr5199120oab.31.1697033032579; Wed, 11 Oct 2023 07:03:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Guning Lin Date: Wed, 11 Oct 2023 22:03:41 +0800 Message-ID: Subject: Re: using ip command to config bond interface To: noloader@gmail.com, ~alpine/users@lists.alpinelinux.org Content-Type: multipart/alternative; boundary="000000000000143d1f0607714b00" --000000000000143d1f0607714b00 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Jeff: I read the manul you provided above and try some commands again. Here is my commands and outputs: ----- localhost:~# ip link del bond0 localhost:~# ip link add bond0 type bond mode active-backup localhost:~# cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v6.1.27-2-lts Bonding Mode: load balancing (round-robin) MII Status: down MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 ----- localhost:~# ip link del bond0 localhost:~# ip link add bond0 type bond mode=3Dactive-backup localhost:~# cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v6.1.27-2-lts Bonding Mode: load balancing (round-robin) MII Status: down MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 ----- localhost:~# ip link del bond0 localhost:~# ip link add bond0 type bond "mode=3Dactive-backup" localhost:~# cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v6.1.27-2-lts Bonding Mode: load balancing (round-robin) MII Status: down MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 ----- localhost:~# ip link del bond0 localhost:~# ip link add bond0 type bond "mode active-backup" localhost:~# cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v6.1.27-2-lts Bonding Mode: load balancing (round-robin) MII Status: down MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 ----- localhost:~# ip link del bond0 localhost:~# ip link add bond0 type bond mode=3D1 localhost:~# cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v6.1.27-2-lts Bonding Mode: load balancing (round-robin) MII Status: down MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 ....... Still get the wrong result. I notice that this line "Ethernet Channel Bonding Driver: v6.1.27-2-lts" is diffrent from the line in CentOS7: ----- [root@guning ~]# cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: None MII Status: down MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 ---- (Yes, the first command I try in alpine work in CentOS!!!) The ip-link(8) https://man7.org/linux/man-pages/man8/ip-link.8.html did not tell me the BOND ARGS FORMAT. Jeffrey Walton =E4=BA=8E2023=E5=B9=B410=E6=9C=8811=E6= =97=A5=E5=91=A8=E4=B8=89 20:03=E5=86=99=E9=81=93=EF=BC=9A > On Wed, Oct 11, 2023 at 7:32=E2=80=AFAM Guning Lin wr= ote: > > > > 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. > > According to the ip(8) man page on Debian: > > HISTORY > ip was written by Alexey N. Kuznetsov and added in Linux 2.2. > > SEE ALSO > ip-address(8), ip-addrlabel(8), ip-ioam(8), ip-l2tp(8), ip-link(8), > ip- > maddress(8), ip-monitor(8), ip-mptcp(8), ip-mroute(8), > ip-neighbour(8), > ip-netns(8), ip-ntable(8), ip-route(8), ip-rule(8), > ip-tcp_metrics(8), > ip-token(8), ip-tunnel(8), ip-vrf(8), ip-xfrm(8) > IP Command reference ip-cref.ps > > REPORTING BUGS > Report any bugs to the Network Developers mailing list dev@vger.kernel.org> where the development and maintenance is > primarily > done. You do not have to be subscribed to the list to send a messa= ge > there. > > AUTHOR > Original Manpage by Michail Litvak > > Jeff > --000000000000143d1f0607714b00 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Jeff:
I read the manul you provided above and try s= ome commands again. Here is my commands and outputs:
-----
<= div>localhost:~# ip link del bond0
localhost:~# ip link add bond0 type b= ond mode active-backup
localhost:~# cat /proc/net/bonding/bond0
Ether= net Channel Bonding Driver: v6.1.27-2-lts

Bonding Mode: load balanci= ng (round-robin)
MII Status: down
MII Polling Interval (ms): 0
Up = Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0
<= /div>
-----
localhost:~# ip link del bond0
localhost:~# ip= link add bond0 type bond mode=3Dactive-backup
localhost:~# cat /proc/ne= t/bonding/bond0
Ethernet Channel Bonding Driver: v6.1.27-2-lts

Bo= nding Mode: load balancing (round-robin)
MII Status: down
MII Polling= Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notific= ation Delay (ms): 0
-----
localhost:~# ip link del bond= 0
localhost:~# ip link add bond0 type bond "mode=3Dactive-backup&qu= ot;
localhost:~# cat /proc/net/bonding/bond0
Ethernet Channel Bonding= Driver: v6.1.27-2-lts

Bonding Mode: load balancing (round-robin)MII Status: down
MII Polling Interval (ms): 0
Up Delay (ms): 0
Do= wn Delay (ms): 0
Peer Notification Delay (ms): 0
-----
localhost:~# ip link del bond0
localhost:~# ip link add bond0 typ= e bond "mode active-backup"
localhost:~# cat /proc/net/bonding= /bond0
Ethernet Channel Bonding Driver: v6.1.27-2-lts

Bonding Mod= e: load balancing (round-robin)
MII Status: down
MII Polling Interval= (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Del= ay (ms): 0
-----
localhost:~# ip link del bond0
= localhost:~# ip link add bond0 type bond mode=3D1
localhost:~# cat /proc= /net/bonding/bond0
Ethernet Channel Bonding Driver: v6.1.27-2-lts
Bonding Mode: load balancing (round-robin)
MII Status: down
MII Poll= ing Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
Peer Noti= fication Delay (ms): 0

.......

<= /div>
Still get the wrong result.
I notice that this line &qu= ot;Ethernet Channel Bonding Driver: v6.1.27-2-lts"=C2=A0 is diffrent f= rom the line in CentOS7:
-----
[root@guning ~]# cat /pr= oc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, = 2011)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave= : None
Currently Active Slave: None
MII Status: down
MII Polling I= nterval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
---= -
(Yes, the first command I try in alpine work in CentOS!!!)

The ip-link(8)=C2=A0https://man7.org/linux/man-pages/man8/ip-lin= k.8.html did not tell me the BOND ARGS FORMAT.


Jeff= rey Walton <noloader@gmail.com= > =E4=BA=8E2023=E5=B9=B410=E6=9C=8811=E6=97=A5=E5=91=A8=E4=B8=89 20:03= =E5=86=99=E9=81=93=EF=BC=9A
On Wed, Oct 11, 2023 at 7:32=E2=80=AFAM Guning Lin <guningh@gmail.com> w= rote:
>
> Hi Guido:
>=C2=A0 =C2=A0Thanks for your reply. The command you mentioned above is = what I am going to run.
>=C2=A0 =C2=A0But I am trapped in the bond-type interface args not being= effected.
>=C2=A0 =C2=A0My target is to set the bond0 interface in mode active-bac= kup(mode 2), and the command I run to create this interface bond0 did not w= ork
>=C2=A0 =C2=A0And in my situation, I just want to run the command once w= ithout saving any file on disk.But I will consider your opinion.
>
>=C2=A0 =C2=A0If we can find the `ip` command or=C2=A0 `bond type` manau= l , i think we can solve the problem.

According to the ip(8) man page on Debian:

HISTORY
=C2=A0 =C2=A0 =C2=A0 ip was written by Alexey N. Kuznetsov and added in Lin= ux 2.2.

SEE ALSO
=C2=A0 =C2=A0 =C2=A0 ip-address(8), ip-addrlabel(8), ip-ioam(8), ip-l2tp(8)= , ip-link(8), ip-
=C2=A0 =C2=A0 =C2=A0 maddress(8), ip-monitor(8), ip-mptcp(8), ip-mroute(8),= ip-neighbour(8),
=C2=A0 =C2=A0 =C2=A0 ip-netns(8), ip-ntable(8), ip-route(8), ip-rule(8), ip= -tcp_metrics(8),
=C2=A0 =C2=A0 =C2=A0 ip-token(8), ip-tunnel(8), ip-vrf(8), ip-xfrm(8)
=C2=A0 =C2=A0 =C2=A0 IP Command reference ip-cref.ps

REPORTING BUGS
=C2=A0 =C2=A0 =C2=A0 Report any bugs to the Network Developers mailing list= <net=E2=80=90
=C2=A0 =C2=A0 =C2=A0 dev@vger.kernel.org> where the development and maintenance is pri= marily
=C2=A0 =C2=A0 =C2=A0 done.=C2=A0 You do not have to be subscribed to the li= st to send a message
=C2=A0 =C2=A0 =C2=A0 there.

AUTHOR
=C2=A0 =C2=A0 =C2=A0 Original Manpage by Michail Litvak <mci@owl.openwall.com>

Jeff
--000000000000143d1f0607714b00--