Solved

Add IP to Sun Machine

Posted on 2000-02-25
4
488 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
[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
  • 2
4 Comments
 
LVL 21

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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
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…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

705 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