Bonding - Problem mit ALB

Hi,

ich möchte den Bonding Treiber im ALB Modus nutzen um Zugriffe auf ein iSCSI Enterprise Target zu load balancen. Das Betriebssystem ist Debian Squeeze. Problem ist, dass die IP Adresse von bond0 von manchen Servern aus erreichbar ist, von anderen aus aber nicht. Ich vermute hier ein Problem mit dem ALB - deswegen bin ich hier ;)

/etc/network/interfaces
Code:
root@labstorage:~# cat /etc/network/interfaces 
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto eth1
iface eth1 inet manual

auto bond0
iface bond0 inet static 
        address 10.10.80.3
        netmask 255.255.255.0
        network 10.10.80.0
        broadcast 10.10.80.255
        gateway 10.10.80.1
        slaves eth0 eth1
        bond-mode balance-alb
        bond-miimon 100
        bond-downdelay 200
        bond-updelay 200

auto vlan55
iface vlan55 inet static
        address 10.10.55.3
        network 10.10.55.0
        netmask 255.255.255.0
        broadcast 10.10.55.255
        vlan-raw-device bond0
root@labstorage:~#

/proc/net/bonding/bond0
Code:
root@labstorage:~# cat /proc/net/bonding/bond0 
Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008)

Bonding Mode: adaptive load balancing
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 200
Down Delay (ms): 200

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:1b:21:38:ef:07

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:1b:21:38:ec:f4
root@labstorage:~#

ifconfig
Code:
root@labstorage:~# ifconfig -a
bond0     Link encap:Ethernet  HWaddr 00:1b:21:38:ef:07  
          inet addr:10.10.80.3  Bcast:10.10.80.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:21ff:fe38:ef07/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:772833 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1411375 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:460695204 (439.3 MiB)  TX bytes:1652308204 (1.5 GiB)

eth0      Link encap:Ethernet  HWaddr 00:1b:21:38:ef:07  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:758440 errors:0 dropped:0 overruns:0 frame:0
          TX packets:967661 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:459807269 (438.5 MiB)  TX bytes:1200737289 (1.1 GiB)

