Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-21-2013, 12:53 AM
|
#1
|
LQ Newbie
Registered: Oct 2013
Posts: 6
Rep:
|
[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-31-2013 at 12:15 AM.
|
|
|
10-21-2013, 05:38 AM
|
#2
|
Senior Member
Registered: Aug 2009
Posts: 3,790
|
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?
|
|
|
10-21-2013, 11:31 PM
|
#3
|
LQ Newbie
Registered: Oct 2013
Posts: 6
Original Poster
Rep:
|
Quote:
Originally Posted by kbp
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?
|
|
|
10-22-2013, 02:47 AM
|
#4
|
Senior Member
Registered: Aug 2009
Posts: 3,790
|
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.
|
|
|
10-22-2013, 02:57 AM
|
#5
|
LQ Newbie
Registered: Oct 2013
Posts: 6
Original Poster
Rep:
|
It's working flawlessly on my Debian system
|
|
|
10-22-2013, 05:10 AM
|
#6
|
Member
Registered: Feb 2008
Location: Armidale, NSW, Australia
Distribution: Fedora 8
Posts: 32
Rep:
|
Please post the routing table from both machines.
|
|
|
10-23-2013, 10:21 PM
|
#7
|
LQ Newbie
Registered: Oct 2013
Posts: 6
Original Poster
Rep:
|
Quote:
Originally Posted by cospengle
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
|
|
|
10-24-2013, 02:34 AM
|
#8
|
LQ Newbie
Registered: Oct 2013
Posts: 6
Original Poster
Rep:
|
Quote:
Originally Posted by cospengle
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-31-2013 at 12:15 AM.
|
|
|
10-30-2013, 03:15 PM
|
#9
|
Member
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891
Rep:
|
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.
|
|
|
10-31-2013, 12:11 AM
|
#10
|
LQ Newbie
Registered: Oct 2013
Posts: 6
Original Poster
Rep:
|
Quote:
Originally Posted by baldy3105
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 10:40 PM.
|
|
|
11-03-2013, 12:41 PM
|
#11
|
Member
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 05:24 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|