adding a network card with Solaris X86
By wwwillem on Jul 24, 2006
It's the kind of thing you don't have to do very often, because the Operating System install takes care of it so well. Even to the extend that you are tempted to just reinstall the OS when adding some new hardware to your system. In this case I needed to add two 3Com network cards to an Ultra-20 that was already configured for the onboard Ethernet. I know how to do it under Linux: just start the GUI config tool. With Solaris, it's a bit more of a manual process. But, in the end not too tough, and when you get stuck, Google is your friend.
I first checked the Solaris FAQ at www.sun.drydog.com. It was not 100% accurate (probably based on an older Solaris version), but a very good starting point. Manually configuring a network with ifconfig is something I've done often enough. But the issue for me is that I don't know which device/driver name to use. In Linux this is simple, it's always "eth0", but in Solaris it depends on the driver.
After adding the network cards and rebooting I did a PCI scan:
bash-3.00# /usr/X11/bin/scanpci pci bus 0x0000 cardnum 0x0a function 0x00: vendor 0x10de device 0x0057 nVidia Corporation CK804 Ethernet Controller pci bus 0x0001 cardnum 0x09 function 0x00: vendor 0x10b7 device 0x9050 3Com Corporation 3c905 100BaseTX [Boomerang] pci bus 0x0001 cardnum 0x0a function 0x00: vendor 0x10b7 device 0x9050 3Com Corporation 3c905 100BaseTX [Boomerang]
You see the onboard Ethernet Controller and then the two 3Com cards. The important part is the vendor and device numbers. With these two, we now have a look at:
bash-3.00# grep 9050 /etc/driver_aliases elxl "pci10b7,9050"
This gives us the "elxl" driver name I was looking for. Alternatively, you can have a look at:
bash-3.00# grep 9050 /boot/solaris/devicedb/master pci10b7,9050 pci10b7,9050 net pci elxl.bef "3Com 3C905-TX Fast Etherlink XL 10/100"
To take care that Solaris "picks up" the card, you need to do a "touch /reconfigure" and then restart your system with "reboot" or "init 6". The FAQ says that you then have to press 'Esc' during the driver configuration, but that's not the case (anymore). After rebooting, it's time to configure the network interface. First by hand:
bash-3.00# ifconfig elxl0 plumb bash-3.00# ifconfig elxl0 netmask 255.255.255.0 192.168.1.2 bash-3.00# ifconfig elxl0 up bash-3.00# ifconfig elxl0 bash-3.00# ping 192.168.1.1 bash-3.00# ifconfig elxl0 down bash-3.00# ifconfig elxl0 unplumb
And when that works fine, (assuming "moon" is the hostname) make it permanent with:
bash-3.00# echo "moon" > /etc/hostname.elxl0 bash-3.00# echo "192.168.1.2 moon" >> /etc/hosts bash-3.00# svcadm restart network/physical