eth1      Link encap:Ethernet  HWaddr 00:1b:21:38:ec:f4  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:14393 errors:0 dropped:0 overruns:0 frame:0
          TX packets:443714 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:887935 (867.1 KiB)  TX bytes:451570915 (430.6 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:205 errors:0 dropped:0 overruns:0 frame:0
          TX packets:205 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:16824 (16.4 KiB)  TX bytes:16824 (16.4 KiB)

vlan55    Link encap:Ethernet  HWaddr 00:1b:21:38:ef:07  
          inet addr:10.10.55.3  Bcast:10.10.55.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:21ff:fe38:ef07/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:721824 errors:0 dropped:0 overruns:0 frame:0
          TX packets:658667 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:447099881 (426.3 MiB)  TX bytes:1557374766 (1.4 GiB)

root@labstorage:~#

ethtool
Code:
root@labstorage:~# ethtool eth0
Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: umbg
        Wake-on: g
        Current message level: 0x00000007 (7)
        Link detected: yes
root@labstorage:~# ethtool eth1
Settings for eth1:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: umbg
        Wake-on: g
        Current message level: 0x00000007 (7)
        Link detected: yes
root@labstorage:~#

Hier sieht man auch wunderbar wie es von einem Server aus funktioniert, vom anderen aus nicht:

Code:
mathias@x61t ~ $ ssh 10.10.80.2
...
mathias@lab-pxeboot:~$ ping 10.10.80.3
PING 10.10.80.3 (10.10.80.3) 56(84) bytes of data.
^C
--- 10.10.80.3 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3024ms

mathias@lab-pxeboot:~$ exit
logout
Connection to 10.10.80.2 closed.
mathias@x61t ~ $ ssh 10.10.80.1
...
mathias@gateway:~$ ping 10.10.80.3
PING 10.10.80.3 (10.10.80.3) 56(84) bytes of data.
64 bytes from 10.10.80.3: icmp_req=1 ttl=64 time=0.311 ms
64 bytes from 10.10.80.3: icmp_req=2 ttl=64 time=0.192 ms
^C
--- 10.10.80.3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.192/0.251/0.311/0.061 ms                                                                                              
mathias@gateway:~$

Beide sind ja im selben Subnet, ist also sicher kein routing Problem.

Switch-seitig ist ja meines Wissens nach für ALB nichts weiter notwendig. Der Switch ist ein Linksys SRW2016. Die Server hängt an den Ports 6 und 16 vom Switch:

Code:
srw2016# show interfaces status
                                             Flow Link          Back   Mdix
Port     Type         Duplex  Speed Neg      ctrl State       Pressure Mode
-------- ------------ ------  ----- -------- ---- ----------- -------- -------
g1       1G-Copper      --      --     --     --  Down           --     --    
g2       1G-Copper    Full    10    Enabled  Off  Up          Disabled On     
g3       1G-Copper      --      --     --     --  Down           --     --    
g4       1G-Copper      --      --     --     --  Down           --     --    
g5       1G-Copper    Full    10    Enabled  Off  Up          Disabled On     
g6       1G-Copper    Full    1000  Enabled  Off  Up          Disabled On     
g7       1G-Copper      --      --     --     --  Down           --     --    
g8       1G-Combo-C     --      --     --     --  Down           --     --    
g9       1G-Copper      --      --     --     --  Down           --     --    
g10      1G-Copper    Full    10    Enabled  Off  Up          Disabled Off    
g11      1G-Copper      --      --     --     --  Down           --     --    
g12      1G-Copper      --      --     --     --  Down           --     --    
g13      1G-Copper    Full    1000  Enabled  Off  Up          Disabled Off    
g14      1G-Copper      --      --     --     --  Down           --     --    
g15      1G-Copper    Full    1000  Disabled Off  Up          Disabled Off    
g16      1G-Combo-C   Full    1000  Disabled Off  Up          Disabled Off    

                                          Flow    Link        
Ch       Type    Duplex  Speed  Neg      control  State       
-------- ------- ------  -----  -------- -------  ----------- 
ch1      1G      Full    1000   Disabled Off      Up          
ch2         --     --      --      --       --    Not Present 
ch3         --     --      --      --       --    Not Present 
ch4         --     --      --      --       --    Not Present 
ch5         --     --      --      --       --    Not Present 
ch6         --     --      --      --       --    Not Present 
ch7         --     --      --      --       --    Not Present 
ch8         --     --      --      --       --    Not Present 
srw2016#


srw2016# show interfaces switchport ethernet g6
Port : g6
Port Mode: General
Gvrp Status: disabled
Ingress Filtering: true
Acceptable Frame Type: admitAll
Ingress UnTagged VLAN ( NATIVE ): 80
Protected: Disabled

Port is member in:


Vlan               Name               Egress rule Port Membership Type
---- -------------------------------- ----------- --------------------
 50               Lab 1                 Tagged           Static
 51               Lab 2                 Tagged           Static
 52               Lab 3                 Tagged           Static
 53               Lab 4                 Tagged           Static
 54               Lab 5                 Tagged           Static
 55               Lab 6                 Tagged           Static
 56               Lab 7                 Tagged           Static
 57               Lab 8                 Tagged           Static
 58               Lab 9                 Tagged           Static
 59               Lab 10                Tagged           Static
 80           Lab Management           Untagged          Static


Forbidden VLANS:

Vlan               Name
---- --------------------------------


Classification rules:
srw2016#


srw2016# show interfaces switchport ethernet g13
Port : g13
Port Mode: General
Gvrp Status: disabled
Ingress Filtering: true
Acceptable Frame Type: admitAll
Ingress UnTagged VLAN ( NATIVE ): 80
Protected: Disabled
 
Port is member in: 
 

Vlan               Name               Egress rule Port Membership Type 
---- -------------------------------- ----------- -------------------- 
 50               Lab 1                 Tagged           Static        
 51               Lab 2                 Tagged           Static        
 52               Lab 3                 Tagged           Static        
 53               Lab 4                 Tagged           Static        
 54               Lab 5                 Tagged           Static        
 55               Lab 6                 Tagged           Static        
 56               Lab 7                 Tagged           Static        
 57               Lab 8                 Tagged           Static        
 58               Lab 9                 Tagged           Static        
 59               Lab 10                Tagged           Static        
 80           Lab Management           Untagged          Static        

 
Forbidden VLANS: 

Vlan               Name               
---- -------------------------------- 

 
Classification rules: 
srw2016#
srw2016# show vlan

Vlan       Name                   Ports                Type     Authorization
---- ----------------- --------------------------- ------------ -------------
 1           1                   ch(1-8)              other       Required
 4        Office         g(1-5,7-12,14),ch(1-2)     permanent     Required
 5         WiFi          g(1-5,7-12,14),ch(1-2)     permanent     Required
 6        Storage        g(1-5,7-12,14),ch(1-2)     permanent     Required
 7      Production       g(1-5,7-12,14),ch(1-2)     permanent     Required
 20         DSL          g(1-5,7-12,14),ch(1-2)     permanent     Required
 50        Lab 1             g(1-14),ch(1-2)        permanent     Required
 51        Lab 2             g(1-14),ch(1-2)        permanent     Required
 52        Lab 3             g(1-14),ch(1-2)        permanent     Required
 53        Lab 4             g(1-14),ch(1-2)        permanent     Required
 54        Lab 5             g(1-14),ch(1-2)        permanent     Required
 55        Lab 6             g(1-14),ch(1-2)        permanent     Required
 56        Lab 7             g(1-14),ch(1-2)        permanent     Required
 57        Lab 8             g(1-14),ch(1-2)        permanent     Required
 58        Lab 9             g(1-14),ch(1-2)        permanent     Required
 59       Lab 10             g(1-14),ch(1-2)        permanent     Required
 80   Lab Management         g(1-14),ch(1-2)        permanent     Required

srw2016#

Hat jemand ne Idee? Mir gehen sie langsam aus :D


Grüße
serow
 
hast du dir mal die ARP Caches der geht/geht nicht Server angeschaut?

kenne mich leider nicht wirklich mit linux-bonding aus,
weiß aber aus Erfahrung mit anderen "Netzwerkgeräten" das LAG/LACP und ähnlich gerne mal solche Probleme macht...

Gruß levvel
 
Hi,

habe ich gerade auf deinen Tip hin getan:

Server mit dem ALB:
eth0 => 00:1b:21:38:ef:07
eth1 => 00:1b:21:38:ec:f4
bond0 => gleich eth0

10.10.80.2 (geht nicht):
Code:
mathias@lab-pxeboot:~$ sudo arp -an | grep 10.10.80.3
? (10.10.80.3) at 00:1b:21:38:ec:f4 [ether] on eth0
mathias@lab-pxeboot:~$

10.10.80.1 (geht):
Code:
[sudo] password for mathias: 
? (10.10.80.3) at 00:1b:21:38:ef:07 [ether] on vlan80
mathias@gateway:~$

Die 10.10.80.1 geht also über eth0, die 10.10.80.2 über eth1.

Bringt mich jetzt leider nicht weiter ...

ciao
serow
 
Hallo nochmal,

ich habe gerade noch etwas interessantes festgestellt: Arping funktioniert von beiden Servern aus, ICMP Ping nur von einem:

10.10.80.1:
Code:
root@gateway:~# ping 10.10.80.3
PING 10.10.80.3 (10.10.80.3) 56(84) bytes of data.
64 bytes from 10.10.80.3: icmp_req=1 ttl=64 time=0.197 ms
^C
--- 10.10.80.3 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.197/0.197/0.197/0.000 ms
root@gateway:~# arping 10.10.80.3
ARPING 10.10.80.3
60 bytes from 00:1b:21:38:ef:07 (10.10.80.3): index=0 time=349.998 usec
60 bytes from 00:1b:21:38:ef:07 (10.10.80.3): index=1 time=241.041 usec
60 bytes from 00:1b:21:38:ef:07 (10.10.80.3): index=2 time=223.160 usec
^C
--- 10.10.80.3 statistics ---
3 packets transmitted, 3 packets received,   0% unanswered (0 extra)
root@gateway:~#

10.10.80.2:
Code:
mathias@lab-pxeboot:~$ ping 10.10.80.3
PING 10.10.80.3 (10.10.80.3) 56(84) bytes of data.
^C
--- 10.10.80.3 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3024ms

mathias@lab-pxeboot:~$ sudo arping 10.10.80.3
ARPING 10.10.80.3
60 bytes from 00:1b:21:38:ec:f4 (10.10.80.3): index=0 time=202.894 usec
60 bytes from 00:1b:21:38:ec:f4 (10.10.80.3): index=1 time=135.899 usec
60 bytes from 00:1b:21:38:ec:f4 (10.10.80.3): index=2 time=185.966 usec
^C
--- 10.10.80.3 statistics ---
3 packets transmitted, 3 packets received,   0% unanswered (0 extra)
mathias@lab-pxeboot:~$

Das heisst, dass wir ein Layer 2 Problem schonmal ausschließen können, würde ich sagen. Also der Switch ist nicht "verkonfiguriert" oder ähnliches.

Hier sieht man was der Server bei einem Dauerping der beiden Server 10.10.80.1 und 10.10.80.2 sieht:

Code:
mathias@labstorage:~$ sudo tcpdump -i eth1 icmp
tcpdump: WARNING: eth1: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 65535 bytes
10:33:23.460872 IP 10.10.80.2 > 10.10.80.3: ICMP echo request, id 8401, seq 10, length 64
10:33:24.459873 IP 10.10.80.2 > 10.10.80.3: ICMP echo request, id 8401, seq 11, length 64
10:33:25.458826 IP 10.10.80.2 > 10.10.80.3: ICMP echo request, id 8401, seq 12, length 64
10:33:26.458726 IP 10.10.80.2 > 10.10.80.3: ICMP echo request, id 8401, seq 13, length 64
10:33:27.458677 IP 10.10.80.2 > 10.10.80.3: ICMP echo request, id 8401, seq 14, length 64
10:33:28.458677 IP 10.10.80.2 > 10.10.80.3: ICMP echo request, id 8401, seq 15, length 64
10:33:31.458629 IP 10.10.80.2 > 10.10.80.3: ICMP echo request, id 8401, seq 18, length 64
10:33:32.458580 IP 10.10.80.2 > 10.10.80.3: ICMP echo request, id 8401, seq 19, length 64
10:33:33.458631 IP 10.10.80.2 > 10.10.80.3: ICMP echo request, id 8401, seq 20, length 64
^C
9 packets captured
9 packets received by filter
0 packets dropped by kernel
mathias@labstorage:~$ sudo tcpdump -i eth0 icmp
tcpdump: WARNING: eth0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
10:33:37.010946 IP 10.10.80.1 > 10.10.80.3: ICMP echo request, id 15528, seq 19, length 64
10:33:37.010964 IP 10.10.80.3 > 10.10.80.1: ICMP echo reply, id 15528, seq 19, length 64
10:33:38.010941 IP 10.10.80.1 > 10.10.80.3: ICMP echo request, id 15528, seq 20, length 64
10:33:38.010948 IP 10.10.80.3 > 10.10.80.1: ICMP echo reply, id 15528, seq 20, length 64
10:33:39.010937 IP 10.10.80.1 > 10.10.80.3: ICMP echo request, id 15528, seq 21, length 64
10:33:39.010943 IP 10.10.80.3 > 10.10.80.1: ICMP echo reply, id 15528, seq 21, length 64
^C
6 packets captured
6 packets received by filter
0 packets dropped by kernel
mathias@labstorage:~$ sudo tcpdump -i bond0 icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on bond0, link-type EN10MB (Ethernet), capture size 65535 bytes
10:33:45.010915 IP 10.10.80.1 > 10.10.80.3: ICMP echo request, id 15528, seq 27, length 64
10:33:45.010931 IP 10.10.80.3 > 10.10.80.1: ICMP echo reply, id 15528, seq 27, length 64
10:33:46.010910 IP 10.10.80.1 > 10.10.80.3: ICMP echo request, id 15528, seq 28, length 64
10:33:46.010917 IP 10.10.80.3 > 10.10.80.1: ICMP echo reply, id 15528, seq 28, length 64
10:33:47.010857 IP 10.10.80.1 > 10.10.80.3: ICMP echo request, id 15528, seq 29, length 64
10:33:47.010862 IP 10.10.80.3 > 10.10.80.1: ICMP echo reply, id 15528, seq 29, length 64
10:33:48.010902 IP 10.10.80.1 > 10.10.80.3: ICMP echo request, id 15528, seq 30, length 64
10:33:48.010907 IP 10.10.80.3 > 10.10.80.1: ICMP echo reply, id 15528, seq 30, length 64
10:33:49.010849 IP 10.10.80.1 > 10.10.80.3: ICMP echo request, id 15528, seq 31, length 64
10:33:49.010853 IP 10.10.80.3 > 10.10.80.1: ICMP echo reply, id 15528, seq 31, length 64
^C
10 packets captured
10 packets received by filter
0 packets dropped by kernel
mathias@labstorage:~$

Er sieht also ICMP requests auf eth1 hereinkommen, geantwortet wird jedoch nicht. Auf eth0 sieht er natürlich nur die ICMP requests und replies des anderen Servers. bond0 sieht auch nur die funktionierenden.


ciao
serow
 
Zuletzt bearbeitet:
Gerade habe ich spasseshalber mal eth0 und eth1 in den Promiscuous Mode gesetzt und schon ging es! Alle Server sind jetzt in der Lage die 10.10.80.3 zu erreichen. Ich verstehe nur nicht warum ... Promisc Mode heisst ja nur, dass die Netzwerkkarte Traffic der nicht an sie adressiert ist (layer 2) jetzt nicht mehr droppt. Dazu dürfte es doch aber garnicht kommen. Jeder NIC hat sein eigene MAC und eth1 sollte ja garkeine Frames adressiert an eth0 bekommen... 8o
 
hmm, grübel grübel..
so richtig fällt mir auch nix ein!

wie sieht denn die routing table aus?
steht da nur eine defaultroute (fürs bond0)?
 
Hi,

Code:
mathias@labstorage:~$ sudo ip route show
10.10.55.0/24 dev vlan55  proto kernel  scope link  src 10.10.55.3
10.10.80.0/24 dev bond0  proto kernel  scope link  src 10.10.80.3
default via 10.10.80.1 dev bond0
mathias@labstorage:~$

scheint alles über bond0 zu laufen - nur vlan55 steht extra drin.

Wenn ich die Doku zu balance-alb so lese, soll es wohl auch garnicht notwendig sein eth0 und eth1 in den Promisc Mode zu setzen. Eigentlich klar - warum auch ...

Grüße
serow
 
Hi,

würde es helfen mal balance-rr zu testen? Wenn der auch nicht funktioniert, hat vllt die Netzwerkkarte nen Schlag weg!? Dazu brauche ich eigentlich nur eine Link Aggregation Group ohne LACP auf dem Switch oder?

Grüße
serow
 
also zu dem alb mode fällt mir jetzt auch nix ein, warum das so nicht geht...
(bzw. nur im promiscuous mode :rolleyes:

Mir ist ein Etherchannel (Trunk) eh sympathischer :wink:
 
Etherchannel (Trunk)

Dann sag mir mal was ich dazu einstellen muss. Mein Switch unterstützt kein Etherchannel. Was ich switch-seitig anbieten kann ist eine Link Aggregation Group auf welcher ich optional LACP aktivieren kann. Welchen bonding mode brauche ich dazu auf dem Server?

Dann würde mich noch interessieren welchen Algorithmus zu Verteilung er dann nutzt. Sicher auch nur was MAC basiertes oder?

Grüße
serow
 
ups mein Fehler, nicht nochmal gelesen was für ein Switch das war :rolleyes:
Mode 4 -> bond_mode 802.3ad

zur zweiten Frage -> ja
 
Zurück
Oben