tsunami-udp: faster than rsync


  1. build
    1. sudo apt-get install git gcc
    2. sudo apt-get install automake autoconf
    3. git clone git://github.com/rriley/tsunami-udp.git
    4. cd tsunami-udp
    5. ./recompile.sh
    6. sudo make install
  2. run
    1. you'll need a port open to allow direct connection from client to server
      1. unfortunately, this doesn't work through NAT firewalls alone
      2. firewall / port forwarding
        1. to server, TCP, 46224 by default
        2. to client, UDP, 46224 by default
    2. start up server
      1. tsunamid myfile.gz
    3. connect with client
      1. tsunami set rate 5M connect myserver.domain.com get myfile.gz
      2. it will flood your connection if you dont set rate properly
  3. documentation
    1. http://tsunami-udp.cvs.sourceforge.net/viewvc/tsunami-udp/docs/USAGE.txt
    2. splits files automatically
    3. allows wildcards when running server and client commands, "*", namely
      1. client will auto-find all files served, one after the next
      2. use forward-slash, i.e. get \*, for client command 
        1. so bash doesn't intrepret the asterisk
  4. undocumented
    1. doesn't do subdirectories, better tar that up and have plenty of disk space

Comments

  1. Thx! This article helps me!
    How you solve problem UDP through NAT ?

    ReplyDelete
  2. Does your NAT server have iptables installed? Maybe something like this on the server side:

    iptables -t nat -A PREROUTING -s 5.4.3.2/32 -d 10.10.10.10/32 -i eth0 -p tcp -m tcp --sport 1024:65535 --dport 46224 -j DNAT --to-destination 10.10.10.11:46224

    where 5.4.3.2 is your public/external IP, 10.10.10.10 is the internal IP of your NAT server and 10.10.10.11 is internal IP of tsunami server. Any firewalls must be opened, allows packets from 5.4.3.2 to flow to NAT server and tsunami server on port 46224.

    Haven't tried this myself, would probably require more tweaks. Do a packet dump on all servers and look for clogged/blocked packets:

    tcpdump -nn port 46224

    ReplyDelete
    Replies
    1. Thanks for you replay! Will try it!
      I have found another way - make tunnel with special program. Not tested yet:
      source:
      http://courses.cs.vt.edu/~cs5565/spring2012/projects/project2/router.c

      The better way before start using Tsunami UDP protocol use STUN server for detect possibility of using.
      Example:
      $ stun stun.ekiga.net -p 46224
      STUN client version 0.96
      Primary: Indepndent Mapping, Port Dependent Filter, random port, will hairpin
      Return value is 0x000006

      This mean you can't use Tsunami, because NAT.

      I have try from real server in inet without nat:
      # stun stun.ekiga.net -p 46224
      STUN client version 0.96
      Primary: Open
      Return value is 0x000001

      This means you can use Tsunami, because no NAT.


      Now i think about TURN proto. Do you know anything about it?

      P.S. Sorry for my bad english.

      Delete
  3. Thanks for the documentation. On Ubuntu 14.04 I had to install the package build-essential before ./recompile.sh would work correctly

    ReplyDelete

Post a Comment

Popular posts from this blog

Openvpn and unbound combined break dig command

Stress Linux system: stress-ng

Google Nexus 4: permanent back panel glass repair for less than a penny