[comp.dcom.lans] How to SLIP without subnets

pst@ack.Stanford.EDU (Paul Traina) (02/25/90)

perand@nada.kth.se (Per Andersson) writes:
>I'm trying to figure out how to make a ethernet to SLIP gateway out of a
>Sparcstation. ...

>Oh yes, I must mention that I do not want to allocate a subnet for this single 
>SLIP-system. And until now I haven't had a reason to run either routed or
>gated.

1.	there is a file called slipware.tar.Z on neat.cs.toronto.edu which
	provides slip support for SunOS 4 and its horrible streams.
1a.	Van Jacobson's header compression software (including mods)
	is out in beta test.  You may FTP that from rtsg.ee.lbl.gov
	(the file is called cslipbeta.tar.Z).

Now for the fun part.  You want to run SLIP to a machine without taking
up an entire subnet.  I can't think of a reasonable way to do that, _but_
you can still cheat.

If you just wanted to hook up one host, you can do it by allocating 4 IP
addresses in succession (the first IP address should be on a multiple of 4
boundary).

Here is an example that will be real sometime next week.  At work, I have
ack which is a sparcstation running sunos4.  At home, I have another machine
called nak.  Since I only want to gateway to one host, I allocate a 2-bit
subnet (4 network addresses).

Example:
	36.21.0.158	ack.Stanford.EDU	  (IP address of gateway enet)

	36.21.0.244	ack-nak-network		  (this is the "0" address)
	36.21.0.245	ack-slip		  (slip port on gateway)
	36.21.0.246	nak.Stanford.EDU nak-slip (slip port on home machine)
	36.21.0.247	ack-nak-broadcast	  (this is the "255" address)

I then ifconfig ack's slip line with a tiny netmask:

	ifconfig sl0 ack-slip nak-slip netmask 0xfffffffc

Now for the kicker: since we don't run RIP, just proxy-arp for the addresses
that the gateway deals with directly:

	# find out ethernet address -- a kludge but I was being lazy...
	#
	etheraddr=`dmesg | grep "Ethernet address" | awk '{ print $4 }'`
	#
	# proxy-arp for all addresses we're really taking ourselves.
	#
	for host in [ ack-nak-network ack-slip nak-slip ack-nak-broadcast ]
	do
	    arp -s $host $etheraddr pub
	done

(you may have to use ip addresses if your arp was broken like mine).

While this isn't the greatest way of doing things (broadcast traffic could
get messy) it works well enough.

The general idea is courtesy of Charles Carvalho of ACC in Santa Barbara.  Any
mistakes made in the presentation are my fault.

				Cheers and let me know how things
					work for you,
						Paul

leres@ace.ee.lbl.gov (Craig Leres) (02/26/90)

Followups to comp.protocols.tcp-ip.

Gee, perhaps I'm missing the point but I don't see why you need to use
subnets at all. Let's say the slip gateway machine's address is
126.0.128.30 (using a netmask of 0xffffff00). Pick any free address on
the subnet for the remote host, say 126.0.128.45.

Now on the remote side, ifconfig the slip line (which is a
point-to-point) using the ip address we've chosen for the local end
(126.0.128.45) and the address of the gateway for the far end
(126.0.128.30). Install a static default route via the gateway
(126.0.128.30).

On the slip gateway, ifconfig the slip line using the gateway and
remote addresses (reversed from above). This gives you an interface
route to the remote host. Publish an arp entry for the remote host
(126.0.128.45) using the ethernet address of the gateway. (Make
sure ipforwarding is enabled.)

We've been running two slip hosts this way for months now...

		Craig