LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-03-2012, 05:11 PM   #1
kopper27
Member
 
Registered: Nov 2009
Posts: 147

Rep: Reputation: 16
Routing 2 IPs


hi guys

This is suse 11 sp1

I have a Server that has 4 NICs, I've created 2 bonds
bond0(eth0-eth1) - 10.10.10.2
bond1(eth2-eth3) - 10.10.10.3

Each bound goes to a Storage Device which is directly connected
so bond0 goes to Storage_Controller_1 and 2 like this

Server_bond0 <--------> Storage_Controller_1 (10.10.10.4)

Server_bond1 <--------> Storage_Controller_2 (10.10.10.5)

The problem is when I ping from server to Storage it looks like only bond0 is active and since bond0 is direclty connected to Storage_Controller_1 it will only ping 10.10.10.4

is there a way to make both bonds independent so
communication between bonds and storage 1 and 2 are separate?

also I attached a computer to this server and that hub (just for testing) and found this is from a windows box an arp command
Code:
C:\Documents and Settings\admin>arp -a
Interface: 10.10.10.100 --- 0x2
  Internet Address      Physical Address      Type
  10.10.10.2            00-0c-29-dc-10-ca     dynamic
  10.10.10.3            00-0c-29-dc-10-ca     dynamic

if fact If I disconnect cables from bond1 ip 10.10.10.3 this IP will be still pingable

any idea how to seperate this so
bond1 will respond to the IP is belongs to and the same for bond0

thanks a lot

Last edited by kopper27; 03-03-2012 at 07:57 PM.
 
Old 03-03-2012, 08:38 PM   #2
kopper27
Member
 
Registered: Nov 2009
Posts: 147

Original Poster
Rep: Reputation: 16
Tried this not working

Code:
net.ipv4.conf.all.arp_ignore=1
net.ipv4.conf.all.arp_announce=2

net.ipv4.conf.default.arp_filter=1
net.ipv4.conf.all.arp_filter=1
 
Old 03-04-2012, 06:45 AM   #3
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
Those two addresses are in the same network, therefore you can't route them. The reason only one works is that for each network you will use the first route in your route table that matches, but you have configured the same network on two interfaces so only the interface that appears first in the route table will work.
One of your connections needs to be a different network, say 10.10.11.x

If your two machines must have these addresses then you will need to bridge the two bonded channels instead
 
Old 03-04-2012, 09:53 AM   #4
kopper27
Member
 
Registered: Nov 2009
Posts: 147

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by baldy3105 View Post
Those two addresses are in the same network, therefore you can't route them. The reason only one works is that for each network you will use the first route in your route table that matches, but you have configured the same network on two interfaces so only the interface that appears first in the route table will work.
One of your connections needs to be a different network, say 10.10.11.x

If your two machines must have these addresses then you will need to bridge the two bonded channels instead
got your point but since bond0 goes to 10.10.10.4 and bond1 to 10.10.10.5 ....Can I define specific routes?
I mean a way to work this out?

thanks
 
Old 03-04-2012, 10:45 PM   #5
kopper27
Member
 
Registered: Nov 2009
Posts: 147

Original Poster
Rep: Reputation: 16
looks like I have to use iproute2 just don't know how
any guidance

thanks
 
Old 03-05-2012, 05:49 AM   #6
manyrootsofallevil
Member
 
Registered: Dec 2010
Distribution: Red Hat, Kubuntu
Posts: 130

Rep: Reputation: 14
Quote:
Originally Posted by kopper27 View Post
looks like I have to use iproute2 just don't know how
any guidance

thanks

try this link http://kindlund.wordpress.com/2007/1...utes-in-linux/
 
Old 03-05-2012, 09:09 AM   #7
kopper27
Member
 
Registered: Nov 2009
Posts: 147

Original Poster
Rep: Reputation: 16
guys

I am getting there

this does what I want

iproute2
Code:
echo 200 storage_table >> /etc/iproute2/rt_tables
ip rule add from 10.10.10.3 table storage_table
ip route add 10.10.10.0/24 via 10.10.10.3 dev eth1 table storage_table
sysctl parameters
Code:
net.ipv4.conf.all.arp_ignore=1
net.ipv4.conf.all.arp_announce=2
but I need to make this changes permanent after reboot
where I should add them?
I already tried /etc/init.d/boot.local but no luck

Code:
echo 200 storage_table >> /etc/iproute2/rt_tables
ip rule add from 10.10.10.3 table storage_table
ip route add 10.10.10.0/24 via 10.10.10.3 dev eth1 table storage_table
any idea?
thanks
 
  


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 ips via gre only works with /24? thenerse Linux - Networking 1 03-30-2009 11:27 AM
Routing with public IPs crontab Linux - Networking 3 02-10-2009 06:11 AM
Routing old IPs to the new ones dorian33 Linux - Networking 7 08-12-2008 05:24 PM
ADSL - Routing Static IPs NiM Linux - Networking 1 03-06-2004 06:57 AM
routing multiple ips - help me! linuxxed Linux - Networking 1 02-13-2004 07:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:20 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