Link to home
Start Free TrialLog in
Avatar of ck969
ck969

asked on

How to include another IP address during Sun boot up ?

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 ?
Avatar of ahoffmann
ahoffmann
Flag of Germany image

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)
ASKER CERTIFIED SOLUTION
Avatar of samri
samri
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of k.kidambi
k.kidambi

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
Avatar of ck969

ASKER

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 !
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