?
Solved

Add IP to Sun Machine

Posted on 2000-02-25
4
Medium Priority
?
489 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 225 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

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

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month14 days, 22 hours left to enroll

771 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