Summary (IP Aliasing on DU 3.2C)

From: Doug Wright <ppstech_at_nbnet.nb.ca>
Date: Tue, 23 Apr 1996 10:41:42 -0300

Here is my original question with the answers I have received
I am most of the way there thanks a lot.

----------------------------------------
Hello Managers,
I have been told in the past that it is not possible to do IP aliasing with
Digital Unix.
Can anyone tell me certifiably that this is the case? I have used the
IFCONFIG command to set up an alias and made the proper (I Think?)
modifications to the host file. I am trying to set up a second domain on our
server and then I will install a second copy of Netscape Commerce Server to
serve this Domain. Is there anything else I need to do this? Any one else do
this yet?

As always all info would be appreciated...
----------------------------------------
We have successfully used ip aliasing here to
a certain extent. The command is:
 
        ifconfig tu0:1 alias <alias name>

To have this run automatically when the machine
boots up you must create a script in the /sbin/rc3.d
directory.

I have spoken with DEC on this recently, there does not
appear to be a way of "seeing" the aliases. What I mean
is that doing an ifconfig tu0 will return the same as an
ifconfig tu0:1.

Anyway, that's how I have set up an alias on our 2100.

Hope this helps.


Bob Morse
System Administrator
American Mathematical Society
----------------------------------------------------------
Doug - I have 8 Virtual domains running on my 2100 server, and I'll be
mighty unhappy if I can't run a *LOT* more.

Yes - ifconfig will set up the virtual address, then run ns-setup and
follow the prompts.

Perry Engle
--------------------------------------------------------
i've done it. sounds like you've gotten it right. my current config is
DU 3.2D with netscape communications server 1.12 (or so). the basic
script looks something like:

        /sbin/ifconfig tu1 alias x.x.x.x netmask 255.255.255.0
        /web/server/netscape/httpd-80/start
        /web/server/netscape/httpd-80.x.x.x.x/start

and the reverse on stoppage:

        /web/server/netscape/httpd-80.x.x.x.x/stop
        /web/server/netscape/httpd-80/stop
        /sbin/ifconfig tu1 -alias x.x.x.x netmask 255.255.255.0
 -------------------------------------------------------------------------
| Len Senetza | Email: ljs_at_cyberion.com | still looking for |
| Network Administrator | len_at_helix.net | something cute to |
| Cyberion Networking Corp. | Phone; (604) 501-5406 | put in here... |
| Surrey, B.C. | FAX; (604) 501-5440 | |
 -------------------------------------------------------------------------

Don't know where you heard this, but it's totally untrue. DU support
at least 255 addresses per interface. I have never used more than
three, but I can attest that three works just fine.

R. Kevin Oberman
Energy Sciences Network (ESnet)
Lawrence Berkeley National Laboratory (LBNL)
E-mail: oberman_at_es.net
Phone: +1 510 422-6955
-----------------------------------------------------------------------------

Hi Doug!

I go through it the following steps.

1. Make a run command file in the proper dir (probably /sbin/rc3.d/).
   Make sure it will be run BEFORE any other rc-file depending on the virtual
   host. This will make sure that the IP aliasing will be in effect after a
   reboot.

2. Add a line that will setup the IP alias.
   e.g. /usr/sbin/ifconfig tu0 alias www.domain.com
   By telling ifconfig the FQDN instead of the IP makes it simpler to read the
   file when you have MANY domains (like I have).

3. Add the new host to /etc/hosts.

4. Update BIND (your nameserver, named) and restart it.

5. Run the rc3.d file (e.g. S95add-domain)

6. You're all set to re-configure Netscape Commerce Server.
   (Unless I have forgotten something now :-)



Hope this'll help. If not, just send me an e-mail.



Regards



Henrik Johansson
GlobeCom Network
-------------------------------------------------
I don't know who told you dUnix couldn't do IP aliasing but they were
incorrect. We run an Alpha 2100 with netscape commerce server and the
Apache www server (www.apache.org) both for multiple virtual domain names
(more than 30 now!).

Basically the proceedure is as you already outlined. Apply to the
InterNIC for a domain name. Assign the domain name to an aliases IP
address. Then install Netscape and/Apache to run in that virtual domain
name.

Incidentally, how do you like the Netscape Commerce Server? I find it a
major resource pig and a pain in the butt!

