How do I find out what my network device is?

I've been hanging out on #opensolaris-AT-irc.freenode-DOT-net a lot recently doing my bit to help people get over the initial hump of installing Solaris and OpenSolaris. This evening we've been talking about devices, specifically NICs, and figuring out what driver they need. So how does one go about this if one has no idea what the driver should be? Well, start by running prtpicl -v and either pipe the output through /usr/bin/less or dump it to a file. Then you need to know what you're looking for: search for "Ethernet" or "Network" and you can't get too far off the track. That will appear in a stanza like this:
                 pci1458,e000 (obp-device, 187220000034b)
                  :DeviceID      0xb
                  :UnitAddress   2
                  :device-id     17184
                  :vendor-id     4523
                  :revision-id   19
                  :class-code    131072
                  :unit-address  b
                  :subsystem-id  57344
                  :subsystem-vendor-id   5208
                  :min-grant     23
                  :max-latency   31
                  :interrupts    1
                  :devsel-speed  1
                  :fast-back-to-back
                  :66mhz-capable
                  :power-consumption     01  00  00  00  01  00  00  00
                  :model         Ethernet controller
                  :compatible   (1872200000357TBL)
                   | pci11ab,4320.1458.e000.13 |
                   | pci11ab,4320.1458.e000 |
                   | pci1458,e000 |
                   | pci11ab,4320.13 |
                   | pci11ab,4320 |
                   | pciclass,020000 |
                   | pciclass,0200 |
                  :reg
 00  58  02  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
 10  58  02  02  00  00  00  00  00  00  00  00  00  00  00  00  00  40  00  00
 14  58  02  01  00  00  00  00  00  00  00  00  00  00  00  00  00  01  00  00
 30  58  02  02  00  00  00  00  00  00  00  00  00  00  00  00  00  00  02  00
                  :assigned-addresses
 10  58  02  82  00  00  00  00  00  00  00  f5  00  00  00  00  00  40  00  00
 14  58  02  81  00  00  00  00  00  94  00  00  00  00  00  00  00  01  00  00
 30  58  02  82  00  00  00  00  00  00  00  00  00  00  00  00  00  00  02  00
                  :pm-hardware-state     needs-suspend-resume
                  :devfs-path    /pci@0,0/pci10de,ed@e/pci1458,e000@b
                  :driver-name   skge
                  :binding-name  pci1458,e000
                  :bus-addr      b
                  :instance      0
                  :_class        obp-device
                  :name  pci1458,e000
see, up there at :model Ethernet controller. Now the next stanza or property is the very important :compatible part. It's so important to this blog that I'll excerpt it:
                  :compatible   (1872200000357TBL)
                   | pci11ab,4320.1458.e000.13 |
                   | pci11ab,4320.1458.e000 |
                   | pci1458,e000 |
                   | pci11ab,4320.13 |
                   | pci11ab,4320 |
                   | pciclass,020000 |
                   | pciclass,0200 |
These strings are PCI Consortium identifiers. Let's walk through them one by one.
identifier which is what?
pci11ab,4320.1458.e000.13 vendor,device.subvendor.subdevice.revision
pci11ab,4320.1458.e000 vendor,device.subvendor.subdevice
pci1458,e000 vendor,device
pci11ab,4320.13 vendor,device.revision
pciclass,020000 PCI Consortium device class, specific
pciclass,0200 PCI Consortium device class, general
Ok, that's all well and good, but how do I use that information? Well let's assume for a second that you want to find a network device in general. So searching through your prtpicl -v output you'll look for pciclass,0200. That will give you a pointer to the pci vendor,deviceid information, which you can then check /etc/driver_aliases for:
$ grep pci1458,e000 /etc/driver_aliases
skge "pci1458,e000"
This tells me that this particular pci identifier (pci1458,e000) is a device alias for the skge driver from SysKonnect. The example we came across on #opensolaris this evening was
                  :compatible   (1e4000001e7TBL)
                   | pci14e4,1677.1028.179.1 |
                   | pci14e4,1677.1028.179 |
                   | pci1028,179 |
                   | pci14e4,1677.1 |
                   | pci14e4,1677 |
                   | pciclass,020000 |
                   | pciclass,0200 |
which a quick search of /etc/driver_aliases reveals is actually a Broadcom nic which we supply a driver for. As it happens, for this particular system we had to specify more than just the vendor,deviceid: # update_drv —a —i ' "pci14e4,1677.1028.179" ' bge This reported warning: driver (bge) successfully added to the system but failed to attach which was a pain, but progress. So we asked this new user to run
# svcs clear svc:/network/physical:default
because it was showing as 'maintenance'.... and suddenly all that we had left was a piddly little routing problem. Joy! Now if we didn't supply a driver, the thing to do would be to Goooooooogle for the pci vendor,deviceid string and "solaris driver" -- for NICs you'll frequently come up with a hit for Masayuki Murayama's collection of drivers. There is a really nifty utility available for linux called lspci which will let you see what you've got installed in your system and on your motherboard. It makes use of a file of XOrg you can run /usr/X11/bin/scanpci instead.... I'm not sure whether the device mappings are hard-coded though.
Comments:

Thanks for the info, but what if 'prtpicl -v' returns no result with 'model:Ethernet||Network'? I know it's there b/c it shows up in the results of /usr/X11/bin/scanpci:

nVidia Corporation MCP51 Ethernet Controller

I'm trying to get the nge driver to work with my nForce 4 6150/430 motherboard (MSI K8NGM2 FID). At first it seemed that driver_aliases simply had the wrong device-id for it, the two lines being:

nge pci10de,56
nge pci10de,57

I used update_drv -a -i '"pci10de,269"' nge to add the correct device-id, as shown in scanpci, then 'reboot -- -r', but no luck, still doesn't recognize the onboard ethernet controller.

Any suggestions about what else I could try? I'd really like to get the nge driver working if at all possible since it supposedly supports this ethernet controller, but will resort to Masayuki's nfo driver if necessary. Thanks!

Posted by Byron on October 23, 2006 at 09:46 PM EST #

please tell me by all details how to get and install driver for ethernt(or lan)card on my laptop acer aspire 5610 and if there are files to be put in any place ,send me it tell me all details because i did not understnd you

Posted by mohamad on May 06, 2007 at 03:36 AM EST #

Post a Comment:
Comments are closed for this entry.
About

I work at Oracle in the Solaris group. The opinions expressed here are entirely my own, and neither Oracle nor any other party necessarily agrees with them.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today