[comp.unix.wizards] Internet Problems

clapper@nadc.arpa (Brian M. Clapper) (09/01/88)

I am trying to set up a gateway between two LANs, and I'm having some
difficulties that my documentation does not address.  My LAN consists of
two VAXes, both running Ultrix 2.0-1, and a Sun 3/160, running SunOS.  They
are communicating via an Ethernet.  One of the VAXes is also connected to
another remote LAN over a dedicated telephone line (using a DMR11).  The
machines on the Ethernet use a class C addressing scheme.  The connection
over the phone line uses a class B addressing scheme.  A facsimile of my
host table follows:

	#
	# Local Network
	#
	192.9.200.6	sun
	192.9.200.50    vax1
	192.9.200.51	vax2
	#
	# Connection to remote network
	#
	130.1.0.50	vax1alias
	130.1.0.1	remotevax

I'm trying to set up 'vax1' as a gateway, so that I can send mail and
connect directly to 'remotevax' from the 'sun' or 'vax2' machines.  The
Ultrix documentation on networking claims I need a host name on both
networks, and that making the host part of the addresses identical will
serve to establish a gateway.  I chose host number '50' for the 'vax1'
machine on both networks, and perpetuated the hosts file across all
machines.  (I am using NFS and the Yellow Pages Service, so at first I
merely update the yellow pages database on the master server.  Later,
paranoia led me to make the /etc/hosts file identical on all machines,
even though common sense told me it wasn't necessary.) When I attempted to
connect directly to 'remotevax' from the Sun, the system responded with
the message 'network is unreachable'.  Then I tried adding an 'arp' entry
for the 'vax1' machine to the Sun.  (There wasn't one initially.)  I tried
to connect again, and the connection timed out.

I can connect directly from 'vax1' to 'remotevax' with no trouble.  Mail
also zips back and forth reliably across that link.  I cannot, however,
set up the gateway.  Perhaps I've missed something in the documentation,
but I've pored over Sun's meager networking instructions, as well as DEC's
more in-depth ones, and I still can't figure it out.  What am I missing?

Any help at all will be greatly appreciated.

Brian M. Clapper                         ARPA:  clapper@nadc.ARPA
Code 7031                                UUCP:  ...!harvard!clapper@nadc.ARPA
Naval Air Development Center
Street and Jacksonville Roads            Phone: (215) 441-2118
Warminster, PA 18974-5000                AUTOVON: 441-2118

mouse@mcgill-vision.UUCP (der Mouse) (09/11/88)

In article <17023@adm.ARPA>, clapper@nadc.arpa (Brian M. Clapper) writes:
> I am trying to set up a gateway between two LANs, and I'm having some
> difficulties [...].  [Machines are two Ultrix 2.0-1 VAXen and a
> Sun-3/160 on class C addressed Ethernet; one VAX has a point-to-point
> link with class B adresses.]

> [the Ethernet]
> 	192.9.200.6	sun
> 	192.9.200.50    vax1
> 	192.9.200.51	vax2
> [the p-to-p link]
> 	130.1.0.50	vax1alias
> 	130.1.0.1	remotevax

> I'm trying to set up 'vax1' as a gateway,

In order to make this work, you need:

- vax1 needs to be willing to forward packets it receives destined for
  the "other" network.
- remotevax needs to know to send packets for 192.9.200.* to 130.1.0.50.
- sun and vax2 need to know to send packets for 130.1.*.* to
  192.9.200.50.

> When I attempted to connect directly to 'remotevax' from the Sun, the
> system responded with the message 'network is unreachable'.

Aha.  What happens is effectively this.  The Sun kernel is handed a
packet addressed to 130.1.0.1.  It tries to figure out what to do with
it.  First it looks for a route to 130.1.0.1 explicitly; it doesn't
find one.  Then it looks for a route to 130.1 and doesn't find that
either.  Then it looks for a route to 0.0.0.0 (aka "default") and fails
there too.  Then it refuses to send the packet, with error ENETUNREACH,
Network is unreachable.

> What am I missing?

Routes, most likely.

I'd suggest setting up routed on all your machines.  (I'd suggest
gated, the more modern thing, except that you almost certainly don't
have it.  And since you clearly aren't connected to the Internet, I
don't know any easy way for you to get it.)

First though, just to make sure that's the problem:

	sun# /usr/etc/route add remotevax vax1 1

	vax2# /etc/route add remotevax vax1 1

	remotevax# /etc/route add sun vax1alias 1
	remotevax# /etc/route add vax2 vax1alias 1

and see if it works better.  (I think I have /etc and /usr/etc right,
but I'm not sure.  If they aren't where I suggest, poke around.)

If this isn't it, I don't know what's wrong.  I'd have to have a closer
look.  Good luck.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu