ip route cache expires / age

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

 



Hi,

This is my first post so please feel free to point out any slips in netiquette...

I'm using ip route to create a load-balanced use of 2 internet connections, in most respects it works correctly - i.e. traffic gets routed over both connections. However, one 'feature' of the load balancing is that routes get cached and don't change if they're in more or less continuous use - this is exactly the behaviour I need. Unfortunately some routes don't seem to behave like this and it seems to be the ones with an 'expires' time. For example I have:

atom3:~# ip -s route show cache 209.85.229.99
209.85.229.99 from 192.168.0.165 via 192.168.0.200 dev eth0
    cache  users 1 age 16sec mtu 1500 advmss 1460 hoplimit 64
209.85.229.99 via 192.168.0.200 dev eth0  src 192.168.0.165
    cache  users 1 used 2 age 15sec mtu 1500 advmss 1460 hoplimit 64

With no expires on and from my experiments if I keep up a simple ping then the route is retained.

However the following route:

atom3:~# ip -s route show cache 92.63.131.67
92.63.131.67 from 10.50.0.1 via 10.50.0.2 dev tun0
    cache  users 1 used 103 age 1sec mtu 1500 advmss 1460 hoplimit 64
92.63.131.67 via 10.50.0.2 dev tun0  src 10.50.0.1
cache expires 79sec users 1 used 209 age 1sec mtu 1480 advmss 1460 hoplimit 64

has an expires time and when it expires it can get thrown over to the other connection (which would disconnect any open sessions that check IP consistency...)

This seems to be the case depending on which gateway is being used. You'll notice that the second link is via a tunnel.

Firstly, am I correct in thinking that the 'expires' time is what causes the cache to get cleared regardless of ages and secondly, if so, is there any way of controlling the expires behaviour or even finding out why it gets set so I can find a mitigating measure? I can post more details about the network as it is purely a test bed at this point - its fairly complex so I didn't want to post a load of irrelevant information....

Thanks in advance,

Alex Masidlover


--
Open Source Specialist
Axiom Tech Limited
W: http://www.axiomtech.co.uk
T: 0845 1270316

Axiom Tech is a Limited Company registered in England and Wales at 92 Didsbury
Road, Stockport, SK4 2JL.  Axiom Tech's company number is 5684132, our VAT
registration number is 878 6568 46.
Unless agreed otherwise, all services and products supplied by Axiom Tech are
subject to our standard terms and conditions, available on request.
--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux