		    How to install the VIF code
		    ---------------------------

1. Unpack the code in a suitable directory.

2. Choose the appropriate makefile, either Makefile.sun or Makefile.hp,
and rename it to Makefile.

By default you get 4 virtual interfaces. If you want to have a different
number, change the define in vif.h.

3. Run make. This should give you vif.o, and no error messages.

4a. SunOS: make install will modload the code, create /dev/vif, and
attach the interfaces.

4b. HP-UX: Go to /etc/conf; make a symlink pointing to vif.o (unless
you unpacked and compiled in /etc/conf). Add the single line

	vif

to your dfile, add the line from master.add to your /etc/master file.
Note that you may have to change the major device number if you have
added other custom drivers.

config dfile. This will give you conf.c and config.mk. Compile and
link the new kernel with

	make -f config.mk XOBJS=vif.o

Save the old kernel in /SYSBCKUP, move the newly made /etc/conf/hp-ux
to /hp-ux. Reboot.

4c. Ultrix: Follow steps in INSTALL.ultrix.

5. After reboot: Create /dev/vif with the correct major device number. If
you haven't changed the entry from master.add, you should do

	mknod /dev/vif c 38 0

Then get the vif interfaces attached by doing

	echo > /dev/vif

6. At this point, you should have four vif interfaces, which means you
can give your host four new IP addresses on the same interface. If you
do 'netstat -ian' you should see something like

Name  Mtu  Net/Dest      Address        Ipkts  Ierrs Opkts  Oerrs Collis Queue 
le0   1500 129.241.1.0   129.241.1.96   1315714 1    57678   0    1406   0     
lo0   1536 127.0.0.0     127.0.0.1      6599    0    6599    0    0      0     
vif0* 1536 none          none           0       0    0       0    0      0     
vif1* 1536 none          none           0       0    0       0    0      0     
vif2* 1536 none          none           0       0    0       0    0      0     
vif3* 1536 none          none           0       0    0       0    0      0     

Now you can install the necessary IP address(es). If you for instance want
to add IP address 129.241.220.244:

	ifconfig vif0 129.241.220.244 netmask 0xffffff00

After you've done this, 'netstat -rn' should show you something like this:

Destination          Gateway              Flags    Refcnt Use        Interface
127.0.0.1            127.0.0.1            UH       1      970        lo0
129.241.220.244      129.241.220.244      UH       0      0          vif0
default              129.241.1.1          UG       13     49355      le0
129.241.1.0          129.241.1.96         U        3      7292       le0

The important point here is that you have a host route to the IP address
you have just configured for your virtual interface.

7. SunOS: Add a permanent, published ARP entry in order to make the host
answer ARP requests for this address:

	arp -s 129.241.220.244 0:80:3f:f5:b:b9 pub

7. HP-UX: arp won't let you add such an entry at this point. However, if
you do the 'arp -s' command *before* using ifconfig, it should work. This
was pointed out by Steve Taylor <staylor@bournemouth.ac.uk>.

8. SunOS: To remove the vif driver, just do a 'modunload' with the correct
id.

Enjoy!

950731/Steinar Haug <steinar.haug@runit.sintef.no>
