1

I have two linux servers. Each have 2 ethernet ports. I connect port-to-port with straight-through ethernet cables between the 2 servers (there is no network switches involved). I want to bond the 2 interfaces on each side so I have one interface with the sum total of bandwidth. When I use balance-alb for bond, a ping will only work from one side to the other but not vice versa. When I down one of the two slave interfaces then i can ping both directions suddenly. Is it possible what I am trying to do ? I know it works when I use active-backup but that is not what I want. Would multi-pathing do what I want perhaps ? This is what my config looks like at the moment.

[root@cmet1 network-scripts]# cat ifcfg-eth0
DEVICE=eth0                                 
HWADDR=D8:9D:67:20:2C:28                    
TYPE=Ethernet                               
UUID=e34ac205-edae-4983-ac66-4479a8727a49   
ONBOOT=yes                                  
NM_CONTROLLED=no                            
BOOTPROTO=none                              
MASTER=bond0
SLAVE=yes

[root@cmet1 network-scripts]# cat ifcfg-eth1
DEVICE=eth1
HWADDR=D8:9D:67:20:2C:2C
TYPE=Ethernet
UUID=766df09e-2eb8-435a-bdc1-046d12cbd390
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
MASTER=bond0
SLAVE=yes

[root@cmet1 network-scripts]# cat ifcfg-bond0
DEVICE=bond0
IPADDR=10.0.0.1
NETMASK=255.255.255.0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
NM_CONTROLLED=no
BONDING_OPTS="miimon=1000 mode=balance-alb"
Waslap
  • 121
  • 5
  • FYI - if you bond two GigE ports, your total aggregate bandwidth will be 2Gbps, but any one individual network flow is limited to the bandwidth of a single member port. – EEAA Aug 21 '14 at 12:11
  • I understand that yes and it is not a concern for me as there are multiple flows so they would be able to make use of the individual links if only I could get it to work. – Waslap Aug 21 '14 at 12:58
  • Asymmetric PING like that is odd because you need bidirectional low-level communication to get it working in even one direction. I would fire up tshark on both ends, see what packets you can see in the two cases. See if there is any difference when you drop one interface. Have you tried dropping the other interface, BTW. – richardb Aug 21 '14 at 13:32
  • So what I'm trying to do should work in principle? I mean this type of bonding should work peer to peer and not necessarily need a switch in between ? I'll down both in succession tomorrow to give feedback but I'm sure individually the interfaces works. – Waslap Aug 21 '14 at 19:12
  • @EEAA The per flow limitation could be overcome by using MPTCP, and then you wouldn't even need bonding. Alas, I don't know of any distribution shipping with MPTCP support, so it would probably mean one would have to build a kernel. – kasperd Nov 17 '14 at 21:54

1 Answers1

0

Buy a $10 switch off eBay, or a refurbished managed Layer 2 Cisco if you're a business.

This is not what bonding is meant for, nobody develops or tests for this. Link monitoring may or may not work depending on your NIC.

Get a switch.

suprjami
  • 3,476
  • 20
  • 29