Networking Forums

Networking Forums > Computer Networking > Linux Networking > Dual NIC Cards - forcing eth0 to be used as Public Networkq

Reply
Thread Tools Display Modes

Dual NIC Cards - forcing eth0 to be used as Public Networkq

 
 
tech_geek
Guest
Posts: n/a

 
      12-18-2008, 08:51 PM
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

 
Reply With Quote
 
 
 
 
Lew Pitcher
Guest
Posts: n/a

 
      12-18-2008, 09:34 PM
On December 18, 2008 16:51, in comp.os.linux.networking, tech_geek
((E-Mail Removed)) wrote:

> 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. ------


 
Reply With Quote
 
Rick Jones
Guest
Posts: n/a

 
      12-18-2008, 09:57 PM
In comp.os.linux.networking Lew Pitcher <(E-Mail Removed)> wrote:
> On December 18, 2008 16:51, in comp.os.linux.networking, tech_geek
> ((E-Mail Removed)) wrote:


> > 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.


> 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.


From the description, I would have guessed the issue wasn't which
interface was coming-up as eth0 vs eth1, but that his default route
was pointing at eth1 rather than eth0? Or perhaps it was asking a
name server on his 10net to resolve public domain names? It wasn't
quite clear what sort of "resolution" was being done - DNS or perhaps
ARP.

rick jones
--
The glass is neither half-empty nor half-full. The glass has a leak.
The real question is "Can it be patched?"
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
 
Reply With Quote
 
Robert
Guest
Posts: n/a

 
      12-19-2008, 08:35 PM
On Thu, 18 Dec 2008 21:51:26 +0000, tech_geek wrote:

> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Network cards: eth0 - eth3 ? sb5309@yahoo.com Linux Networking 10 04-21-2008 03:24 PM
Forcing preferred route with dual port router John Smith Network Routers 7 09-09-2007 03:14 PM
Dual Wireless Cards Mr.Wright Wireless Networks 1 08-14-2007 10:22 PM
PC had two NIC cards, installed Linux, connected eth0 to router, crashing in br_handle_frame?. why? santa19992000@yahoo.com Linux Networking 3 09-23-2005 08:06 PM
Dual network cards John Windows Networking 5 08-25-2005 03:48 PM



1 2 3 4 5 6 7 8 9 10 11