Problem
If I am having a problem getting a LAN card working on my server operating system, what should I check? What utilities and files are involved in the installation and configuration of a network card?
Solution
The card used in the examples below is a 3COM 905b network card; the network IP addresses are used for example purposes only.
1. Usually a system is being added to an existing office LAN structure and other machines are operational, so it would generally be assumed that there are no problems with the various network hardware components. This assumption must be reconsidered once the UnixWare 7 system software and settings have been checked as detailed below, and the problem remains.
As an example only, a system could be represented as in Diagram (a) below:
Diagram (a).+------------+
| |
| |
| UnixWare 7 |
| /OSR6 |
| |
+ .......... +
| LAN Card |
+-----|------+
|
+ - - - -> - -/ Floor or wall socket / - - - - +
|
|
+- - -<- - - -/ HUB (and patchpanel)- - - <- - - -+
|
|
+ - - - / Router or Bridge or Switch / - - >Check all the points along the network if you are unable to connect to a remote machine. If it is possible, always try other floor or immediate wall sockets, always try other cables, switch over any hub or patch panel connections and cables (especially if there is an existing system on the network that is working and whose connections can be compared).
The hub and routers may have LEDs that will indicate traffic over the network, so check these while attempting to ping out (which will be discussed later in this article).
The LAN card itself may have indicator LEDs that usually are all green, indicating normal operation. If in doubt, always try a second card, whether similar or from another manufacturer.
2. Assuming the card and network are functioning correctly, where do I start looking on the system?
The network card is detected and configured into the system at operating system installation time, as much as possible. For the card used in this example you will see the following displayed on the console just after the System Profile setup:
The following network interface adapter(s) were detected:
Bus BusNum Slot Network Adapter NamePCI 0 2 3Com EtherLink XLThe TCP/IP IP address, broadcast address, netmask address, domain and primary domain nameserver are then entered.
The network card may have also shown up on system boot in a screen report from the hardware BIOS. This can also be checked later by rebooting the system and pressing <Alt><F1> (or similar) a few times. On the system tested, the card is detected as one of the PCI devices.
Upon system reboot, the configuration can be checked with the
ifconfig(1Mtcp) command as mentioned later. The loopback (lo0) and
network card interface should be present and all addresses correct.The card is then tested with the "ping(1Mtcp)" command, for example:
# ping <systemname> or <IP address>Verify the loopback (effectively the networking stack from the operating system down to the network card driver) by:
# ping -n 127.0.0.1You should see:127.0.0.1 is aliveThen test the connection by pinging a remote host with its IP address, for example:
# ping -n 123.456.789.10Again, you should see:123.456.789.10 is aliveIf you do not know the IP address of the remote system, or in case it is incorrect, or that particular system has some difficulty with it, you can ping the broadcast address:
# ping -n 123.456.789.255You can then ping a remote system by name if DNS has been set up on the system. The system "/etc/resolv.conf" file should have, for example:
domain mysystem.sco.com
nameserver 123.456.789.5You should then see a message like "<systemname> is alive". The remote system should be accessible using other utilities like rlogin(1tcp) or telnet(1tcp).
Please Check if telnet is enabled in /etc/inetd.conf:
Note:
# cat /etc/inetd.conf | grep telnetshould at least return a line liketelnet stream tcp nowait root /usr/sbin/in.tcpd in.telnetdThis line must be without # at the beginning otherwise, this means
telnet has been disabled - this happens if you decide to install your
system with high security (C2).If there is a router or other device between your system and the remote system and the latter fails, ping that router first to verify it is responding. Routing can also be checked using the command:
# netstat -ranThe nameserver should also be pinged, again with "-n".
If the card is not responding (for example, if it pings locally but fails to connect to any remote IP address), the overall system should be rechecked. This includes the following:
(a) Log in as the "root" user on the system desktop and run the
Network Configuration Manager utility "netcfg(1M)" from within the
SCOadmin "Networks" option or from the command line, as follows:# netcfgIn this case, it shows:*HW 3Com EtherLink XL-PCI Slot 2 Bus 0 Device 11 Function 0 - TCP/IP
The network configuration manager assembles its information about the network card and settings from the resource manager and various system files detailed below.
Important Note: Administrators should use the Network Configuration Manager utility provided in UnixWare 7/OSR6 to add, modify, or configure any networking on the system. The files discussed below should NOT be modified themselves, as this could lead to serious damage to the system.
(b) Check the Resource Manager Database, "resmgr(1M)":# resmgr |pgIt shows:KEY MODNAME UNIT IPL ITYPE IRQ IOADDR MEMADDR DMAC BINDCPU
BRDBUSTYPE BRDID SCLA SSID SLOT ENTRYTYPE BUSNUM
...
...
23 e3H 0 6 4 10 d000 d07f e1000000 e100007f - - 4 0x10B79055
0x0002 2 2 0
....
64 net0 0 6 - - - - - - - - - 0x10B79055 - - 2 -
....
....We know "e3H" is the driver name used for this 3COM card, but even if not, we have two lines at UNIT 0 and SLOT 2 from netcfg. The "net0" interface is the operating system connection device to the first network card on the system, which is linked back to use the "e3H" card driver. The system "ifconfig(1Mtcp)" utility shows the "net0" interface also as:
# ifconfig -a
lo0: flags=4049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet 127.0.0.1 netmask ff000000
perf. params: recv size: 4096; send size: 8192;
full-size frames: 1
net0: flags=4043<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 123.456.789.10 netmask ffffff00 broadcast
123.456.789.255
perf. params: recv size: 24576; send size: 24576;
full-size frames: 1
....Check to see that the device interfaces exist in the "/dev" directory:
# ls -al /dev/net0
crw-rw-rw- 1 root sys 7, 88 Apr 22 16:59 /dev/net0(c) Again, as "root", run the Device Configuration
Utility or DCU from within the SCOadmin "Hardware" option or from
the command line as follows:# dcuChoose "Hardware Device Configuration". It shows:Device Name IRQ IOStart IOEnd MemStart MemEnd DMAY 3Com Fast EtherLink 10 d000 d07f e10000000 e100007f -Choose "Software Device Drivers", "Network Interface Cards". It shows:
Driver Names of Supported Drivers(*) e3h ....
....
3 Com Fast EtherLink XL PCI (3C905b)
...The drivers on the UnixWare 7/OSR6 system are generally loaded at installation time with the operating system. The packages can be checked using the "pkginfo(1)" command as follows:
# pkginfo |pg....
system nics Network Adapter Drivers
...This can be expanded:# # pkginfo -l nics
PKGINST: nics
NAME: Network Adapter Drivers
CATEGORY: system,utilities
ARCH: IA32
VERSION: 7.0.1a
BASEDIR:
VENDOR: SCO
SETINST: UnixWare
SETNAME: Core Systems Services
DESC: Network drivers and configuration utilities
PSTAMP: UW7 08/19/98 castor4.r
INSTDATE: Apr 22 1999 04:41 PM
STATUS: completely installed
FILES: 526 installed pathnames
27 partially installed pathnames
67 shared pathnames
6 linked files
2 symbolic links
108 directories
104 executables
9431 blocks used (approx)It mentions that the package is fully installed, but if on
inspection it was not, it may be reloaded from the UnixWare 7
/OSR6 CD-ROM media. Insert the second CD-ROM of the operating system
set and run the command:# pkgadd -d /dev/cdrom/cdrom1 nicsIf you get the error message:UX: pkgadd: ERROR: device </dev/cdrom/cdrom1> is not listed in the device table
the system may need to be rebooted before it sees the CD-ROM unit.
3. Where are the card drivers and associated files kept?
The software packages installed on the system can be seen in one form in the "/var/sadm/install/contents" file. NOTE: Do NOT edit this file. The files associated with the "e3H" driver (for example) can be seen as:
# fgrep e3H contents
....
/etc/conf/bcfg.d/e3H d none 0755 root sys 2 NULL NULL +nics
/etc/conf/bcfg.d/e3H/e3H-pci.bcfg v none 0644 root sys 700
44364 924796769 2 NULL NULL +nics
/etc/conf/drvmap.d/e3H v none 0644 root sys 991 12831 924796769
2 NULL NULL +nics
/etc/conf/mdevice.d/e3H v none 0644 root sys 153 11809
924796769 2 NULL NULL +nics
/etc/conf/node.d/e3H v none 0644 root sys 176 11810 924796769
2 NULL NULL +nics
/etc/conf/pack.d/e3H d none 0755 root sys 2 NULL NULL +nics
/etc/conf/pack.d/e3H/Driver.o v none 0644 root sys 57984 21135
924796769 2 NULL NULL +nics
etc.
etc.
/etc/inst/nd/mdi/e3H d coredriver 0755 root sys nics
....
....The driver file is in the "/etc/inst/nd/mdi" directory for this card, in this case "e3H".
Please Also check the contents of "hw -v" on your prototype and the contents
Note: of /etc/inst/nd/mdi/e3H/Drvmap. The "vendor id" and "device id" in
the "hw -v" output should match the id described in the Drvmap for
the driver. This is assuming "/etc/hw" exists.Various data can be seen in these files and by looking at the Driver.o binary file as follows:
# strings Driver.o |pgThe specific board configured for the system can be seen by looking in the directory "/etc/conf/bcfg.d"; again, in this case it is "e3H".
The network card details seen earlier in (1) can be seen linked into the UnixWare 7/OSR6 kernel in the "/etc/conf/cf.d/sdevice" file. For example:
# fgrep e3H sdevice...
# use /etc/conf/bin/idinstall -gs e3H
e3H Y 0 6 4 10 D000 D07F
E1000000 E100007F -1
...# fgrep net0 sdevice
net0 Y 0 0 0 0 0 0
0 0 -1 -1The system IP address and domain information is kept in the file "/etc/inet/hosts". The default routing information is kept in the file "/etc/inet/config", for example:
...
4c:/usr/sbin/route::y::add default 123.456.789.5:
...The "net0" information shown in the output of "ifconfig" is from the file "/etc/confnet.d/inet", for example:
net:0:123.456.789.10:/dev/net0: netmask 255.255.255.0 broadcast 123.456.789.255 perf 24576 24576 1:add_interface:
4. If the card appears to be correctly configured into the operating system and you are able to ping it locally but cannot reach another system on the same subnet, the checks discussed in (1) above should be revisited.
Also, the UnixWare 7/OSR6 system logfiles should be checked for any error messages. These files are:
/var/adm/log/osmlog/usr/adm/syslogThe "netstat -i" command can also be used to inspect the state of the card:
# netstat -i
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lo0 16384 loopback localhost 404 0 404 0 0
net0 1500 123.456.789 test.sco.com 411283 0 166247 4 63945. There are other commands you can use to investigate potential problems, including:
(a) arpThe arp(1Mtcp) command can be used for address resolution to check if the system IP address is seen correctly, and that the MAC address used by the network card on your system is not being duplicated by other systems.
# arp -atest1.sco.COM (123.456.789.10) at 0:a0:c2:24:ba:7e (802.3) test2.sco.COM (123.456.789.5) at 0:0:c0:5b:ba:9a (802.3) ...
(b) tracerouteThe traceroute(1Mtcp) command can trace the route the IP packets take to reach a system on a network. This is useful if you are trying to connect to a remote system through a router.
Note: For UnixWare 7.0.1 you will need to include Support Level Supplement (SLS) ptf7069g, the Networking inet Driver for UnixWare 7.0.1, for a corrected traceroute utility. See ta109928.
6. Finally, if the network card in the system is working but problems are experienced in the network traffic itself, a network sniffer would be needed to diagnose any problems with the transfer of data packages across the network "on the wire."
TROUBLESHOOTING:If you find you are able to detect the card, add it but it doesn't remain within "netcfg" or you get the error:
"Couldn't create now dlpimdi file entry - idinstall DoRemainingStuff failed"
Then it could be you are trying to add the network card as net0 but there is already a net0 defined in some of the configuration files below. In order words, a previous attempt to configure a network card was aborted, thus leaving half of the previous configuration there.
To clean up, let's assume you are trying to add a second network card
and you are having this issue. This implies that net0 is fine, net1
is the culprit and the server is trying to add the netword card as
net2 and is failing.You need to ensure that net0 is untouched and net1 is removed from the following:
/dev/net1
/usr/lib/netcfg/x/net1 (where x are many directories)
/etc/confnet.d/netdrivers (modify this file to remove net1)
/etc/confnet.d/inet/interface (modify this file to remvove net1)
/etc/conf - ie. find . -print | grep net1 and remove them
/etc/inst/nd/dlpimdi (modify this file to remove net1)Run "resmgr" and check that there are no "net1" entries, otherwise remove them with "resmgr -r -k <the key number of net1>"
# /etc/conf/bin/idconfupdate -f
# /etc/conf/bin/idbuild -B
# init 6ADDITIONAL TROUBLESHOOTING NOTES:Network configuration: - netconfig - drivers installed in /etc/inst/nd/ - bcfg files are parsed by ndcfg - /etc/confnet.d/inet/interface is configured - at boot /etc/tcp (c.f. S69inet on UW) is run to link the driver into dlpi - initialize -U - STREAMS based network stack - ndcfg - useful for displaying info about the system - geared toward network device driver writers
Network monitoring & tuning tools: - netstat - ifconfig - inconfig - ndstat - ndcfg - traceroute - ping - Tcpdump
dlpid logging: - dlpid -l <logfile> /etc/inst/nd/dlpidPIPE - or edit /etc/default/dlpid - LOG=<logfile>
NIC failover: - automatically and transparently switch to a backup NIC in the event of failure of the primary - Chains of backup NICs supported
Network is UP but can't connect to other systems: - is DNS configured correctly? - netstat -rna - do you have a default route?
Network performance is poor: - check cabling - ndstat -l - collisions - inconfig - nfsstat
Networking can ftp small files but not large ones: - check cabling and reset routers between ftp destinations. - netstat -as to check for large Windows Probes which might indicate a switch problem - check network speeds are consistent throughout - ndstat to look for NiC or NiC driver issues - NiC driver?
Network responds to pings but can't login: - are the daemons running ? - licensed ?
Multiple hosts with the same IP or MAC: - arp -n (-n disable name resolution) ? (132.147.103.1) at xx:xx:xx:xx:xx:xx (802.3) ? (132.147.103.9) at xx:xx:xx:xx:xx:xx (802.3)
Stopping and starting the interface: - ifconfig net0 down - /etc/tcp stop - daemons stopped, NIC is UP - /etc/tcp shutdown - everything down - /etc/nd stop start
See also
UnixWare 7 online documentation and manual pages.