LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-03-2005, 01:03 AM   #1
filch
LQ Newbie
 
Registered: Sep 2003
Location: Toronto, Canada
Distribution: Red Hat
Posts: 5

Rep: Reputation: 0
Two network cards = network problem


I am having an issue with a server, which was working before I made a couple of changes. The server is a RH 9 machine and has two NICs in it. Originally, both of these NICs were on the same subnet or segment so there was no issue. But, for a few reasons, I had to change one of the NICs to a different network segment. So, eth0 (which works fine) has a default gateway address, a broadcast address and a network address. eth1 (which does not seem to work) has it's own default gateway and broadcast and network addresses. I have edited the ifcfg-eth1 file to reflect the new settings and I get no error messages when I restart the NIC. I can ping the new IP from the server itself and I can ping hosts on the internet (Google) from the machine (although I suspect that the machine is using eth0 to route out to the internet). However, I cannot ping this new NIC from any other hosts, including hosts on the same segment. I do have a firewall but have tried temporarily disabling it but it still does not function. I suspect this has something to go with a routing issue where eth1 is trying to use the eth0 default gateway to route packets and of course, this is not reachable because it is on a different segment.

So, does anyone see any solutions to this? Anyway to force eth1 to use a different default gateway than eth0?

filch
 
Old 01-03-2005, 04:07 AM   #2
andrewdodsworth
Member
 
Registered: Oct 2003
Location: United Kingdom
Distribution: SuSE 10.0 - 11.4
Posts: 347

Rep: Reputation: 30
Unfortunately there can only be one operational default gateway. Therefore although you can indeed force more than one default gateway to be listed by route for example, or if you have two NICs both using DHCP the sytem will set up apparently 2 default gateways, only the first 1 will actually be used as a default gateway.

Before doing anything about routing or IP forwarding I'd get pinging working between eth1 and another machine. It could be a hardware fault - NIC or cable (either broken or wrong type), or if you are trying to use the same hub/switch for both networks it could be that device not being able to cope. It could be a firewall at either end or simply a misconfigured network address.

Once you get the basic communication sorted then you can look at how to achieve what you want - I'm not sure why you think you want to have default routes on two networks. With 2 NICs and a firewall you can do pretty much what you want with the firewall configuration. As usual with linux you're spoilt for choice
 
Old 01-03-2005, 08:46 AM   #3
filch
LQ Newbie
 
Registered: Sep 2003
Location: Toronto, Canada
Distribution: Red Hat
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the reply.

Each segment uses a different switch and I don't think is is a hardware issue as this has all been working fine for a couple of years before this switch. Plus, I am able to ping out from the machine to a host outside of my network. When I look at netstat -r, the gateway for eth1 does not appear. Maybe I am confused? ifconfig appears to be normal with one exception. Even though I have set the net mask for eth1 to 255.255.255.240, it continues to show up as 255.255.255.248, which is the old netmask. I cannot find where this might be coming from as I have changes the ifcfg-eth1 network-script. to reflect the new netmask but it does not appear to be taking it.

filch
 
Old 01-04-2005, 02:06 AM   #4
andrewdodsworth
Member
 
Registered: Oct 2003
Location: United Kingdom
Distribution: SuSE 10.0 - 11.4
Posts: 347

Rep: Reputation: 30
Sounds as though the netmask is your problem. Could be that ifcfg-eth1 isn't the config file, mine now are of the format ifcfg-eth-id-00:01:02:03:c4:b5. If there aren't any like that then the only thing I suggest you do is search for 255.255.255.248 in files. That should show where the real config file is.
 
  


Reply



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
Problem with two network cards dman65 Linux - Networking 1 09-09-2005 12:43 PM
2 network cards, single network, load balancing? tormentum Linux - Networking 1 02-13-2005 02:37 PM
two network cards - one for local network, one for http/vsftpd server scottster Linux - Networking 1 01-20-2005 08:52 PM
2 network cards, 2 network connections - routing problem tvojvodi Linux - Networking 4 02-24-2004 03:26 PM
2 network cards problem Mikessu Linux - Networking 2 09-01-2003 12:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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