Solved

How to include another IP address during Sun boot up ?

Posted on 2001-08-13
5
266 Views
Last Modified: 2013-12-27
I have Netscape Enterprise Web Server running on my Sun Solaris. I have created a website which is going to make use of a new IP address. My DNS server is running on another NT server. In order to create the new website and assign the new IP address for it, I need to boot up the Sun and having Sun to load more than 1 (current) IP address so that I can bind the new IP address in my Netscape Web server for my new website. Can anybody tell me how to do it ?
0
Comment
Question by:ck969
5 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6381801
put something like:
   ifconfig le0:1 192.168.0.1 up netmask 255.255.255.0
in one of the rc-scripts, or better build a new rc-script (see (etc/init.d/README how to do it)
0
 
LVL 15

Accepted Solution

by:
samri earned 100 total points
ID: 6383321
another option:

existing IP (server1)     : 192.168.1.1
new IP (server2) : 192.168.1.2

edit you /etc/hosts to include the following lines

192.168.1.1 existingname.domain.com existingname
192.168.1.2 newname.domain.com newname

create these files

/etc/hostname.hme0          <-- should alredy exist.  It might be hostname.le0
content: existingname

/etc/hostname.hme0:1
content: newname

the simplest way is to reboot the machine (init 6).
0
 
LVL 1

Expert Comment

by:k.kidambi
ID: 6384459
you need not boot your sun machine,

plumb up another interface like le0:1 or hme0:1 or qfe0:1 with the new interface and the other regular stuff.

stop the Netscape webserver.

Here are 2 things you can do

1. if you need your web server to see only the new ip address then you can add an Address directive in magnus.conf file as follows.

Address www.xxx.yyy.zzz

restart the webserver

2. If you need to run the stuff in 2 ipaddress you can add a Hardware virtual server as follows in obj.conf. This will enable the webserver to run on your webserver in magnus.conf ipaddress and also on the new ip address you are going to assign here.

NameTrans fn="document-root" address="www.xxx.yyy.zzz" root="your/document/root/for/this/server"

restart the webserver.

Here are the 2 approches which I am aware of. but for both the approaches you need to plumb up the new interface as follows (I am taking an example of hme card):-

ifconfig hme0:1 plumb

ifconfig hme0:1 www.xxx.yyy.zzz netmask ur.net.mask.xxx up

if you need you can also provide with the other options.

echo "www.xxx.yyy.zzz" > /etc/hostname.hme0:1
also add the new netmask value in your /etc/netmasks file
and you need to update the /etc/hosts file too.

This will enable you to get the interface up after your reboot also.

post your comments here if you have any doubts.

kidambi
0
 

Author Comment

by:ck969
ID: 6387488
That was exactly what I want but the best is I don't have to reboot my server. That's good about Unix over Wndows !
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6388886
just to clarify:
  - the ifconfig solution is temporary as long as the machine is running (usualy for years ...:)
  - the /etc/hostname.hme0:1 is the permanent solution which enables second IP after reboot
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now