Ping geht auf einem Interface raus und kommt bei einem anderen wieder an

jeudi 6 août 2015

Hallo Forum,

der lokale Server beherbergt mehrere Netzwerkkarten. Davon sind aktuell 2 aktiviert (em3, em4). Zuweilen habe ich das Problem, dass Anfragen welche versandt werden am falschen Interface wieder ankommen und somit das Problem, dass ein Programm welches auf die Antwort wartet irgendwann in ein Timeout rennt. Das Problem tritt willkürlich auf. Es funktioniert einmal nicht mehr und Sekunden später ist alles wieder wunderbar.

Hier erstmal die Netzwerkrelevanten Einstellungen:

Code:

~# ifconfig
em3      Link encap:Ethernet  HWaddr 0c:c4:7a:07:6f:9e
          inet addr:192.168.2.22  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::ec4:7aff:fe07:6f9e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21775759 errors:0 dropped:315588 overruns:0 frame:0
          TX packets:10529684 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:20083677569 (20.0 GB)  TX bytes:7324674782 (7.3 GB)
          Memory:f7200000-f7280000

em4      Link encap:Ethernet  HWaddr 0c:c4:7a:07:6f:9f
          inet addr:192.168.2.138  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::ec4:7aff:fe07:6f9f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:29297890 errors:0 dropped:315300 overruns:0 frame:0
          TX packets:23666584 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:16619657410 (16.6 GB)  TX bytes:13673952907 (13.6 GB)
          Memory:f7100000-f7180000

Code:

~# route
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
default        192.168.2.1 0.0.0.0        UG    0      0        0 em3
192.168.2.0    *              255.255.255.0  U    0      0        0 em4
192.168.2.0    *              255.255.255.0  U    0      0        0 em3

Code:

~# iptables -L
Chain INPUT (policy ACCEPT)
target    prot opt source              destination

Chain FORWARD (policy ACCEPT)
target    prot opt source              destination

Chain OUTPUT (policy ACCEPT)
target    prot opt source              destination

Code:

~# iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target    prot opt source              destination

Chain INPUT (policy ACCEPT)
target    prot opt source              destination

Chain OUTPUT (policy ACCEPT)
target    prot opt source              destination

Chain POSTROUTING (policy ACCEPT)
target    prot opt source              destination

Und hier jetzt das Problem:

Code:

:~# ping api.afterbuy.de
PING api.afterbuy.de (62.104.45.141) 56(84) bytes of data.

--- api.afterbuy.de ping statistics ---
78 packets transmitted, 0 received, 100% packet loss, time 77614ms

Ping geht auf em3 raus ...
Code:

:~# tcpdump icmp -n -i em3
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on em3, link-type EN10MB (Ethernet), capture size 65535 bytes
14:12:38.481904 IP 192.168.2.22 > 62.104.45.141: ICMP echo request, id 23019, seq 32, length 64
14:12:39.489944 IP 192.168.2.22 > 62.104.45.141: ICMP echo request, id 23019, seq 33, length 64
14:12:40.497960 IP 192.168.2.22 > 62.104.45.141: ICMP echo request, id 23019, seq 34, length 64

... und kommt auf em4 wieder an.
Code:

~# tcpdump icmp -n -i em4
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on em4, link-type EN10MB (Ethernet), capture size 65535 bytes
14:12:55.688363 IP 62.104.45.141 > 192.168.2.22: ICMP echo reply, id 23019, seq 49, length 64
14:12:56.690082 IP 62.104.45.141 > 192.168.2.22: ICMP echo reply, id 23019, seq 50, length 64
14:12:57.696711 IP 62.104.45.141 > 192.168.2.22: ICMP echo reply, id 23019, seq 51, length 64

Sekunden Später wieder alles ganz normal
Code:

:~# ping api.afterbuy.de
PING api.afterbuy.de (62.104.45.141) 56(84) bytes of data.
64 bytes from api2.afterbuy.de (62.104.45.141): icmp_seq=1 ttl=55 time=63.5 ms
64 bytes from api2.afterbuy.de (62.104.45.141): icmp_seq=2 ttl=55 time=63.1 ms

--- api.afterbuy.de ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms

Diese Programme die diese Requests absetzen, laufen teilweise sehr lange. Das heißt bis zu 8 Stunden mit ~100000 Requests. Wenn nun mitten drin dieses Problem auftritt ist das ziehmlich ärgerlich.

Ich hoffe es kann mir jemand weiterhelfen.


0 commentaires:

Enregistrer un commentaire

 

Lorem

Ipsum

Dolor