Thanks! Feel free to ask me anything else you need.

-Andy Saylor, Systems Administration
--------------------------------------------------------------

Aliasing works for me in 2.0 and 3.0. Check out the "alias" syntax of
ifconfig.

--David Gadbois

------------------------------------------------------------
It works to an extent... You cannot do IP routing through the same
interface, but aliasing should work.

Just set up the ip addresses for your interface, i.e.,
        primary => 192.91.99.1
        secondary => 192.91.100.1

Be sure your netmasks and braocast addrs are set and should be able to run.
Of course this is over simplified and general.

Good luck...

Regards,
mark
---------------------------------------------------------------------
> I have been told in the past that it is not possible to do IP aliasing with
> Digital Unix.

This is false.

> Can anyone tell me certifiably that this is the case? I have used the
> IFCONFIG command to set up an alias and made the proper (I Think?)
> modifications to the host file.

The host file just gives a name to the other IP address, it's not
actually necessary for the ailasing.

> I am trying to set up a second domain on our
> server and then I will install a second copy of Netscape Commerce Server to
> serve this Domain. Is there anything else I need to do this? Any one else do
> this yet?

Telnet to the ailas address to see if it works - inetd may need to be
HUP'd, but it is alias-aware so any nowait demon started by inetd will
work from both addresses.

        Eric B.
--------------------------------------------------------------------------
    Ummm - who the heck told you that? I server a number of different
    domains/IP's from my systems with no problems, one of the reasons I
    chose Digital. All you need to do is to re-execute the install script
    for your Netscape server and supply the different IP address. The rest
    is easy.

    JT

