*BSD News Article 62526


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!newshost.telstra.net!act.news.telstra.net!psgrain!usenet.eel.ufl.edu!newsfeed.internetmci.com!howland.reston.ans.net!agate!sklower
From: sklower@oboe.CS.Berkeley.EDU (Keith Sklower)
Newsgroups: comp.unix.bsd.bsdi.misc
Subject: Re: Routing Problem w/ default gateway outside subnet
Date: 27 Feb 1996 02:18:24 GMT
Organization: University of California, Berkeley
Lines: 59
Message-ID: <4gtplh$epl@agate.berkeley.edu>
References: <taxfree.14.002E6708@primenet.com> <4gil6g$kg1@mark.ucdavis.edu>
NNTP-Posting-Host: oboe.cs.berkeley.edu

}Henry Stapp (taxfree@primenet.com) wrote:
}
}: Our server is 205.147.5.82 and the netmask is 255.255.255.240.  The router,
}: which is on the same physical wire as the server, has the address 
}: 205.147.0.1. The problem is that when you specify the .0.1 address
}: as the  default gateway you get a "network unreachable" error.  

Right; the normal model for an IP interfaces is that the things
that are directly reachable have to have the same bits "as viewed
under the netmask".  If you happend to know the ethernet address
of the host, you could try something like:

root# route add -iface 205.147.0.1 -link ef0:0.0.c.e.b.20

It might work; but I'm not sure that the system I tried it on
isn't running some hacked up code that I'm experimenting with
that allows you to say "Trust Me: I want this destination associated
with this gateway on this interface, and please don't second guess me"

A better thing to do would be to have your ISP allocate you an
address on the 0 subnet; you can assign both addresses to the same
ethernet interface if you say

root# ifconfig ef0 205.147.5.82  netmask 255.255.255.240
root# ifconfig ef0 alias 205.147.0.3  netmask 255.255.255.240

(for example).

In article <4gil6g$kg1@mark.ucdavis.edu>,
Gregory Shenaut <fzshenau@boris.ucdavis.edu> wrote:
}I thought you could have only one network or subnetwork per wire.

You're not forbidden to have more than one subnet per wire, it's just
discouraged and highly unusual.

}What I would assume is that you need two ethernet cards, one to talk on the
}router's subnet and the other to talk on your subnet; your server would
}be a gateway between them.

I wouldn't venture to guess what's going to happen if you have two
ethernets connected to the same wire under BSDI 2.1 . . . .

}Of course, your server would have to have *two* IP addresses
}one in each subnet.

That is the best solution, but doesn't require separate physical
interfaces.

}But I may not have understood the question

I think Greg understood the question

}(or I may be FOS).
Is this maoist self criticism? ;-)

>--
>Greg Shenaut -- gkshenaut@ucdavis.edu