UNIX Consulting and Expertise
Golden Apple Enterprises Ltd. » Page 'Solaris basics: configuring ethernet interfaces'

Solaris basics: configuring ethernet interfaces

Recently I’ve had several clients who’ve just started with Solaris, and who have had roughly similar questions. So I thought I’d put up a few “How To” posts covering some Solaris basics.

Each LAN interface in Solaris has a configuration file in /etc which is named after the interface name and it’s instance.

So, let’s assume that you have two e1000g interfaces configured – you’d have two configuration files:

/etc/hostname.e1000g0
/etc/hostname.e1000g1

These files will just contain a hostname, which maps to an entry in /etc/hosts.

An example from my OpenSolaris development workstation:

bash-3.2$ cat /etc/hostname.e1000g0 
grond 

And this is /etc/hosts:

# Internet host table 
# 
::1 grond grond.local localhost loghost 
127.0.0.1 localhost 
192.168.13.100	grond grond.local loghost 

When Solaris boots, all it does to configure a LAN interface is look for hostname.* files in /etc. It then looks up the hostname in /etc/hosts to find out the IP address, then configures the interface.

So if you need to change the IP address of a LAN interface in Solaris, all you need to do is edit the hostname entry in /etc/hosts and reboot. For example, to change grond’s e1000g0 IP address to a different subnet, /etc/hosts would be modified to:

# Internet host table 
# 
::1 grond grond.local localhost loghost 
127.0.0.1 localhost 
192.168.125.100	grond grond.local loghost 

Then reboot the host for the changes to take effect.

Like this post? Spread the word!
delicious digg google
stumbleupon technorati Yahoo!

Comments are closed.

Top of page / Subscribe to new Entries (RSS)