From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Shaun.Racine@intier.com Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: Multiple IP addresses on one network adapter Date: Wed, 15 Jan 2003 11:51:32 +0000 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1042631533 31355 80.91.224.249 (15 Jan 2003 11:52:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2003 11:52:13 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 18Ym5a-00089T-00 for ; Wed, 15 Jan 2003 12:52:10 +0100 Original-Received: (qmail 30798 invoked by uid 5); 15 Jan 2003 11:53:15 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 30789 invoked by uid 49493); 15 Jan 2003 11:53:15 -0000 Original-Received: from Shaun.Racine@intier.com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(-0.2/5.0):. Processed in 0.446757 secs); 15 Jan 2003 11:53:15 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (160.91.4.119) by 0 with SMTP; 15 Jan 2003 11:53:14 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.1-1 #30669) with ESMTP id <0H8R008C97OF2Q@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 15 Jan 2003 06:53:14 -0500 (EST) Original-Received: from mail.magna-europa.com (mail.magna-europa.com [212.184.111.38]) by emroute1.cind.ornl.gov (PMDF V6.1-1 #30669) with ESMTP id <0H8R00M1V7NROR@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 15 Jan 2003 06:52:54 -0500 (EST) Original-Received: from mail.MIS.Magna-Europa.com ([172.28.32.9] verified) by mail.magna-europa.com (CommuniGate Pro SMTP 4.0.1) with ESMTP id 17288157 for tru64-unix-managers@ornl.gov; Wed, 15 Jan 2003 12:42:33 +0100 Original-To: tru64-unix-managers@ornl.gov X-Mailer: Lotus Notes Release 5.0.7 March 21, 2001 X-MIMETrack: Serialize by Router on MISGROUP01DS/SVR/MISGroup(Release 5.0.4 |June 8, 2000) at 01/15/2003 11:51:36 AM Xref: main.gmane.org gmane.os.tru64.managers:2967 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:2967 Great response, many thanks to all who replied. Many suggested editing /etc/inet.local, but I stayed with rc.config. I adopted Michael Bradford's suggestion; You need to alter the lines in rc.config to: NETDEV_0="nr0" IFCONFIG_0="174.28.48.99 netmask 255.255.0.0" NETDEV_1="nr0" IFCONFIG_1="alias 6.5.4.202/16" Also needed to increase (suggested by Roger!); NUM_NETCONFIG="2" Original question and all responses follow... ----- Forwarded by Shaun Racine/MISGroup on 15/01/2003 11:41 ----- Shaun.Racine@intier.com Sent by: To: tru64-unix-managers@ornl.gov tru64-unix-managers-owne cc: r@ornl.gov Subject: Multiple IP addresses on one network adapter 15/01/2003 09:59 Hi all, Version Compaq Tru64 UNIX V5.1 (Rev. 732), non-cluster, using NETRain. How can I setup more than one IP address for a single virtual "netrain" adapter which will survive a reboot? We have tried the following in rc.config (where 174.. is normal address, and 6.. is second address) ; NETDEV_0="nr0" IFCONFIG_0="174.28.48.99 netmask 255.255.0.0" NETDEV_1="nr0" IFCONFIG_1="6.5.4.202 netmask 255.255.0.0" but after a reboot it only has the first IP address. MAX_NETDEVS="8" TIA Shaun Racine == Michael James Bradford You need to alter the lines in rc.config to: NETDEV_0="nr0" IFCONFIG_0="174.28.48.99 netmask 255.255.0.0" NETDEV_1="nr0" IFCONFIG_1="alias 6.5.4.202/16" == Roger Is NUM_NETCONFIG = 2 ? == Phil Baldwin Don't think you can do it in rc.config (couldn't see anyway) but what you could do is add the necessary line to the /etc/inet.local file. This should run at system startup and add the required alias see man inet.local == Dennis Voetelink As far as I know, the only possibility is to use # ifconfig nr0 alias 6.5.4.202 netmask 255.255.0.0 to add the second IP address. Use -alias to remove it. I'm afraid you'll need to write your own startup script for this and place that in /sbin/init.d with a symlink to it in /sbin/rc3.d == Uwe Richter I think you have to call this an "interface alias". We set this (for a single interface) with a line in /etc/inet.local: ifconfig ee3 alias netmask This should also work for you if the NetRain interface is already configured an up. == Christian Wessely I have had the same object: assign a second IP to a network adapter that serves as a virtual Webserver (with apache). Solution for me was a little shellscript and the alias option of ifconfig: /sbin/init.d/alias contains --------------------------------- #!/bin/sh # This file should have uid root, gid sys and chmod 744 # case "$1" in 'start') # # Edit these lines to suit your installation (paths, workgroup, host) # /sbin/ifconfig tu0 alias X.Y.105.21 /sbin/ifconfig tu0 alias X.Y.105.25 ;; 'stop') /sbin/ifconfig tu0 -alias X.Y.105.21 /sbin/ifconfig tu0 -alias X.Y.105.25 ;; *) echo "Usage: `basename $0` { start | stop }" ;; esac --------------------------------- In my case, this script is called by the awemanager when the cluster starts; for a single machine i would just recommend to cd /sbin/rc3.d ; ln -s yourscript to Sxxalias so that it is integrated in the normal start procedure. Perhaps you can use the alias option directly in the rc.config, but I have not dealt with that. == Johan Brusche Add a line in /etc/inet.local reading: /sbin/ifconfig nr0 alias 6.5.4.202 netmask 255.255.0.0 Remove the entry in rc.config