LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-06-2009, 02:11 PM   #1
web_janitor
LQ Newbie
 
Registered: Nov 2008
Location: USA
Distribution: rhell 4/5
Posts: 18

Rep: Reputation: 1
Asymmetric routing - what's so bad?


I have a question about asymmetric routing - I've been searching the web and reading docs for the past couple of days, but still haven't found satisfactory answers.

We have a 100 megabit load balancer. One of my servers is connected to it via a gigabit ethernet NIC (eth0). Unfortunately, we really need faster gigabit speeds, since the load balancer is limiting us to 100 megabits/second. We still need the device plugged into the load balancer because there are other machines coming online that we will need to load balance between.

However, for certain network operations we can live without the redundancy of a load balancer in order to garner higher speeds. So we configured a second gigabit ethernet NIC (eth1) to be plugged into a layer 2 gigabit switch. It has a different IP than eth0 and is on a different subnet. By doing this, all traffic going through eth1 will uses gigabit speeds.

When we activate eth1, suddenly we cannot hit the URL configured on the load balancer. It hangs in the browser. One of our support folks said the https connection is failing because it's routing traffic asymmetrically - traffic coming into eth0 via the load balancer is going out through eth1 via the layer 2 switch.

But what's so bad about this? More importantly, why does this make the URL configured on the load balancer inaccessible?

I've read elsewhere on the internet that asymmetrical routing can be implemented. In fact, I've modified Linux's routing table to add 2 host entries to our most network-intensive servers, so that the gigabit eth1 NIC is ONLY communicating with these 2 servers and no other servers. Now everything is working again, but I don't quite understand how it was failing in the first place.

Thanks for your responses in advance.
 
Old 02-07-2009, 06:26 AM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
The kernel picks the shortest route when sending a response to an incoming packet. What you did caused the following:
Code:
(source address of request)-------------->(address of eth0)kernel composes response, shortest route to src via eth1
                          ^---------------(address of eth1)
This doesn't work because the original request from (source address, call it 1.2.3.4) went to the IP of eth0 (well, the VIP on the load balancer actually), call it 5.6.7.8. However the box receiving that packet decided that eth1 was a shorter route back to 1.2.3.4, so it composes a response packet out eth1 and gives the response a source address of 6.7.8.9 (the IP of eth1). When the response arrives at 1.2.3.4 that host looks at the packet and sees that it came from 6.7.8.9, but 1.2.3.4 never made a request to 6.7.8.9, so it throws away the packet and waits for a response from 5.6.7.8 (which never comes).

It is possible to make asymmetric routing work, but you have to perform NAT or some other trickery to make sure the source of the return packets gets rewritten as the destination of the original request, rather than the IP of the interface that sends the response.

The situation you describe is usually called "triangular routing" because it takes the form: A sends to B, B sends packet through C, A gets response from C.
 
  


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
asymmetric priviledges for sharing anonymous mmapped data between processes dumbsnake Programming 8 10-01-2008 09:18 PM
asymmetric key cryptography leedude General 7 09-19-2008 08:12 AM
Bad mount of .mdf - "wrong fs type, bad option, bad superblock, on /dev/loop0" Maybe-not Linux - General 2 02-29-2008 01:30 PM
mount: wrong fs type, bad option, bad superblock on /dev/cdrom, Adil_uk Linux - Hardware 9 02-16-2005 05:50 PM
mount: wrong fs type, bad option, bad superblock on /dev/sdb1 pmoreira Linux - Hardware 5 02-26-2004 10:31 AM

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

All times are GMT -5. The time now is 06:29 AM.

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