You are not logged in.

#1 2019-08-27 10:57:39

shlevy
Member
Registered: 2019-08-27
Posts: 6

bonding - unable to bond

Hi all.

I have a machine with 2 ethernet connection (eth1 and eth2).
both has an (different) IP address, and both answer to ping.

I'm trying to bond this tow connections,
I went through step by step this wiki page - https://wiki.archlinux.org/index.php/Netctl#Bonding
and these are the results:

* both original connections stil hase an IPs

* cat /proc/net/bonding/bond0 return:
     Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

     Bonding Mode: load balancing (round-robin)
     MII Status: down
     MII Polling Interval (ms): 0
     Up Delay (ms): 0
     Down Delay (ms): 0

* cat /etc/netctl/bond0 return:
     Description="A bonded interface"
     Interface=bond0
     Connection=bond
     BindsToInterfaces=(eth0 eth1)
     IP=dhcp
     IP6-stateless
     #Mode=balance-rr

* ip addr show bond0 return:
     9: bond0: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 8a:52:0e:bf:0a:7c brd ff:ff:ff:ff:ff:ff

So according to above, bond is down.
how can I set bond up? am I missing something?

Thanks in advance

Last edited by shlevy (2019-08-27 11:27:45)

Offline

#2 2019-08-27 12:57:05

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,563

Re: bonding - unable to bond

Is the profile enabled in netctl?
https://wiki.archlinux.org/index.php/Netctl

Edit: Also I just noticed your interfaces are eth1 and eth2 and you have eth0 and eth1 in bonding.

Last edited by d_fajardo (2019-08-27 12:59:19)

Offline

#3 2019-08-28 10:28:58

shlevy
Member
Registered: 2019-08-27
Posts: 6

Re: bonding - unable to bond

d_fajardo thanks for the quick

yes the profile is enabled -
# netctl list
* bond0

also I created 4 files;
# cat /etc/modprobe.d/bonding.conf
alias bond0 bonding

# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
NAME=bond0
TYPE=Bond
BONDING_MASTER=yes
IPADDR=10.56.182.111
PREFIX=24
ONBOOT=yes
BOOTPROTO=none
BONDING_OPS="mode=1 miimon=100"

# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
NAME=bond0-slave
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes

# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
NAME=bond0-slave
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes


ifconfig show:
bond0: flags=5123<UP,BROADCAST,MASTER,MULTICAST>  mtu 1500
        inet6 fe80::c423:cfe:2bd2:e657  prefixlen 64  scopeid 0x20<link>
        ether 02:e6:2e:cb:af:fe  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.56.180.56  netmask 255.255.252.0  broadcast 10.56.183.255
        inet6 fdfc:641b:400:14:f0a8:bcaa:15ec:26bd  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::7167:b6c2:7f16:8450  prefixlen 64  scopeid 0x20<link>
        inet6 fdfc:641b:400:14:20d:f9ff:fe02:5f8  prefixlen 64  scopeid 0x0<global>
        ether 00:0d:f9:02:05:f8  txqueuelen 1000  (Ethernet)
        RX packets 41822  bytes 4249021 (4.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2070  bytes 300540 (293.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0xdffc0000-dffe0000

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.56.182.130  netmask 255.255.252.0  broadcast 10.56.183.255
        inet6 fdfc:641b:400:14:2ff:d81c:1489:b587  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::3d90:1674:9982:807b  prefixlen 64  scopeid 0x20<link>
        inet6 fdfc:641b:400:14:290:fbff:fe43:d97e  prefixlen 64  scopeid 0x0<global>
        ether 00:90:fb:43:d9:7e  txqueuelen 1000  (Ethernet)
        RX packets 43453  bytes 4401499 (4.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 914  bytes 107319 (104.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 17  memory 0xdfae0000-dfb00000

I expected that the results will be:
bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>
and
eth0: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>
eth1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>

any Idea what I'm missing?

Offline

#4 2019-08-28 10:51:00

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: bonding - unable to bond

Please use [ code ] [ /code ] tags for pasting command output.

Offline

#5 2019-08-28 11:24:16

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,563

Re: bonding - unable to bond

Hi shlevy, can you post the ouput of ip link? ifconfig doesn't show the state of your interfaces somehow. And yes please use code tags.

Offline

#6 2019-08-28 11:33:38

shlevy
Member
Registered: 2019-08-27
Posts: 6

Re: bonding - unable to bond

sorry, will do...

 
# ip link

output:

 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 00:0d:f9:02:05:f8 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 00:90:fb:43:d9:7e brd ff:ff:ff:ff:ff:ff
4: bond0: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether 02:e6:2e:cb:af:fe brd ff:ff:ff:ff:ff:ff

Offline

#7 2019-08-28 11:54:32

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,563

Re: bonding - unable to bond

Can you post the output of netctl status bond0? It might give us more info to debug.
Another way I would go about it is to remove all your added scripts (you can save a copy somewhere). For some reason  the /etc/sysconfig directory doesn't exist in my system.
You can check /etc/systemd/system/netctl@bond0.service.d and see if you have the profile listed in there.

Offline

#8 2019-08-28 13:37:10

shlevy
Member
Registered: 2019-08-27
Posts: 6

Re: bonding - unable to bond

d_fajardo thanks again for you help.

d_fajardo wrote:

Can you post the output of netctl status bond0?

● netctl@bond0.service - A bonded interface
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/netctl@bond0.service.d
           └─profile.conf
   Active: active (exited) since Wed 2019-08-28 11:43:32 IDT; 4h 48min ago
     Docs: man:netctl.profile(5)
  Process: 281 ExecStart=/usr/lib/netctl/network start bond0 (code=exited, status=0/SUCCESS)
 Main PID: 281 (code=exited, status=0/SUCCESS)
   Status: "online"

Aug 28 11:43:32 keshetArchLinuxSL systemd[1]: Starting A bonded interface...
Aug 28 11:43:32 keshetArchLinuxSL network[281]: /etc/netctl/bond0: line 6: IP6-stateless: command not found
Aug 28 11:43:32 keshetArchLinuxSL network[281]: Starting network profile 'bond0'...
Aug 28 11:43:32 keshetArchLinuxSL network[281]: Error: Device can not be enslaved while up.
Aug 28 11:43:32 keshetArchLinuxSL network[281]: Error: Device can not be enslaved while up.
Aug 28 11:43:32 keshetArchLinuxSL systemd[1]: Started A bonded interface.
Aug 28 11:43:32 keshetArchLinuxSL network[281]: Started network profile 'bond0'
d_fajardo wrote:

Another way I would go about it is to remove all your added scripts

Do you mean the scripts under /etc/sysconfig/network-scripts/ ?

d_fajardo wrote:

You can check /etc/systemd/system/netctl@bond0.service.d and see if you have the profile listed in there.

There is a single profile, named "profile.conf", and its content is:

[Unit]
Description=A bonded interface
BindsTo=sys-subsystem-net-devices-eth0.device
BindsTo=sys-subsystem-net-devices-eth1.device
After=sys-subsystem-net-devices-eth0.device
After=sys-subsystem-net-devices-eth1.device

Offline

#9 2019-08-28 16:52:21

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,563

Re: bonding - unable to bond

Aug 28 11:43:32 keshetArchLinuxSL network[281]: Error: Device can not be enslaved while up.
Aug 28 11:43:32 keshetArchLinuxSL network[281]: Error: Device can not be enslaved while up.

This seems to be the problem. I'm not really sure but perhaps try bringing your physical eth0 and eth1 interfaces down and restarting netctl? It seems that's what it needs. By the look of it, everything seems to be in place otherwise.

Aug 28 11:43:32 keshetArchLinuxSL network[281]: /etc/netctl/bond0: line 6: IP6-stateless: command not found

There is also an error in your profile script: IPV6=stateless not IPV6-stateless

Last edited by d_fajardo (2019-08-28 16:53:14)

Offline

#10 2019-08-28 19:35:44

shlevy
Member
Registered: 2019-08-27
Posts: 6

Re: bonding - unable to bond

d_fajardo thanks a lot, it seems to work now,
bondo now has an IP, and it answer to ping if atleast one of the ethernet connetcion is connected.

eth0 & eth1 must be up, otherwise it wont work,
I still dont know why eth0 & eth1 still has an IP

 ifconfig
 
bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  mtu 1500
        inet 10.56.180.137  netmask 255.255.252.0  broadcast 10.56.183.255
        inet6 fdfc:641b:400:14:b655:bbdb:621d:198b  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::540:4bfa:f188:d83c  prefixlen 64  scopeid 0x20<link>
        inet6 fdfc:641b:400:14:ac4d:13be:12b4:c64d  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::20d:f9ff:fe02:5f8  prefixlen 64  scopeid 0x20<link>
        inet6 fdfc:641b:400:14:20d:f9ff:fe02:5f8  prefixlen 64  scopeid 0x0<global>
        ether 00:0d:f9:02:05:f8  txqueuelen 1000  (Ethernet)
        RX packets 14529  bytes 1281070 (1.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1293  bytes 131873 (128.7 KiB)
        TX errors 0  dropped 76 overruns 0  carrier 0  collisions 0

eth0: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        inet 10.56.182.64  netmask 255.255.252.0  broadcast 10.56.183.255
        inet6 fe80::73e5:101:a885:95bb  prefixlen 64  scopeid 0x20<link>
        ether 00:0d:f9:02:05:f8  txqueuelen 1000  (Ethernet)
        RX packets 8877  bytes 791428 (772.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 993  bytes 105232 (102.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0xdffc0000-dffe0000

eth1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        inet 10.56.182.130  netmask 255.255.252.0  broadcast 10.56.183.255
        inet6 fe80::73e5:101:a885:95bb  prefixlen 64  scopeid 0x20<link>
        ether 00:0d:f9:02:05:f8  txqueuelen 1000  (Ethernet)
        RX packets 8583  bytes 759622 (741.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 587  bytes 68548 (66.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 17  memory 0xdfae0000-dfb00000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 743  bytes 72140 (70.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 743  bytes 72140 (70.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Does it matter?

Offline

#11 2019-08-28 20:37:56

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,563

Re: bonding - unable to bond

I don't think it matters. The way I understand it the interfaces need an IP to be up.
But do check with cat /proc/net/bonding/bond0 to see if all is OK.

Last edited by d_fajardo (2019-08-28 20:39:37)

Offline

#12 2019-08-29 04:45:59

shlevy
Member
Registered: 2019-08-27
Posts: 6

Re: bonding - unable to bond

According to /proc/net/bonding/bond0 everyfing seems to be OK.

so problem solved,
Thank you very much d_fajardo for all your help

Offline

#13 2019-08-29 05:21:38

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,563

Re: bonding - unable to bond

Great. Please mark your post as solved.

Offline

Board footer

Powered by FluxBB