home *** CD-ROM | disk | FTP | other *** search
- /* Create multiple virtual IP addresses under OS/2 TCP/IP version 4 */
- /* This batch file was generated by CompuSource PowerWeb Server++ */
-
- /* These are all the setup variables: */
-
- adapter = '<!--#echo var=adapter -->' /* This is a dummy com port set up with SIO.SYS */
- multiple = <!--#echo var=multiple --> /* This is how many IP addresses you want, up to 32 */
- realip = '<!--#echo var=realip -->' /* This is the IP through which you will route */
- baseip = '<!--#echo var=baseip -->' /* This is the class C ip base address */
- startip = <!--#echo var=startip --> /* This is the first class C ip address to use */
-
- /* Have any of the IP's already been configured? If so, don't redefine. */
-
- if multiple == 0 then do
- say 'No IP Addresses to configure.'
- return;
- end
-
- '@ipdetect' baseip'.'startip
- if rc == 0 then do
- say 'Multiple IP Addresses ALREADY configured.'
- return;
- end
-
- say 'Configuring' multiple 'Multiple IP Addresses ...'
- say 'This takes a while, sometimes 3-5 seconds per IP address that has to be configured, so please be patient.'
-
- /* Now the work begins - add an alias for each IP Address */
-
- do interface=0 to multiple-1
- ip = interface + startip
- '@ifconfig' adapter baseip'.'ip 'alias'
- end
-
- /* Ensure the default ip is reset to the physical adapter IP address, */
- /* otherwise PowerWeb and HostID will query the wrong IP address. */
-
- '@hostid' realip
-
- return
-
-