Solved

How to include another IP address during Sun boot up ?

Posted on 2001-08-13
5
268 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Specific format 21 207
Create and populate iFrame onClick of a button? 1 92
Stupid git question 2 103
Fulfillment API php code sample 1 59
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

821 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