-- 
James T. McDuffie                                   McDuffie & Associates
JT_at_McDuffie.net  or  JT-Page_at_McDuffie.net           764 Foxridge Place
http://www.mcduffie.net or http://www.mcduffie.com  San Jose, California 95133
Voice: (408) 729-7745     Pager: (408) 814-7122     FAX: (408) 258-3465 <call>
-------------------------------------------------------------
basicly;
1. Set the domains up in BIND.
2. "ifconfig (IP) (NETMASK) alias"
3. copy the server server directory (the https-80.xxx.xxx.xxx.xx) and 
rename it to the new ip alias.. then edit the config/* files to reflect 
the new domain.
4. add a script in the /sbin.init.d/ structure to start the httpd.
#!/sbin/sh
#
# 
# Start httpd.
#
PATH=/sbin:/usr/sbin:/usr/bin
export PATH
#
NNTPSERVER=news.cyberstore.com
export NNTPSERVER
#
unset ftp_proxy
unset gopher_proxy
unset http_proxy
unset news_proxy
unset wais_proxy
umask 022
#
case "$1" in
'start')
# replace xxx.xxx.xxx.? with your web-server IP addresses.
        echo "Starting HTTPD..."
        /usr/var/adm/ns/https-80.xxx.xxx.xxx.1/start
	/usr/var/adm/ns/https-80.xxx.xxx.xxx.2/start
	/usr/var/adm/ns/https-80.xxx.xxx.xxx.3/start
	/usr/var/adm/ns/https-80.xxx.xxx.xxx.4/start
	echo "HTTPD Running..."
        ;;
'stop')
        echo "Shutting down HTTPD..."
        /usr/var/adm/ns/https-80.204.244.123.129/stop
	/usr/var/adm/ns/https-80.204.244.123.193/stop
	/usr/var/adm/ns/https-80.204.244.123.194/stop
	/usr/var/adm/ns/https-80.204.244.123.195/stop
	/usr/var/adm/ns/https-80.204.244.123.196/stop
	/usr/var/adm/ns/https-80.204.244.123.197/stop
	/usr/var/adm/ns/https-80.204.244.123.198/stop
	/usr/var/adm/ns/https-80.204.244.123.199/stop
        ;;
*)
        echo "usage: $0 {start|stop}"
        ;;
esac
#
Hope this helps you.
Cheers,
Dana Huggard, TVINET Internet Services Inc.
Burnaby, BC. Canada, URL:"http://www.tvinet.com/about.html"
---------------------------------------------------------------
Regards,
>From the manpages for 'ifconfig':
  alias alias_address
            Establishes an additional network address for this interface.
            This can be useful when changing network numbers and you want to
            continue to accept packets addressed to the old interface.
            If you do not specify a netmask with the alias address, the
            default netmask is based on the alias address's network class.
which confirms that you CAN use IP aliasing and that you probably have done
it right already.
-- 
      ******************************************************************
      *         Knut Helleboe                    | DAMN GOOD COFFEE !! *
      *         Norsk Hydro a.s                  | (and hot too)       *
      * Phone: +47 55 996870, Fax: +47 55 996342 |                     *
      * Pager: +47 96 500718                     |                     *
      * E-mail: Knut.Hellebo_at_nho.hydro.com       | Dale Cooper, FBI    *
      ******************************************************************
-------------------------------------------------------------------------
I had the same problem and I did it with the appended shell skript.
Sorry for some german comments.
Gerhard
8< ------------ skript to install an alias IP adress ----------- >8
#!/bin/ksh
#
# Skript to install a network alias that survives a reboot
#
# GN/6/2/95
#
SETNAME="NETALIAS"
cat <<ENDE
===========================================================
		Installation von $SETNAME
===========================================================
ENDE
typeset -u yn="123"
START=""
STOP=""
IFCONFIG=/sbin/ifconfig
NETSTAT=/usr/sbin/netstat
BASENAME=netalias
SKRIPT=/sbin/init.d/$BASENAME
SSK=/sbin/rc3.d/S010$BASENAME
KSK=/sbin/rc2.d/K549$BASENAME
until [[ $yn = Y ]] || [[ $yn = N ]]; do
   read  yn?"Install $SETNAME  <y/n>  "
done
if [[ $yn = N ]] ;  then 
   echo exiting  $SETNAME  installation script...
   exit
fi
$NETSTAT -i
yn="132"
until [[ $yn = O ]] || [[ $yn = E ]]; do
   
   read IF?"Enter the interface name: "
   read ALIAS?"Enter the IP alias adress [nnn.nnn.nnn.nnn]: "
   echo ifconfig $IF alias $ALIAS   
   read  yn?" Okay, Redo, Exit <O/R/E>?  "
done
if [[ $yn = E ]] ;  then 
   exit
fi
START="$IFCONFIG $IF alias $ALIAS"
STOP="$IFCONFIG $IF delete $ALIAS"
cat <<ENDE > $SKRIPT
#!/sbin/sh
#
# Set an alias for the fta0 interface
#
PATH=/sbin:/usr/sbin:/usr/bin
export PATH
case "\$1" in
'start')
        $START
        ;;
'stop')
        $STOP
        ;;
*)
        echo "usage: \$0 {start|stop}"
        ;;
esac
ENDE
echo chmod 755 $SKRIPT
     chmod 755 $SKRIPT
echo ln -s $SKRIPT $SSK
     ln -s $SKRIPT $SSK
echo ln -s $SKRIPT $KSK
     ln -s $SKRIPT $KSK
yn="132"
until [[ $yn = Y ]] || [[ $yn = N ]]; do
   
   read  yn?" Start netalias now <y/n>?  "
done
if [[ $yn = Y ]] ;  then 
   $SKRIPT start
fi
8< ------------ skript to remove the alias IP adress ----------- >8
#!/bin/ksh
#
# Skript to delete the network alias skript
#
# GN/6/2/95
#
SETNAME="NETALIAS"
cat <<ENDE
===========================================================
		Delete von $SETNAME
===========================================================
ENDE
typeset -u yn="123"
BASENAME=netalias
SKRIPT=/sbin/init.d/$BASENAME
SSK=/sbin/rc3.d/S010$BASENAME
KSK=/sbin/rc2.d/K549$BASENAME
until [[ $yn = Y ]] || [[ $yn = N ]]; do
   read  yn?"Delete $SETNAME  <y/n>  "
done
if [[ $yn = N ]] ;  then 
   echo exiting  $SETNAME  deletion script...
   exit
fi
# delete the netalias
/sbin/init.d/$BASENAME stop
echo rm $SKRIPT
     rm $SKRIPT
echo rm $SSK
     rm $SSK
echo rm $KSK
     rm $KSK
8< ------------ that's all  ----------- >8
------------------------------------------------------------------
Thanks for all the Replys ....
--------------------
    Doug Wright    
ppstech_at_nbnet.nb.ca
-------------------
Received on Tue Apr 23 1996 - 17:03:07 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT