LinuxQuestions.org
Review your favorite Linux distribution.
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 10-20-2013, 11:53 PM   #1
gh0stshell
LQ Newbie
 
Registered: Oct 2013
Posts: 6

Rep: Reputation: Disabled
Cool [SOLVED]CentOS - Using Both NICs on different networks issue


First i would like to ya'll know i have a Debian based server that is working perfectly with what i am trying to do. My CentOS server is the one that when duplicating the config, but using different addresses does not work as wanted.

Debian setup

ETH0 > XXX.XXX.1.30 > 255.255.255.0 > XXX.XXX.1.1

ETH1 > XXX.XXX.3.30 > 255.255.255.0 > XXX.XXX.3.1

I can from a device on XXX.XXX.1.X network ping both XXX.XXX.1.30 and XXX.XXX.3.30 and access its services

CentOS setup

ETH1 > XXX.XXX.1.22 > 255.255.255.0 > XXX.XXX.1.1

ETH0 > XXX.XXX.0.22 > 255.255.255.0 > XXX.XXX.0.1

I can ping XXX.XXX.0.22 from a device on the XXX.XXX.1.X network and access its services, but as soon as i plug in ETH1 i can no longer PING 0.22 and i know i cant get to one of its services, but i cannot confirm all do not work once the 2nd NIC is plugged in.

Once the 2nd NIC is plugged in i can then PING XXX.XXX.1.22, but loose XXX.XXX.0.22

Also from the server i can PING both GW's, XXX.XXX.0.1 and XXX.XXX.1.1 and outside IP's and addresses.

FW rules are the same and i am guessing its something with the CentOS server since it only happens when i plug in the 2nd NIC and all is well until then.

Open to any ideas!

Last edited by gh0stshell; 10-30-2013 at 11:15 PM.
 
Old 10-21-2013, 04:38 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
ETH0 > XXX.XXX.1.30 > 255.255.255.0 > XXX.XXX.1.1
ETH1 > XXX.XXX.3.30 > 255.255.255.0 > XXX.XXX.3.1
It looks like you're configuring multiple default gateways? I'm not sure if this is doing what you expect it to do... theoretically the first nic to come up will define the default gateway and the one created by the second nic will not be used unless the first nic is unplugged.

When the kernel is attempting to route a packet it will read the route table from top to bottom and the first match will be used to forward the packet to.

Would you please confirm this is the functionality you expect?
 
Old 10-21-2013, 10:31 PM   #3
gh0stshell
LQ Newbie
 
Registered: Oct 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kbp View Post
It looks like you're configuring multiple default gateways? I'm not sure if this is doing what you expect it to do... theoretically the first nic to come up will define the default gateway and the one created by the second nic will not be used unless the first nic is unplugged.

When the kernel is attempting to route a packet it will read the route table from top to bottom and the first match will be used to forward the packet to.

Would you please confirm this is the functionality you expect?
I am trying to get the functionality to act just as the Debian system does. Have both NICs plugged i with different addresses and GW's and be able to access either address on both subnets.

Why would this work on my Debian system, but not the CentOS system?
 
Old 10-22-2013, 01:47 AM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
What I'm saying is independent of the distribution, having multiple default gateways is usually not desirable. You could end with asymmetric routes and unpredictable communication paths.
 
Old 10-22-2013, 01:57 AM   #5
gh0stshell
LQ Newbie
 
Registered: Oct 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
It's working flawlessly on my Debian system
 
Old 10-22-2013, 04:10 AM   #6
cospengle
LQ Newbie
 
Registered: Feb 2008
Location: Armidale, NSW, Australia
Distribution: Fedora 8
Posts: 29

Rep: Reputation: 6
Please post the routing table from both machines.
 
Old 10-23-2013, 09:21 PM   #7
gh0stshell
LQ Newbie
 
Registered: Oct 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cospengle View Post
Please post the routing table from both machines.
here ya go

please keep in mind the centos server will be using 192.168.1.X and 192.168.0.X while the debian uses 192.168.1.X and 192.168.3.X

i found this which may be what i need

http://www.dfwavc.com/linux_multi_nic-multi_gateway
 
Old 10-24-2013, 01:34 AM   #8
gh0stshell
LQ Newbie
 
Registered: Oct 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cospengle View Post
Please post the routing table from both machines.
Followed that guide, so far its not working, followed every step route still shows as what is outputted above for the CentOS server

SOLVED

Last edited by gh0stshell; 10-30-2013 at 11:15 PM.
 
Old 10-30-2013, 02:15 PM   #9
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 876

Rep: Reputation: 184Reputation: 184
Quote:
ETH1 > XXX.XXX.1.22 > 255.255.255.0 > XXX.XXX.1.1

ETH0 > XXX.XXX.0.22 > 255.255.255.0 > XXX.XXX.0.1

I can ping XXX.XXX.0.22 from a device on the XXX.XXX.1.X network and access its services, but as soon as i plug in ETH1 i can no longer PING 0.22 and i know i cant get to one of its services, but i cannot confirm all do not work once the 2nd NIC is plugged in.
How could you ping x.x.0.2 from x.x.1.x when x.x.1.x is on ETH1 which you imply was disconnected at the time? Plus your route table deosn't match this description.
 
Old 10-30-2013, 11:11 PM   #10
gh0stshell
LQ Newbie
 
Registered: Oct 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by baldy3105 View Post
How could you ping x.x.0.2 from x.x.1.x when x.x.1.x is on ETH1 which you imply was disconnected at the time? Plus your route table deosn't match this description.
I'm not following you

I re-read the OP and seems like your mis reading something, well i guess im magical when i can ping my device with an XXX.XXX.0.22 IP from my network with XXX.XXX.1.XXX

What is missing or incorrect?

i already figured out how to setup everything and have both NICs connected on separate networks and i can ping both IP's from any device on either network

How does my routing table not match my description?

To anyone having this issues PM me for help.

Last edited by gh0stshell; 11-06-2013 at 09:40 PM.
 
Old 11-03-2013, 11:41 AM   #11
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 876

Rep: Reputation: 184Reputation: 184
For future reference, if I ask a question I'm not trying to make you look stupid or wrong, I'm asking for information or clarification, in order to assist you with the question you came here to ask.

You might want to consider weather getting arsey with people who are trying to help you best serves your own interests.
 
  


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
Run 2 NICs, separate networks liche24 Fedora 1 03-14-2009 11:20 PM
problem setting up 4 nics for 4 networks. help palaman Linux - Networking 2 05-24-2006 02:00 PM
2 nics, 2 networks help. chrisknight Linux - Networking 5 12-19-2004 01:21 PM
2 nics, 2 networks, 2 problemas kangaegoto Linux - Networking 1 12-19-2004 06:58 AM
2 NICs 2 networks 2 gateways birkinshawc Linux - Networking 1 05-29-2004 03:05 PM


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