Solved

Add IP to Sun Machine

Posted on 2000-02-25
4
476 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

747 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

8 Experts available now in Live!

Get 1:1 Help Now