two ethernets, how do i tell it to use one or the other?

This is a discussion on two ethernets, how do i tell it to use one or the other? within the Linux Networking forums, part of the Linux Forums category; when i run things like ping, nslookup, and so on, it goes to eth0. that's a "private" ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-19-2006
Jay G. Scott
 
Posts: n/a
Default two ethernets, how do i tell it to use one or the other?


when i run things like ping, nslookup, and so on, it goes to eth0.
that's a "private" network (it's the private part of a rocks cluster).
the network with DNS servers, NFS servers, and so on, is on eth1.

ping has -I, but nslookup doesn't. how do i tell this thing to use
eth1 for anything that isn't 10.1.*.* ?

the private network is 10.1.0.0.
the "public" network is 10.3.0.0.
i'm a relative newbie at this, to me, it looks like the default route
is 10.3.254.254 (the correct router for 10.3 network). would this
be "transparent" if i had set up the 10.1.0.0 network with a netmask
of 255.255.0.0? (10.3 has 255.255.0.0). (i was having trouble
with the rocks installation and i let it use its defaults.)

(newbie isn't really right--i've done this for a while but i do
very little of it, and it tends to get forgotten.)


[root@rocksfront ~]# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
255.255.255.255 * 255.255.255.255 UH 0 0 0 eth0
rocksfront.arlu rocksfront.loca 255.255.255.255 UGH 0 0 0 eth0
10.3.0.0 * 255.255.0.0 U 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
10.0.0.0 * 255.0.0.0 U 0 0 0 eth0
224.0.0.0 * 240.0.0.0 U 0 0 0 eth0
default 10.3.254.254 0.0.0.0 UG 0 0 0 eth1

j.
--
Jay Scott 512-835-3553 gl@arlut.utexas.edu
Head of Sun Support, Sr. Operating Systems Specialist
Applied Research Labs, Computer Science Div. S224
University of Texas at Austin
Reply With Quote
  #2 (permalink)  
Old 10-20-2006
Chris Davies
 
Posts: n/a
Default Re: two ethernets, how do i tell it to use one or the other?

Jay G. Scott <gl@csdsun1.arlut.utexas.edu> wrote:
> when i run things like ping, nslookup, and so on, it goes to eth0.
> that's a "private" network (it's the private part of a rocks cluster).
> the network with DNS servers, NFS servers, and so on, is on eth1.


> ping has -I, but nslookup doesn't. how do i tell this thing to use
> eth1 for anything that isn't 10.1.*.* ?


Routing.

> the private network is 10.1.0.0.
> the "public" network is 10.3.0.0.


10.1.0.0 with a netmask of 255.0.0.0 can be read as saying that you have
a network 10 with your host IP address component as 1.0.0.

Routing tends to get very complicated if you have two different interfaces
with overlapping networks like you do. One configured as 10 and the
other is configured as 10.3. This implies that 10.3 addresses could be
seen on either interface, which I suspect is not what you intend.

> i'm a relative newbie at this, to me, it looks like the default route
> is 10.3.254.254 (the correct router for 10.3 network).


Yes, your default route is on 10.3.*, which happens in your case to be via
eth1 (but because 10.3.254.254 is also part of 10.* it could use eth0).


> Destination Gateway Genmask Flags MSS Window irtt Iface
> 10.3.0.0 * 255.255.0.0 U 0 0 0 eth1


10.3 routes go out via eth1


> 169.254.0.0 * 255.255.0.0 U 0 0 0 eth1


DHCP unallocated..?


> 10.0.0.0 * 255.0.0.0 U 0 0 0 eth0


10.* routes go out via eth0. This overlaps 10.3.*


> 224.0.0.0 * 240.0.0.0 U 0 0 0 eth0


Multicast


> default 10.3.254.254 0.0.0.0 UG 0 0 0 eth1


Default gateway is 10.3.254.254 via eth1


> would this be "transparent" if i had set up the 10.1.0.0 network with
> a netmask of 255.255.0.0? (10.3 has 255.255.0.0).


One problem here is that you don't actually have a 10.1.* network with
a netmask of 255.0.0.0; this is really a 10.* network.

Change *all* your hosts that refer to the 10.1.* network to use a
netmask of 255.255.0.0 and your problems should disappear.

Chris
Reply With Quote
  #3 (permalink)  
Old 10-24-2006
Jay G. Scott
 
Posts: n/a
Default Re: two ethernets, how do i tell it to use one or the other?

In article <cvem04-uli.ln1@news.roaima.co.uk>,
Chris Davies <chris@roaima.co.uk> wrote:
>Jay G. Scott <gl@csdsun1.arlut.utexas.edu> wrote:

[snip]
>
>Change *all* your hosts that refer to the 10.1.* network to use a
>netmask of 255.255.0.0 and your problems should disappear.
>
>Chris


thanks. i'd almost convinced myself of this but i haven't had a
chance to look at it till today.
thanks.
j.


--
Jay Scott 512-835-3553 gl@arlut.utexas.edu
Head of Sun Support, Sr. Operating Systems Specialist
Applied Research Labs, Computer Science Div. S224
University of Texas at Austin
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:14 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0