Discussion:
Dual NIC Cards - forcing eth0 to be used as Public Networkq
(too old to reply)
tech_geek
2008-12-18 21:51:26 UTC
Permalink
Hi,

I have two NIC cards (eth0 and eth1). eth0 (IP Address: 192.x.x.x) is
connected to the router and eth1(10.x.x.x) is configured as private network.
The problem I have is, when I want to get to the public network - like
website it attempts to use eth1 to resolve network addresses. How can I
force it to use eth0 for public network access and eth1 for private.

Any help or pointers to help would be greatly appreciated.

OS: RHES 5.0

Thanks
Lew Pitcher
2008-12-18 22:34:03 UTC
Permalink
On December 18, 2008 16:51, in comp.os.linux.networking, tech_geek
Post by tech_geek
Hi,
I have two NIC cards (eth0 and eth1). eth0 (IP Address: 192.x.x.x) is
connected to the router and eth1(10.x.x.x) is configured as private
network. The problem I have is, when I want to get to the public network -
like
website it attempts to use eth1 to resolve network addresses. How can I
force it to use eth0 for public network access and eth1 for private.
Any help or pointers to help would be greatly appreciated.
OS: RHES 5.0
Assuming that you have udev installed (a good bet, these days), take a look
in your /etc/udev/rules.d directory for a file called
network-devices.rules. The udev startup will create this file if it doesn't
exist, and will fill it with a commented-out initialization for your
network devices.

Uncomment the device rules, and make the appropriate changes so as to assign
eth0 and eth1 to the appropriate NICs. Recycle udev, and you should find
the devices in the proper places.

FWIW, my system detected my nics out-of-order wrt how I wanted them
arranged. udev created the network-devices.rules file with
# KERNEL=="eth?", SYSFS{address}=="00:c0:f0:37:c2:80", NAME="eth0"
# KERNEL=="eth?", SYSFS{address}=="00:0d:87:0b:04:47", NAME="eth1"

I manually edited this file, and changed it to
KERNEL=="eth?", SYSFS{address}=="00:c0:f0:37:c2:80", NAME="eth1"
KERNEL=="eth?", SYSFS{address}=="00:0d:87:0b:04:47", NAME="eth0"
then I restarted udev, and got the NICs in the proper places.

HTH
--
Lew Pitcher

Master Codewright & JOAT-in-training | Registered Linux User #112576
http://pitcher.digitalfreehold.ca/ | GPG public key available by request
---------- Slackware - Because I know what I'm doing. ------
Robert
2008-12-19 21:35:29 UTC
Permalink
Post by tech_geek
Hi,
I have two NIC cards (eth0 and eth1). eth0 (IP Address: 192.x.x.x) is
connected to the router and eth1(10.x.x.x) is configured as private network.
The problem I have is, when I want to get to the public network - like
website it attempts to use eth1 to resolve network addresses. How can I
force it to use eth0 for public network access and eth1 for private.
Any help or pointers to help would be greatly appreciated.
Check your route table and make sure the default route is set to be the
eth0 or 192.x.x.x.

Also check your /etc/resolv.conf and see what dns server(s) are being
used. If they are internal then ensure that they can resolve outside
hosts.
--
Regards
Robert

Linux User #296285
http://counter.li.org
Loading...