Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-16-2013, 06:25 AM   #1
Registered: May 2004
Posts: 186

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

IP 1: (eth0)
IP 2: (eth1)

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

ping -I eth0
From icmp_seq=2 Destination Host Unreachable
ping -I eth1
64 bytes from ...: icmp_seq=1 ttl=47 time=12.8 ms
I search/ google then find out a post at (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
Registered: Dec 2012
Location: inside the matrix
Distribution: Debian, Xubuntu, Gentoo, Antergos
Posts: 90

Rep: Reputation: 27
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?

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


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 > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:14 AM.

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