[comp.protocols.tcp-ip] IP forwarding on Suns

doug@ICASE.EDU (Doug Peterson) (06/06/89)

Does anyone know what the Sun default (OS3.5) is for forwarding IP packets
when one with a different net address is received? Assume the Sun only has
one e-net connection. (Right, it's not a gateway, but the 'foreign-net'
packets are there, and I can't get rid of them.)

Thanks in advance

Doug Peterson
Systems Manager
ICASE
Mail Stop 132C
NASA Langley Research Center
Hampton, VA 23665-5225
(804) 864-2172
FTS: 928-2172
doug@icase.edu

bzs@ENCORE.COM (Barry Shein) (06/12/89)

>Does anyone know what the Sun default (OS3.5) is for forwarding IP packets
>when one with a different net address is received? Assume the Sun only has
>one e-net connection. (Right, it's not a gateway, but the 'foreign-net'
>packets are there, and I can't get rid of them.)

Depends on the state of the ipforwarding bit in the kernel. By default
this is on so the Sun will indeed forward the packets. To stop that
patch the word in the kernel to zero, something like (WARNING WARNING
OFF THE TOP OF MY HEAD!!!)

	% adb -k -w /vmunix /dev/mem
	ipforwarding?W 0
	$
	%

Should take effect on the next boot tho you could patch the running
image. Wait a few minutes, someone on this list will say "oh yeah" and
correct me if that example isn't quite right.

It's defined in ip_input.c (.o) in the kernel build tree, if you
patched it there it would stay patched but that might be annoying also
if you ever build machines that are supposed to act as gateways, very
mysterious months later when someone builds a kernel and it won't
forward packets, I suppose you could have both versions and use a
build script to install the right one.

	-Barry Shein

Software Tool & Die, Purveyors to the Trade
1330 Beacon Street, Brookline, MA 02146, (617) 739-0202