LinuxQuestions.org
Visit Jeremy's Blog.
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 07-07-2011, 12:03 PM   #1
jojothedogboy
LQ Newbie
 
Registered: Jun 2008
Posts: 12

Rep: Reputation: 0
2 separate networks, only one has a gateway, routing is not working


I have a system (RHEL 5.3) serving meta data for a StorNext SAN on one port (eth0 10.0.0.0/24 with no gateway) and connecting to the "house" network (internet surfing and remote access) through the other (eth1 10.10.10.0/24 via 10.10.10.1).

When The NICs are connected everything is happy and works correctly, however, once you unplug eth1 (not ifdown, just unplug the actual cable) the StorNext software stops responding.

Thinking this is a routing issue I looked at the route table:
Code:
#>ip route show
10.0.0.0/24 dev eth0  proto kernel  scope link  src 10.0.0.4 
10.10.10.0/24 dev eth1  proto kernel  scope link  src 10.10.10.38 
169.254.0.0/16 dev eth1  scope link 
default via 10.10.10.1 dev eth1
which seems in order... but thought I would add static routes anyway to be sure (from http://www.physics.umd.edu/pnce/pcs-...l#dual-subnets):
Code:
#Set up the first subnet's routing table (we'll name it 70)
ip route flush table 70
ip route add table 70 to 10.0.0.0/24 dev eth0

#Set up the second subnet's routing table (we'll call it 80)
ip route flush table 80
ip route add table 80 to 10.10.10.0/24 dev eth1
ip route add table 80 to default via 10.10.10.1 dev eth1

#Create the rules to choose what table to use. Choose based on source IP
#We need to give the rules different priorities; for convenience name priority
#after the table
ip rule add from 10.0.0.0/24 table 70 priority 70
ip rule add from 10.10.10.0/24 table 80 priority 80

#Flush the cache to make effective
ip route flush cache
but it still didn't work. Before I started barking up SorNext's tree I thought I would rule out OS routing details. Am I missing something here? I even tried to set eth0's IP as its own gateway in an act of desperation... any info would be helpful.
 
Old 07-07-2011, 03:55 PM   #2
jojothedogboy
LQ Newbie
 
Registered: Jun 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Looks like it was a DNS issue!

At 1st we hadn't noticed that when the software was getting an error the two systems could ping each other without error. We added an entry in /etc/hosts giving the IP address twice:
Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1	localhost.localdomain localhost
::1		localhost6.localdomain6 localhost6
10.0.0.9	10.0.0.9
This worked for us, seems the software was at fault not linux.
 
  


Reply

Tags
gateways, static route


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
how to connect separate home networks? dave247 Linux - Networking 14 12-16-2010 06:05 PM
Run 2 NICs, separate networks liche24 Fedora 1 03-14-2009 11:20 PM
having 2 NIC with 2 separate gateway Swakoo Linux - Networking 7 02-19-2009 09:42 PM
static routing between two networks verb Linux - Networking 3 07-04-2008 05:43 PM
Firewalls for home networks, is separate justified? setiDude Linux - Security 12 10-18-2004 08:55 PM


All times are GMT -5. The time now is 04:20 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration