From:	SMTP%"CMU-OpenVMS-IP@DRYCAS.CLUB.CC.CMU.EDU" 23-NOV-1994 08:13:59.65
To:	EVERHART
CC:	
Subj:	RE: SLIP with MVII, DHV, and CMU.

Date: Tue, 22 Nov 1994 11:25:14 GMT
From: tillman@swdev.si.com (Brian Tillman)
Subject: RE: SLIP with MVII, DHV, and CMU.
Sender: news@esseye.si.com
To: CMU-OpenVMS-IP@DRYCAS.CLUB.CC.CMU.EDU
Errors-To: CMU-OpenVMS-IP-Request@DRYCAS.CLUB.CC.CMU.EDU
Reply-To: CMU-OpenVMS-IP@DRYCAS.CLUB.CC.CMU.EDU
Message-Id: <22NOV94.11251496@swdev.si.com>
Organization: Smiths Industries Aerospace
X-Newsgroups: vmsnet.networks.tcp-ip.cmu-tek
Nntp-Posting-Host: terwed.si.com
Lines: 300
X-Gateway-Source-Info: USENET

In a previous article, rmsmith@csc.com (Robert Smith) wrote:
->I am in the process of setting up slip on my home microvax.  I have it
->tied to a 14.4 modem.
->Is there a secret handshake, chocolate shake, or icecream soda
->that I have to do to cmu to make it run slip?

There was a great discussion of SLIP by Ehud Gavron back in March.  I kept it,
so I'll repost it below.  I've also appended another message from John Price
that he posted back in July that I've found informative.  Hopefully, this will
be of some help. 

Date:   23-MAR-1994 23:31
From: gavron@hearts.aces.com (Ehud Gavron)
Description: Re: SLIP

In article <2mqkto$stu@news.mic.ucla.edu>, price@uclapp.physics.ucla.edu writes...
.
#I suspect that this is due to your Device_Init: lines.  Here are mine:
#*****
#Device_Init:SLDRV:TTA2:vax.slip.interface.name:101.101.101.101:255.255.255.252
#Device_Init:ETHER:ESA0:00-00-00-00-00-00:101.101.101.50:255.255.255.0
#*****

Really you should consider using real addresses assigned by IANA and
the NIC.  The 101 net is a Class A net reserved to IANA.
.
#There are two things to note from that last sentence: 
#	1.  The SLIP interface has its own address, completely 
#	    separate from the Ethernet interface.

True, and important.

#	2.  The netmask means that the SLIP interface can directly 
#	    talk to hosts with IP addresses 
#	    101.101.101.{100,101,102,103}, and *only* with those.  I 

Actually with a netmask of 255.255.255.252, it can talk to the network
	101.101.101.(101&252) = 101.101.101.100, which includes:
		101.101.101.100	network address
		101.101.101.101 first usable real address
		101.101.101.102 second...
		101.101.101.103 broadcast address for that network

	In reality this means two usable hosts (.101 and .102)

	In fact the general math may be represented as:
Formulaicly:
Given network ASSIGNED_BITS.your_bits where your_bits + ASSIGNED_BITS = 32
Given SUBNET_MASK with H HOST_BITS + N NETWORK_BITS = your_bits

This gives you 2^N possible network combination os 2^H possible host addresses.

For every subnet X of 2^N, we can number them from 0 to 2^N-1 such that:
  For Subnet X:
     Network Address = (ASSIGNED_BITS) AND (SUBNET_MASK) + 2^H * X
     First Address   = Network Address + 1
     Last Address    = Network Address + 2^H - 2
     Broad. Address  = Network Address + 2^H - 1


#	    don't know whether the interface itself must have an 
#	    address within that range; mine does.  I haven't felt the 
#	    need to test that.  :)

The interface WILL have an interface within the address or else
the network would change.  For instance, had you assigned
	101.101.101.50, 
that would have allowed you the use of
	101.101.101.48 network address
		   .49 first usable
		   .50 second usable
		   .51 broadcast address for this network

#It turns out that the netmask is important here.  At least, I couldn't 
#get the thing to work until I started using it.  My Ethernet interface 
#has a netmask of 255.255.255.0, which means that it can directly 
#connect to any machine with an IP address of 101.101.101.*.  Since I 
#have already told CMUIP that addresses in the range {100,103} are 
#reachable through the SLIP interface, though, it will use that 
#interface rather than the Ethernet interface for those.  Which is just 
#as well...  :)

Yes, although for other people to talk to your REMOTE SLIP node, you need
to publish arp for it with the ethernet address of your SLIP router.

It would be much better to use a different subnet entirely (such as
101.101.102.x)

#Now, people have mentioned that they have not been able to get SLIP to 
#work unless they declare the SLIP interface first.  I think this can 
#be explained if the netmasks are searched sequentially until it finds 
#one it thinks will work.  That is, if the interfaces are defined the 
#other way around, CMUIP will first see that the Ethernet interface can 
#connect to the SLIP device (because of the 255.255.255.0 netmask), and 
#will not try to determine whether the SLIP device can connect to it.  
#Whether you see this as a bug or a feature depends on your own 
#preference.

Routes are searched in routing-table order.  More specific routes are
used before least specific routes.  Conflicting entries (multiple routes
through different interfaces) just means the first one is used.

This is all the more reason to use NONCONFLICTING IP networks.

#As to the problem you're seeing (turning on SLIP seems to kill the 
#rest of the TCP/IP network), I suspect that you are using a netmask of 
#255.255.255.0 (or something like that) in the Device_Init: line for 
#your SLIP interface.  This is in effect telling CMUIP that it can 
#connect to everything in the outside world via your SLIP interface (at 
#least as far as your gateway to the outside world), and it never tries 
#the Ethernet interface.

No, that's not what it would do.  Think of the netmask as a fancy way
of saying "how much of this address is significant."

Thus, you could have ETHER 101.101.101.x 255.255.255.0 which means 
the first 24 bits are the network, and
SLIP 101.101.102.x 255.255.255.0 which means the first 24 are a 
different network, then your IP kernel would automatically know that
routes to 101.101.101.x go through ethernet , and 101.101.102.x through
slip.

You would need to add a default or other route through ethernet to get
other subnets and nets reachable:

#The next thing to define is the gateway.  Again, here are the relevant 
#lines from my INET$CONFIG:
# 
#*****
#Gateway:vax.slip.interface.name:101.101.101.101:101.101.101.102:255.255.255.255:

See, there you're providing a "host route" because you can't give it a network
route because that conflicts with the Ethernet networks.  If you use different
networks ala 101.101.102.x then you could say
Gateway:slipname:101.101.102.my-local-number:101.101.102.0:255.255.255.0:

#Gateway:my.gateway.name:101.101.101.55:0.0.0.0:0.0.0.0:
#*****
# 
#First, I define the SLIP gateway.  [Note: I have not yet determined 
#whether this is necessary; by my understanding as described in the 
#paragraph above, CMUIP already knows that the SLIP interface is to be 
#used to connect to addresses in the range 
#101.101.101.{100,101,102,103}.  So, this *should* be superfluous.  

Should but routing conflicts don't make it easy.  You have different
netmasks on two interfaces with the same IP network.  That is not a 
defined situation under the CMU kernel.  (it IS defined just fine on
a kernel that can handle it such as a Berkeley 4.3Tahoe)

#Again, I only just got the thing to work at all; I'm not ready to muck 
#about with it yet...]  
# 
#What this line says is that the SLIP interface can connect to the 
#101.101.101.102 "net" (which consists of only the machine 
#101.101.101.102), and the 255.255.255.255 netmask simply fixes that 
#address.  For drill, the second line says that a machine I can connect 
#to, my.gateway.name, with IP address 101.101.101.55, can connect to 
#the 0.0.0.0 net (i.e., anything), with a netmask of 0.0.0.0 (again, 
#anything).  I'm not entirely clear on these two either, I'm afraid...

network addresses use 0.s  So for example 
	101.0.0.0 
means the network that starts with 101
	144.45.0.0
means the network that starts with 144.45
	101.101.101.100 (255.255.255.252) 
means the network that starts there...

0.0.0.0 means all networks...

#The last thing to worry about is whether the two interfaces talk to 
#each other.  For that, use the IP_Forwarding variable:
# 
#*****
#Variable:IP_Forwarding:1
#*****
# 
#If you don't have this line, you'll be able to connect your PC to your 
#VAX, but you won't be able to get from there to anywhere else.
# 
#I hope this is helpful.  Furthermore, I hope it's correct.  I do know 
#that it seems to be working fine for me...

Yes, it is a workable configuration.  This is where IP consultants
get their kicks ;-)


Ehud

--
Ehud Gavron        (EG76)
gavron@aces.com
--------------------------------------------------------------------------------

Date:   31-JUL-1994 22:58
From: price@uclapp.physics.ucla.edu
Description: Re: SLIP

In article <31JUL199418414921@axcrnc.cern.ch>, kassapidis@axcrnc.cern.ch (Kassapidis Panayotis, CERN) writes:
>    Please, post your dialup SLIP instructions. Others (like me) may
>   benefit from them.

Fair enough.  I've meant to do this for a while.  A couple of people 
have asked about this already.  The information below has been culled 
mostly from personal experience (i.e., it works for me).  All IP 
addresses have been changed.  The reason for this is that CMUIP SLIP 
doesn't require a password -- if you know the IP address of the SLIP 
interface, and the phone number to dial, you can get in.  Also, any 
explanations given below are not necessarily completely correct; I've 
tried to put everything in simple terms that I understand.  Those 
caveats given, here goes...

First, in INET$CONFIG, you need to have *two* separate interfaces: one 
that talks to the SLIP "network", and one that talks to the Ethernet 
"network".  These two interfaces each have their own addresses.  If 
they "overlap" (this will be defined later), the interface to the more 
general network must come *last*.

Example: in my configuration (remember: *all* ip addresses have been 
changed; CMUIP SLIP doesn't bother to ask for a password for 
connection purposes, so anyone who knows the phone number of your 
modem and the IP address of your SLIP interface can connect through 
your system), I have a VAX with an Ethernet interface at IP address 
128.97.101.101.  We use subnetting here at UCLA, and our network mask 
is 255.255.255.0.  This means that my VAX can directly connect to any 
computer whose address is 128.97.101.x, where x is in the range 0-255 
(although I believe the first and last are off limits).  To get to any 
computer with an address not in this range, I need to go through a 
gateway.  In my case, the gateway is at 128.97.101.105.  Note that I 
can directly connect to this computer.  This is, of course, important.  
So, I need a line in INET$CONFIG that says something like

Device_Init:ETHER:ESA0:00-00-00-00-00-00:128.97.101.101:255.255.255.0

and further down, one that reads 

Gateway:GATEWAY.PHYSICS.UCLA.EDU:128.97.101.105:0.0.0.0:0.0.0.0:

Now, I want to start a SLIP interface with a modem attached to the 
device TTA2.  I am assigned the address range 128.97.101.120 through 
128.97.101.127.  This is a total of eight addresses, but again, the 
first and last are not usable for reasons I don't understand (I think 
the operative terms are "network address" for the .0 one and 
"broadcast address" for the .127 one).  At this point, the six 
remaining addresses belong to *me*, and are mine to assign as I wish.  
I choose to assign the first one to the SLIP interface itself:

slip.physics.ucla.edu = 128.97.101.121

I have a computer at home (say it's a PC).  I choose to assign this 
the next address:

mypc.physics.ucla.edu = 128.97.101.122

These names must be established with the network administrator, but I 
am free to dole out the addresses to whomever I choose.

Note that by the rules above, the ethernet connection can speak 
directly to mypc.  This is incorrect, since that must go through the 
SLIP interface.  This is what I have called overlap above.  The range 
of SLIP addresses (.120 - .127) lies within that of Ethernet addresses 
(.0-.255).  We therefore need a way to tell CMUIP to use the SLIP 
interface for the addresses .120-.127, and the Ethernet interface for 
all the others.  We do this simply by placing the SLIP device 
definition first, so that the Device_Init lines now look like:

Device_Init:SLDRV:TTA2:slip.physics.ucla.edu:128.97.101.121:255.255.255.248
Device_Init:ETHER:ESA0:00-00-00-00-00-00:128.97.101.101:255.255.255.0

The only new thing here is the mask on the SLIP interface.  That mask 
has all bits set to 1 except the last three.  This means that there 
are eight addresses (2^3) that the SLIP interface can access, which 
work out to .120-.127.  If CMUIP wants to connect to one of these 
addresses, it does it through the SLIP interface.  If it wants to talk 
to anything else with an address of 128.97.101.x, it does it through 
the Ethernet interface.  Any other address is contacted via the 
gateway (which itself is contacted via the Ethernet interface).

The only other thing to do is to set the IP_Forwarding flag.  This 
allows CMUIP to transmit packets from one interface to the other.  
without this, you couldn't use SLIP to get to the outside world: 

Variable:IP_Forwarding:1

That should be it.  Restart CMUIP, and all should be well.  One other 
thing: many SLIP packages on the PC/Mac side expect to give the system 
some kind of password upon connection, and will fail if they don't 
receive a response from the VAX.  This needs to be turned off, since 
the VAX won't do a thing other than just sit there.

           John Price * * * * price@uclapp.physics.ucla.edu
           Where there is no solution, there is no problem.

-----------------------------+--------------------------------
 Brian Tillman               | Internet: tillman@swdev.si.com
 Smiths Industries, Inc.     |           tillman_brian@si.com
 4141 Eastern Ave., MS129    | Hey, I said this stuff myself.
 Grand Rapids, MI 49518-8727 | My company has no part in it.
-----------------------------+--------------------------------
