So, you are new to Solaris and you are looking at the mess of nic ports in the back of the server. Don’t worry, it’s not as complex as you think.
First, you need to understand how to configure your Solaris NIC.
Assuming the driver’s loaded (check with prtconf -vD), you should only need to do the following:
1. vi /etc/hosts and put in an ip adress and a hostname separated by whitespace.
2. vi /etc/hostname.nic[0-4] For example, I have a bge nic with 4 ports. I would vi /etc/hostname.bge0, bge1, bge2, or bge3. Put in this file only one line with the hostname you used in step 1.
3. vi /etc/netmasks and put in your network id and an appropriate mask.
4. netstat -rn to get routing information. You’ll need a default route if one isn’t there. It’s generally a good idea to always have one specified in /etc/defaultroute anyway. If you have a second network connected, you’ll need to tell your machine what to send to the second network. See my example below.
So, for 2 nics, with ip addresses of 10.1.1.1/24 and 10.1.2.1/24, with routers of *.254, you’d do the following:
/etc/hosts:
10.1.1.1 onenetwork onenetwork.rattyboy.com loghost
10.1.2.1 twonetwork twonetwork.rattyboy.com
/etc/hostname.bge0
onenetwork
/etc/hostname.bge1
twonetwork
vi /etc/netmasks
10.1.1.0 255.255.255.0
10.1.2.0 255.255.255.0
netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
10.1.1.0 10.1.1.254 U 1 234 bge1
224.0.0.0 10.1.2.1 U 1 0 bge0
default 10.1.1.254 UG 1 15981
127.0.0.1 127.0.0.1 UH 1 57 lo0
Now we have to tell the system what to do with traffic destined for the 10.1.2.0 network. Runroute add net 10.1.2.0 10.1.2.254.
/etc/defaultrotuer
10.1.1.254
That’s it. I’m pretty sure that you must have a unique hostname for each network port unless you start using trunking. Hey, that sounds like a good test question!
A good reference article:
BigAdmin Feature Article: Network Configuration on the Solaris Platform