LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   2 separate networks, only one has a gateway, routing is not working (https://www.linuxquestions.org/questions/linux-networking-3/2-separate-networks-only-one-has-a-gateway-routing-is-not-working-890460/)

jojothedogboy 07-07-2011 12:03 PM

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.

jojothedogboy 07-07-2011 03:55 PM

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.


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