*BSD News Article 19009


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!network.ucsd.edu!ogicse!uwm.edu!cs.utexas.edu!uunet!emba-news.uvm.edu!trantor.emba.uvm.edu!wollman
From: wollman@trantor.emba.uvm.edu (Garrett Wollman)
Newsgroups: comp.os.386bsd.questions
Subject: IP forwarding?
Message-ID: <1993Jul30.190339.4923@emba.uvm.edu>
Date: 30 Jul 93 19:03:39 GMT
Article-I.D.: emba.1993Jul30.190339.4923
References: <1993Jul30.000804.19820@rtsg.mot.com>
Sender: news@emba.uvm.edu
Organization: University of Vermont, EMBA Computer Facility
Lines: 52
Supersedes: <1993Jul30.183353.4299@emba.uvm.edu>

In article <1993Jul30.000804.19820@rtsg.mot.com>,
David Nerenberg <nerenbrg@kodiak.mot.com> wrote:
>My point is, is IP forwarding on in my kernal if I am using the GENERIC
>(or close to it) kernel?  If so, great, if not, can I turn it on with
>gdb or do I have to re-compile?

For the first question, I should hope not.  Quoth RFC 1122,
``Requirements for Internet Hosts -- Communication Layers'':

# Any host that forwards datagrams generated by another host is
# acting as a gateway and MUST also meet the specifications laid out
# in the gateway requirements RFC [INTRO:2].  An Internet host that
# includes embedded gateway code MUST have a configuration switch to
# disable the gateway function, and this switch MUST default to the
# non-gateway mode.  In this mode, a datagram arriving through one
# interface will not be forwarded to another host or gateway (unless
# it is source-routed), regardless of whether the host is single-
# homed or multihomed.  The host software MUST NOT automatically
# move into gateway mode if the host has more than one interface, as
# the operator of the machine may neither want to provide that
# service nor be competent to do so.

Note that *BSD does not currently meet the gateway requirements RFC
(probably never will), so this specification technically forbids
anyone from using *BSD as an IP gateway.  However, many people do this
anyway; the remainder of the paragraph still applies.

Now, as to your specific question, yes, you have to recompile.  Add
the option `options GATEWAY to your configuration file, rerun
config, make clean, and make all.  (Note that a `make depend' is not
required because there are no new source or header files involved.
HOWEVER, knowledge of GATEWAY is presently spread through several
header and source files, so it is necessary to re-build those.  You
might be able to get away with `rm uipc*.o i[np]_*.o', but I wouldn't
risk it.)

Once you have compiled such a kernel, the kernel variable ipforwarding
can be frobbed to turn forwarding on or off.

-GAWollman

-- 
Garrett A. Wollman   | Shashish is simple, it's discreet, it's brief. ... 
wollman@emba.uvm.edu | Shashish is the bonding of hearts in spite of distance.
uvm-gen!wollman      | It is a bond more powerful than absence.  We like people
UVM disagrees.       | who like Shashish.  - Claude McKenzie + Florent Vollant

-- 
Garrett A. Wollman   | Shashish is simple, it's discreet, it's brief. ... 
wollman@emba.uvm.edu | Shashish is the bonding of hearts in spite of distance.
uvm-gen!wollman      | It is a bond more powerful than absence.  We like people
UVM disagrees.       | who like Shashish.  - Claude McKenzie + Florent Vollant