Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to include another IP address during Sun boot up ?

Posted on 2001-08-13
5
Medium Priority
?
272 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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 learn how to look for a specific file type in a local or remote server directory using PHP.
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…

670 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