Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to include another IP address during Sun boot up ?

Posted on 2001-08-13
5
Medium Priority
?
273 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 300 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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 benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

927 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