Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 240
  • Last Modified:

Default IPAddress on Boot

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
AtulSharma
Asked:
AtulSharma
1 Solution
 
soupdragonCommented:
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
 
elf_binCommented:
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
 
liddlerCommented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now