?
Solved

Default IPAddress on Boot

Posted on 2003-03-11
4
Medium Priority
?
239 Views
Last Modified: 2013-12-27
How do i go about finding all the IP Addresses that are configured to come up on my Solaris machine on boot time.
Can i add a logical IP to the list as well ?
0
Comment
Question by:AtulSharma
[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
4 Comments
 
LVL 2

Accepted Solution

by:
soupdragon earned 180 total points
ID: 8115937
IP addresses are configured using the files /etc/hostname.<IF> where <IF> is the interface name - le0, hme0, qfe2 etc. This file contains the hostname for that interface, this name is compared with entries in the /etc/hosts file and the corresponding address is used to bring the interface up. If using dhcp, the file is called /etc/dhcp.<IF> and is usually empty.

e.g.
#cat /etc/hostname.hme0
tango

#cat /etc/hosts
62.30.163.45   tango loghost

ifconfig -a lists all your currently running Interfaces

Virtual interfaces are created by adding a number to the end of the I/F name e.g. hme0:1, hme0:2 etc. I believe they can be configured using the same mechanism i.e.

#cat /etc/hostname.hme0:1
tangoviif1

# cat /etc/hosts
62.30.164.45 tangoviif1

You can bring  one up without rebooting by calling

ifconfig hme0:1 62.30.164.45 netmask 255.255.255.0 broadcast+ up

SD
0
 
LVL 10

Expert Comment

by:elf_bin
ID: 8165302
Find information on network interfaces:
ifconfig -a

To add (say to hme0):
# Plumb the interface.
/usr/sbin/ifconfig hme0:1 plumb
# Add netmask (x.x.x.x) & IP address (y.y.y.y)
/usr/sbin/ifconfig hme0:1 netmask x.x.x.x y.y.y.y
# Add broadcast address z.z.z.z (if in a stub network)
/usr/sbin/ifconfig hme0:1 broadcast z.z.z.z
/usr/sbin/ifconfig hme0:1 -trailers
# Bring interface up and use it.
/usr/sbin/ifconfig hme0:1 up
# Netmask for original interface
/usr/sbin/ifconfig hme0 netmask a.a.a.a
# Broadcast for orginal interface
/usr/sbin/ifconfig hme0 broadcast b.b.b.b
# Enable forwarding across both interfaces.
/usr/sbin/ndd -set /dev/ip ip_forwarding 1

The key thing is to remember that a virtual interface is driver:number (i.e.: hme0:1)

Hope this helps.
0
 
LVL 18

Expert Comment

by:liddler
ID: 10475147
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by soupdragon

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
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 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…
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…
Suggested Courses

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