Solved

Add IP to Sun Machine

Posted on 2000-02-25
4
479 Views
Last Modified: 2013-12-27
Hi
I need to add an IP address to my web server , which is Sun E450 with OS Solaris 2.7
What are the files that need to be configured?
uri22
0
Comment
Question by:uri22
  • 2
4 Comments
 
LVL 20

Expert Comment

by:tfewster
ID: 2559901
IP addresses and the associated hostnames are in /etc/hosts

Are you adding the address of another server, or trying to give your web server a 2nd address?
0
 
LVL 40

Accepted Solution

by:
jlevie earned 75 total points
ID: 2559913
If you want to add an IP alias to an existing interface, you do so by creating a /etc/hostname.e-devN:1 (e.g. /etc/hostname.hme0:1). "e-devN" represents your ethernet adapter and instance number that the IP is to be aliased to and ":1" represents the first alias. It contains the hostname as found in /etc/hosts of the IP address to be aliased.

If you are assigning an IP to a previously unused ethernet adapter, such as one of the ports on a quad fast-ether card, you create a /etc/hostname.qfeN file ("N" representing the port instance number) that contains the hostname of the IP as found in /etc/hosts.

In either case you want to bring up the IP's by rebooting. (it can be done manually, but you'd still want to reboot to prove that they come up automatically at boot time.

Now, if you are running a modern web server (such as Apache) that implements a Named Virtual host service, you can configure the server to provide a virtual host without needing an additional IP on the box. In this case, you simply create a CNAME record if the virtual server is to be with the domain, or the approriate DNS records to point the virtual server DNS name to the IP of the box. The web server then decides which virtual server to use based on the FQDN in the URL... Neat!
0
 
LVL 1

Author Comment

by:uri22
ID: 2563066
thanks jlevie but I just want to make sure.
I already have /etc/hostname.hme0 which contain my hostname.
Do you men that I change it's name to /etc/hostname.hme0:1 and add /etc/hostname.hme0:2 which both contain the same name?
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2563301
Don't change hostname.hme0, just add hostname.hme0:1 and put the hostname that corresponds to IP that you want to alias in it. For example if I have a machine whose hostname is server.dom.com, the hosts file would look something like:

127.0.0.1      localhost
192.168.1.1      server.dom.com server
192.168.1.2      web2.dom.com web

And I were IP aliasing 192.178.1.2, I'd put web2 or web2.dom.com into hostname.hme0:1. The next time the system boots it'll create the IP alias and there'll be an additional interface shown in the output of "ifconfig -a" bound to 192.168.1.2.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
g++ pthread_init failure on AIX 10 71
Need some help with tutorials or training material/videos in unix 1 69
Virtualizing TAPE on dual VIOS 3 79
NTP Server in VMware 5 165
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

863 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

18 Experts available now in Live!

Get 1:1 Help Now