Keywords: How to Setup Linux Lowest Latency Routes Optimizer. Opensource software that tweaks IP routes on Linux servers or Desktop,most distros covered

How To - Linux Lowest Latency Routes Optimizer (LLLRO)

What is Linux Lowest Latency Routes Optimizer (LLLRO)?

With many websites around the world, it’s impossible to have the fastest connectivity to them all, and it really depends on your ISP and how it routes your traffic to different destinations.

With many factors affecting network performance, there comes on the top the hops it goes through then the number of hops it traverses and while the number of hops may not be a critical issue itself, the fact that it does, could have impacts, such as the likelyhood of these hops changing (the more the hops the higher the probability chances which could be better or worse), or a shared one that gets too overloaded, or one that decides to QoS packets .. and the list goes on. 

Features

    1. Supports most Linux Distros
    2. Autoscans all possible domain resolvable IPs and auto updates routes as dynamic host IPs change
    3. Auto save progress, so when restarted, it doesn’t start from scratch
    4. Auto reload, so when making changes to the config.yaml file, there’s absolutely no need to restart the program, it automatically picks up new changes
    5. Very high performance lightweight software
    6. In-place updates

How it works

LLLRO works by scanning all of the domain names specified in the config and converts them to a set of their resolvable IPs, it then attempts to measure the latency (full round trip time) RTT to each one of those IPs via the Interfaces and Gateways specified in the config.

It then compares the latency across all of the interfaces specified then adds a route for the lowest latency interface.

The Requirements

LLLRO is primarily made for Linux, however if anyone is interested in contributing to its development for other platforms, that’d be cool.

  1. Pretty decent understanding of Linux Route Tables and Network Routes in general
  2. Linux Desktop or Server any specs would do
  3. Multiple NAT Gateway Interfaces
  4. Linux “ping” and “ip” commands installed

    Installation

    Note that if at any point the package you’re trying to use is outdated, you always have the option to download an official binary from the LLLRO project, alternatively you can use the in-place updates by simply running  lllro --update

    Self in-place updates are supported since v0.6

    These are up to date binaries, built in a reproducible and verifiable way, that you can download and run without having to do additional installation work.

    Please see the Official Binaries section below for various downloads. 

    The Configuration File

    Configuration file sample: vim config.yaml
    
    data1:
      listofdomains:
        - malaty.net
        # - mail.malaty.net
        # - pmalaty.com
        # - mail.pmalaty.com
        # - '1.2.3.4'
        # - cloud.pmalaty.com
      listofinterfaces:
        eth0:
         - 192.168.1.1
    
        dell-merc:
         - 192.168.178.2
    
      logging:
        loglevel: logging.DEBUG
        logfilepath: routeoptimizer.log
    
    
      cyclescaninterval: 10
      autodeletepreaddedroutes: 'yes' 
    
      1. listofdomains: is the directive to list all the domains and IPs you want to actively optimize (add as many as you like .. no limits). IPs must be enclosed within single quotes as shown above
      2. listofinterfaces: it’s made up of a nested element in our example you have eth0 and 192.168.1.1, where eth0 is the interface that holds/connects to the NAT Gateway 192.168.1.1
      3. cyclescaninterval: frequency at twhich the program scans your domains for both updated IPs and possible lowest latency routes
      4. autodeletepreaddedroutes: if set to yes, manually added routes will be overwritten, otherwise will be left untouched.

    Documentation

    In order for this program to work, you must have a network setup with accessibility to multiple gateways over multiple NICS, .physical or virtual (makes no difference) 

    For instance on my laptop I have 5 different VPN connections + my default gateway to:

    1. US
    2. JP
    3. SG
    4. DE
    5. UK

    we’ll assume each one of these VPN interfaces is called:

    1. if-us
    2. if-jp
    3. if-sg
    4. if-de
    5. if-uk

    Respectively.

    That said, each one of these VPN interfaces must be natting at the other end of the tunnel endpoint, that’s to say if it terminates in DE, it must have NATTING enabled.

    The program will essentially tries to find hich one of these NICS is the best Lowest Latency Route to route your domain IPs via.

    Known Limitations

    Program will not be able to determine the lowest latency route if PING (ICMP) is not allowed on the target host/domain/ip.

    Downloads

    Latest Linux Lowest Latency Routes Optimizer Binary

    Git Source Code

    Program is equipped with self in-place updates simply run lllro --update

    Keywords: How to Setup Linux Lowest Latency Routes Optimizer. Opensource software that tweaks IP routes on Linux servers or Desktop,most distros covered