LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 01-16-2013, 06:25 AM   #1
shogun1234
Member
 
Registered: May 2004
Posts: 167

Rep: Reputation: 15
Mutiple IPs and network cards routing (source policy routing?)


I have a machine which has 2 IP addresses and 2 network cards. Both IP address stay in private network, and also have internet ip addresses associated with them; and both ip addresses are in the same subnet. Information is something like

CIDR: 10.0.0.0/16
IP 1: 10.0.0.1 (eth0)
IP 2: 10.0.0.2 (eth1)
GW: 10.0.0.254

My requirement is to allow both network cards accessing to the internet. But the default routing strategy in Linux (Red hat 6) is dest based so all traffic go out from e.g. eth0.

ping with -I shows that one of dev does not work, as below

Code:
ping -I eth0 www.google.com
From 10.0.0.1 icmp_seq=2 Destination Host Unreachable
Code:
ping -I eth1 www.google.com
64 bytes from ...: icmp_seq=1 ttl=47 time=12.8 ms
I search/ google then find out a post at http://serverfault.com/questions/336...ubnet-in-linux (has the same situation as mine) seemingly can solve the issue.

However, following the steps (enabling arp filter then add ip based routing strategy) only switch the outgoing dev from eth1 to eth0 (so ping result is reversed).

I am new to such kind of configuration, therefore, I have no idea on how to troubleshooting such problem. Or the correct steps to enable such routing policy.

Is there any place I can start from checking? Or what is the correct way to setup such routing?

I sincerely appreciate any help.
 
Old 01-17-2013, 12:09 AM   #2
jnihil
Member
 
Registered: Dec 2012
Distribution: Debian, Xubuntu, Gentoo, CentOS, Bhodi
Posts: 47

Rep: Reputation: 2
how about simply bonding the 2x NICs as one IP interface, and then use a load-balance mode instead of active/standby mode for the bonded interface?

https://help.ubuntu.com/community/UbuntuBonding

Beats the hell out of complicated routing policies using BGP, OSPF multipath, etc.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Routing to internet through one network, and to local ips in another network IceDane Linux - Networking 6 04-02-2009 01:21 AM
Source based policy routing with one NIC ardora Linux - Networking 3 12-02-2007 08:02 AM
Routing for eth0 and wlan0 with static IPs on the same network. kelvinlo Linux - Wireless Networking 3 10-15-2007 04:54 PM
Need help routing traffic on 2 network cards dan6767 Linux - Networking 13 11-19-2004 09:40 AM
[help] RH Network Routing Policy princenux Linux - Networking 1 07-04-2004 10:34 AM


All times are GMT -5. The time now is 01:41 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration