link load balancing and removal of routing cache

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Starting with 3.6, routing cache is removed from the kernel. (
http://article.gmane.org/gmane.linux.network/238256 )

We were using multiple nexthop type default gateways formerly. (
http://lartc.org/howto/lartc.rpdb.multiple-links.html#AEN297
 )

Routing cache was providing some sort of persistency which is tunable
by kernel tunables.
After removal of kernel routing cache, no persistency exists and
stateful connections are broken easily. I have added an example below.

What would be your suggestions for replacement?

# ip ro sh
default
        nexthop via 192.168.1.11  dev eth0 weight 1
        nexthop via 192.168.1.9  dev eth0 weight 20
....


I am starting conection with first modem(18:28:61:be:5c:2a):
12:04:21.698995 00:90:0b:2f:a9:08 > 18:28:61:be:5c:2a, ethertype IPv4
(0x0800), length 66: (tos 0x0, ttl 127, id 11561, offset 0, flags
[DF], proto: TCP (6), length: 52) 192.168.1.2.55274 >
95.0.100.100.ssh: S, cksum 0xd43c (correct), 2720674654:2720674654(0)
win 8192 <mss 1460,nop,wscale 2,nop,nop,sackOK>
12:04:21.721449 18:28:61:be:5c:2a > 00:90:0b:2f:a9:08, ethertype IPv4
(0x0800), length 66: (tos 0x0, ttl  56, id 0, offset 0, flags [DF],
proto: TCP (6), length: 52) 95.0.100.100.ssh > 192.168.1.2.55274: S,
cksum 0x1922 (correct), 1426419511:1426419511(0) ack 2720674655 win
5840 <mss 1452,nop,nop,sackOK,nop,wscale 7>
12:04:21.723167 00:90:0b:2f:a9:08 > 18:28:61:be:5c:2a, ethertype IPv4
(0x0800), length 54: (tos 0x0, ttl 127, id 11562, offset 0, flags
[DF], proto: TCP (6), length: 40) 192.168.1.2.55274 >
95.0.100.100.ssh: ., cksum 0x2f82 (correct), 1:1(0) ack 1 win 16698
12:04:21.754352 18:28:61:be:5c:2a > 00:90:0b:2f:a9:08, ethertype IPv4
(0x0800), length 74: (tos 0x0, ttl  56, id 9882, offset 0, flags [DF],
proto: TCP (6), length: 60) 95.0.100.100.ssh > 192.168.1.2.55274: P,
cksum 0xbacc (correct), 1:21(20) ack 1 win 46
12:04:21.793737 00:90:0b:2f:a9:08 > 18:28:61:be:5c:2a, ethertype IPv4
(0x0800), length 82: (tos 0x0, ttl 127, id 11565, offset 0, flags
[DF], proto: TCP (6), length: 68) 192.168.1.2.55274 >
95.0.100.100.ssh: P, cksum 0x3a44 (correct), 1:29(28) ack 21 win 16693
12:04:21.793938 00:90:0b:2f:a9:08 > 18:28:61:be:5c:2a, ethertype IPv4
(0x0800), length 566: (tos 0x0, ttl 127, id 11566, offset 0, flags
[DF], proto: TCP (6), length: 552) 192.168.1.2.55274 >
95.0.100.100.ssh: P 29:541(512) ack 21 win 16693
12:04:21.793962 00:90:0b:2f:a9:08 > 18:28:61:be:5c:2a, ethertype IPv4
(0x0800), length 158: (tos 0x0, ttl 127, id 11567, offset 0, flags
[DF], proto: TCP (6), length: 144) 192.168.1.2.55274 >
95.0.100.100.ssh: P 541:645(104) ack 21 win 16693
12:04:21.816333 18:28:61:be:5c:2a > 00:90:0b:2f:a9:08, ethertype IPv4
(0x0800), length 60: (tos 0x0, ttl  56, id 9883, offset 0, flags [DF],
proto: TCP (6), length: 40) 95.0.100.100.ssh > 192.168.1.2.55274: .,
cksum 0x705e (correct), 21:21(0) ack 29 win 46
12:04:21.817960 18:28:61:be:5c:2a > 00:90:0b:2f:a9:08, ethertype IPv4
(0x0800), length 758: (tos 0x0, ttl  56, id 9884, offset 0, flags
[DF], proto: TCP (6), length: 744) 95.0.100.100.ssh >
192.168.1.2.55274: P 21:725(704) ack 29 win 46
12:04:21.819322 18:28:61:be:5c:2a > 00:90:0b:2f:a9:08, ethertype IPv4
(0x0800), length 60: (tos 0x0, ttl  56, id 9885, offset 0, flags [DF],
proto: TCP (6), length: 40) 95.0.100.100.ssh > 192.168.1.2.55274: .,
cksum 0x6b2e (correct), 725:725(0) ack 645 win 54
12:04:21.820550 00:90:0b:2f:a9:08 > 18:28:61:be:5c:2a, ethertype IPv4
(0x0800), length 70: (tos 0x0, ttl 127, id 11572, offset 0, flags
[DF], proto: TCP (6), length: 56) 192.168.1.2.55274 >
95.0.100.100.ssh: P, cksum 0x33fe (correct), 645:661(16) ack 725 win
16517
12:04:21.849141 18:28:61:be:5c:2a > 00:90:0b:2f:a9:08, ethertype IPv4
(0x0800), length 334: (tos 0x0, ttl  56, id 9886, offset 0, flags
[DF], proto: TCP (6), length: 320) 95.0.100.100.ssh >
192.168.1.2.55274: P 725:1005(280) ack 661 win 54
12:04:21.885862 00:90:0b:2f:a9:08 > 18:28:61:be:5c:2a, ethertype IPv4
(0x0800), length 326: (tos 0x0, ttl 127, id 11574, offset 0, flags
[DF], proto: TCP (6), length: 312) 192.168.1.2.55274 >
95.0.100.100.ssh: P 661:933(272) ack 1005 win 16447
12:04:21.952337 18:28:61:be:5c:2a > 00:90:0b:2f:a9:08, ethertype IPv4
(0x0800), length 60: (tos 0x0, ttl  56, id 9887, offset 0, flags [DF],
proto: TCP (6), length: 40) 95.0.100.100.ssh > 192.168.1.2.55274: .,
cksum 0x68ed (correct), 1005:1005(0) ack 933 win 63
12:04:21.969984 18:28:61:be:5c:2a > 00:90:0b:2f:a9:08, ethertype IPv4
(0x0800), length 902: (tos 0x0, ttl  56, id 9888, offset 0, flags
[DF], proto: TCP (6), length: 888) 95.0.100.100.ssh >
192.168.1.2.55274: P 1005:1853(848) ack 933 win 63

Suddenly nexthop delivers a packet to second modem(b0:48:7a:fa:cb:b0):
12:04:22.013441 00:90:0b:2f:a9:08 > b0:48:7a:fa:cb:b0, ethertype IPv4
(0x0800), length 70: (tos 0x0, ttl 127, id 11576, offset 0, flags
[DF], proto: TCP (6), length: 56) 192.168.1.2.55274 >
95.0.100.100.ssh: P, cksum 0xa961 (correct), 933:949(16) ack 1853 win
16698
12:04:22.013609 00:90:0b:2f:a9:08 > 18:28:61:be:5c:2a, ethertype IPv4
(0x0800), length 106: (tos 0x0, ttl 127, id 11577, offset 0, flags
[DF], proto: TCP (6), length: 92) 192.168.1.2.55274 >
95.0.100.100.ssh: P 949:1001(52) ack 1853 win 16698

Second modem sends Reset:
12:04:22.022728 b0:48:7a:fa:cb:b0 > 00:90:0b:2f:a9:08, ethertype IPv4
(0x0800), length 60: (tos 0x0, ttl  55, id 0, offset 0, flags [DF],
proto: TCP (6), length: 40) 95.0.100.100.ssh > 192.168.1.2.55274: R,
cksum 0x3f16 (correct), 1426421364:1426421364(0) win 0

Connection broken after this point.

Ref:
http://article.gmane.org/gmane.linux.network/238256
http://vger.kernel.org/~davem/columbia2012.pdf
https://home.regit.org/2013/03/david-miller-routing-cache-is-dead-now-what/


--
Oguz YILMAZ
--
To unsubscribe from this list: send the line "unsubscribe lartc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux