How to configure a new network interface in Solaris 10.

When configuring a new network interface in Solaris 10, the first thing you want to do is to list all available interfaces. During installation of Soalris 10 the drivers for the NICs will be automatically loaded, provided the NIC is on the hardware compatibility list.

The dladm command with the show-link option will list all the network interfaces installed in the Solaris server.

root@server1 # dladm show-link
bge0 type: non-vlan mtu: 1500 device: bge0
bge1 type: non-vlan mtu: 1500 device: bge1
bge2 type: non-vlan mtu: 1500 device: bge2
bge3 type: non-vlan mtu: 1500 device: bge3

dladm with the show-dev option will display the link status, speed and communication mode.

root@server1 # dladm show-dev
bge0 link: up speed: 1000 Mbps duplex: full
bge1 link: up speed: 1000 Mbps duplex: full
bge2 link: unknown speed: 0 Mbps duplex: unknown
bge3 link: unknown speed: 0 Mbps duplex: unknown

ifconfig -a will list all network interfaces that are plumbed and ready for use.

root@server1 # ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000

bge0: flags=1000843 mtu 1500 index 2
inet 162.10.11.33 netmask ffff0000 broadcast 172.20.255.255
ether 0:b:5d:e5:77:c6

This will configure and plum the network interface bge0. After it has been plumbed the interface will be listed with the command ifconfig -a.

root@server1 # ifconfig bge1 plumb up

Check to see if the interface was plumbed successfully.

root@server1 # ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000

bge0: flags=1000843 mtu 1500 index 2
inet 162.10.11.33 netmask ffff0000 broadcast 172.20.255.255
ether 0:b:5d:e5:77:c6
bge1: flags=1000842 mtu 1500 index 3
inet 0.0.0.0 netmask 0
ether 0:b:5d:e5:77:c7

The next step is to configure the IP address. This can be done with the ifconfig command as well, but interfaces explicitly configured with the ifconfig command will not persist after a reboot. To make the configuration persistent across reboot create the file /etc/hostname.interface.

Create the file /etc/hostname.bge1. This step is optional as the vi command in the next step will also create the file if it does not exists.

root@server1 # touch /etc/hostname.bge1

Edit the file with vi and add the IP address and netmask for the interface.

root@myserver1 # vi /etc/hostname.bge1
168.20.10.11 netmaske 255.255.255.0

Add the IP address and hostname to /etc/inet/hosts.

root@myserver1 # vi /etc/inet/hosts
#
# Internet host table
#
127.0.0.1 localhost
::1 localhost
168.20.10.11 myserver1 myserver1.gamescheat.ca loghost

For Solaris 10 11/06 and earlier releases, add entries for the new interfaces into the /etc/inet/ipnodes file.

root@myserver1 # vi /etc/inet/ipnodes
#
# Internet host table
#
127.0.0.1 localhost
::1 localhost
168.20.10.11 myserver1 myserver1.gamescheat.ca loghost

To check the version of Soalris you have, read the /etc/release file.

root@server1 # more /etc/release
Solaris 10 5/09 s10s_u7wos_08 SPARC
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 30 March 2009

Perform a reconfiguration boot.

root@myserver1 # reboot — -r

After the system reboots, verify the interface configuration.

root@myserver1 # ifconfig -a

About Andrew Lin

Hi, I have always wanted to creat a blog site but never had the time. I have been working in Information Technology for over 15 years. I specialize mainly in networks and server technologies and dabble a little with the programming aspects. Andrew Lin

View all posts by Andrew Lin →