LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-13-2012, 11:14 AM   #1
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Rep: Reputation: 57
How to transfer data through several VPN tunnels simultaneously


Several VPN tunnels are available for anonymity. But they are all bandwidth-limited, and some are unreliable. Let's say they are accessible through interfaces eth0, eth1, eth2, ...

1. How can a linux box be set up to use all these VPN tunnels simultaneously in order to increase bandwidth for browsing?

2. How can redundancy be added so data is transferred in duplicates through interfaces eth0 and eth1?

3. Is it possible that an rsh session goes through all VPN tunnels, as in 1 and 2 above?

Last edited by Ulysses_; 05-13-2012 at 12:47 PM.
 
Old 05-14-2012, 12:25 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
By design a VPN is supposed to not be able to share data. One can break that.

For the most part, you can't speed up by using more than one. An old modem used two phone lines but it had to have the similar box at the other end.

No, you can't split up a tcp/ip transaction connection.
 
Old 05-14-2012, 02:38 PM   #3
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Been recommended to use ifenslave for this, not sure what it does. Is it breaking some unwritten rules?
 
Old 05-14-2012, 06:56 PM   #4
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
You could theoretically turn the machine into a router and essentially look at each connection as a WAN connection then via load balancing you could take advantage of more than one tunnel at a time, however, it won't do things like speed a download up, because the download will only happen over one pipe. But multiple browser requests or multiple downloads could be conducted in parallel faster.
 
Old 05-14-2012, 07:41 PM   #5
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
The man pages of ifenslave say:

"ifenslave is a tool to attach and detach slave network devices to a bonding device. A bonding device will act like a normal Ethernet network device to the kernel, but will send out the packets via the slave devices using a simple round-robin scheduler. This allows for simple load-balancing, identical to "channel bonding" or "trunking" techniques used in switches. The following example shows how to setup a bonding device and enslave two real Ethernet devices to it:

# modprobe bonding
# ifconfig bond0 192.168.0.1 netmask 255.255.0.0
# ifenslave bond0 eth0 eth1

What does the bold mean, if not sending the packets of a single connection through several devices eth0, eth1, etc?
 
Old 05-14-2012, 07:59 PM   #6
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Even if a connection can only go through one of the slave devices, how can a remote server help so a connection is artificially split at my end, and rejoined at the remote server end? So the site visited thinks everything is coming from the remote server.

What about TCP over UDP? TCP making the connection, UDP individual packets getting shared by ifenslave between the slave devices, and the remote server putting them back together? Something like TCP over UDP seems to exist already:

"iproxy comprises of a client-side proxy and a server-side proxy that
allows arbitrary TCP/IP services to run over Broadcast, Multicast or
Unicast UDP."

http://horms.net/projects/iproxy/ipr...roxy_paper.pdf

Last edited by Ulysses_; 05-14-2012 at 08:16 PM.
 
Old 05-14-2012, 11:55 PM   #7
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
TCP and UDP are two protocols in the TCP/IP netowrking suite. you shouldn't really do TCP over UDP unless you are running something like a VPN tunnel. The reason for this is TCP is for for reliable communication where all the packets need to be received, where as UDP is used in cases where some loss is acceptable, like video streaming. The only issue I see with TCP over UDP is that if the UDP stream is very lossy it will significantly slow down the TCP traffic because they TCP packet will have to be transmitted again, more frequently by additional UDP packets.

What the bold in your earlier post means is that it will round robin connections through the interface that are slaved, that does not mean for instance you start streaming a video and each packet comes in from a different interface. But it does mean you start streaming a video and it used one of the connections then you start a download it uses another and then you browse the web and it uses yet another.

That project "iproxy" sounds interesting, but it still doesn't sound quite like what you are looking for. Yes it does allow TCP traffic over UDP packets, but the software implements the error checking that would normally be done by the TCP protocol natively. It still doesn't really do what you want it to do, and I can think of very few situations where this would be some thing you want to do. As a mater of fact early on in the PDF you link to the stated purpose for implementing this initially was to configure servers that didn't all ready have IP addresses via web browser, a very special case.
 
Old 05-15-2012, 03:06 AM   #8
nikmit
Member
 
Registered: May 2011
Location: Nottingham, UK
Distribution: Debian
Posts: 178

Rep: Reputation: 34
If you can configure two servers at both ends of the links to be aggregated, then theoretically you can run a protocol similar to Cisco's etherchannel to bundle up multiple interfaces and increase bandwidth. A requirement for etherchannels however is that the interfaces are of the same type and speed. In our theoretical setup, you will need to have similar delays over all the links, or put up with large buffers and increasing the total delay to that of the worst link which I suspect will defeat the purpose of the whole excercise.

Even if you have 2-3 poor quality links of very similar average delay, the actual delay is going to vary hugely and you will need to always go as fast as your slowest link. So the overall result could easily be negative...

These are just my thoughts, I am tempted to experiment with this in a lab
 
Old 05-15-2012, 04:39 AM   #9
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Having difficulty locating a protocol similar to etherchannel in the debian repos. Any suggestions what should be looked for?
 
Old 05-15-2012, 05:02 AM   #10
nikmit
Member
 
Registered: May 2011
Location: Nottingham, UK
Distribution: Debian
Posts: 178

Rep: Reputation: 34
Looking at http://www.kernel.org/doc/Documentat...ng/bonding.txt i think you are already onto the right tool.
 
Old 05-15-2012, 02:45 PM   #11
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
That one will round-robin connections, not individual packets, according to scheidel21 above.
 
Old 05-15-2012, 06:17 PM   #12
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
No bonding is a little different than round robin, ifenslave that you were looking at does a basic round robin. Bonding uses a bit of a more complex algorithm. There are actually many ways to load balance. ifenslave is a simple way to do so.
 
Old 05-16-2012, 02:53 AM   #13
nikmit
Member
 
Registered: May 2011
Location: Nottingham, UK
Distribution: Debian
Posts: 178

Rep: Reputation: 34
Section 12.1.1 in the link above outlines the different modes of operation. First paragraph:
Quote:
balance-rr: This mode is the only mode that will permit a single
TCP/IP connection to stripe traffic across multiple
interfaces. It is therefore the only mode that will allow a
single TCP/IP stream to utilize more than one interface's
worth of throughput.
I am not saying it is the best mode, this will depend on your topology and usage patterns.
 
Old 05-16-2012, 04:31 AM   #14
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Quote:
Originally Posted by scheidel21 View Post
No bonding is a little different than round robin, ifenslave that you were looking at does a basic round robin. Bonding uses a bit of a more complex algorithm. There are actually many ways to load balance. ifenslave is a simple way to do so.
Round-robing or not, no load balancing with the bonding driver has been described in full yet that will put a connection through all network interfaces simultaneously. If this is supported by the bonding driver, how do we set it up?

Last edited by Ulysses_; 05-16-2012 at 04:34 AM.
 
Old 05-16-2012, 08:23 PM   #15
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
True, but nikmit points out that that balance-rr basically does what you want. Now how to implement it, I unfortunately can't say. I'm not even sure if it will work with different IPs on each interface. Usually it's multiple interfaces bonded together into one large interface basically.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How the Governments discover Illegal VOIP over VPN Tunnels ??? abakhiet Linux - Server 1 04-01-2011 04:59 AM
Sending and receiving data simultaneously using BSD sockets nagaraju1024 Linux - Networking 2 06-27-2010 10:17 PM
[SOLVED] Network manager overwrite resolvconf vpn data with eth0 data rein2red Debian 1 03-21-2010 02:14 PM
memcpy_toio transfers data in 4 byte chunks, but I need to transfer data in one lump. jbreaka4lyfe Linux - Embedded & Single-board computer 2 06-02-2008 11:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration