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=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=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 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=1
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 <noloader@gmail.com> 于2023年10月11日周三 20:03写道:
> On Wed, Oct 11, 2023 at 7:32 AM Guning Lin <guningh@gmail.com> wrote:
> >
> > 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 <net‐
> 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 message
> there.
>
> AUTHOR
> Original Manpage by Michail Litvak <mci@owl.openwall.com>
>
> Jeff
>
On Wed, 11 Oct 2023 at 16:04, Guning Lin <guningh@gmail.com> wrote:
>
> 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
Just checking: did you do "apk add iproute2" ?
It seems the "ip" version that comes by default in busybox may not
support all options and might be ignoring your arguments.
I was able to reproduce your error on busybox, and it went away after
I installed iproute2
Alternatively the wiki suggests installing the "bonding" packages and
configuring through the interfaces file which I guess does it
differently.
Cheers,
Guido
Thanks, I'll check it out!
Guido Trotter <ultrotter@debian.org> 于2023年10月11日周三 23:01写道:
> On Wed, 11 Oct 2023 at 16:04, Guning Lin <guningh@gmail.com> wrote:
> >
> > 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
>
> Just checking: did you do "apk add iproute2" ?
> It seems the "ip" version that comes by default in busybox may not
> support all options and might be ignoring your arguments.
> I was able to reproduce your error on busybox, and it went away after
> I installed iproute2
>
> Alternatively the wiki suggests installing the "bonding" packages and
> configuring through the interfaces file which I guess does it
> differently.
>
> Cheers,
>
> Guido
>
It works! Thank you so much!
Guning Lin <guningh@gmail.com> 于2023年10月11日周三 23:44写道:
> Thanks, I'll check it out!
>
> Guido Trotter <ultrotter@debian.org> 于2023年10月11日周三 23:01写道:
>
>> On Wed, 11 Oct 2023 at 16:04, Guning Lin <guningh@gmail.com> wrote:
>> >
>> > 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
>>
>> Just checking: did you do "apk add iproute2" ?
>> It seems the "ip" version that comes by default in busybox may not
>> support all options and might be ignoring your arguments.
>> I was able to reproduce your error on busybox, and it went away after
>> I installed iproute2
>>
>> Alternatively the wiki suggests installing the "bonding" packages and
>> configuring through the interfaces file which I guess does it
>> differently.
>>
>> Cheers,
>>
>> Guido
>>
>