Cover V09, I12


Questions and Answers

Jim McKinstry and Amy Rich

I'd like to introduce my new co-author, Amy Rich. Amy is the president of Oceanwave Consulting, Inc. and will be contributing her expertise to help answer questions in this column! I'd also like to ask you, the readers, to help us out. We'd like to hear of problems you've come across and how you've solved them. We'll include a by-line in the column for the ones we use. We think that this will be a good way to help share information.
Thanks, Jim

This problem/solution was submitted by Andrew T. Young. Andy can be reached at

I recently got a new Linux box at work, and wanted to be able to use it both in the office and at home. The problem is printing -- when I connect to the Net from home, it's via PPP, and I get a dynamically assigned IP address. The problem here is that to print over the network, the /etc/printcap file on the sending machine needs to have the domain name or IP address of the remote machine. These are different every time I hook up from home. How can I tell the box on my desk at work what the one at home is?

If this were a simple matter of telnetting in directly, I could just use “last” to find out what my machine at home is called. But life is not so simple. I've been asked not to run inetd on the box at work (for security reasons); I have to first log into another server at work, then use ssh (which isn't on my machine at home) to connect from there to the new Linux box on my desk. Thus, running “last” on the new machine merely shows the name of the intermediate machine, not my home machine.

I finally figured out that fingering myself on the intermediate machine from the new one shows the name of the old box at home. Then I can extract this from the finger output with awk (or maybe you'd prefer cut), and then use sed to edit the proper machine name (for home) into a dummy printcap file on the new box at work. Then a symbolic link from /etc/printcap to this edited file steers my printed output to the printer at home.

The fixed-up printcap file also contains the name and address of the printer down the hall from my office; by having a little if-block in my .bash_profile, I can automatically set the PRINTER environment variable to the nearest printer, wherever I'm coming in from. Then I can print to a printer near me regardless of where I am.

This sure is a kludgy hack, but it works. If you have a more elegant solution, let me know.

 Q Our company is investing in wireless LAN technology and has recently purchased a bunch of Lucent WaveLAN gold cards for the employees. They're only supporting laptops running a Microsoft OS, but I have FreeBSD on my PIII. How do I set up the wireless card so that it works correctly?

 A FreeBSD added Lucent WaveLAN card driver support in 3.3. If you have an older version of the OS, you must upgrade. When the card is working correctly, the LED will be a solid green. If the LED flashes intermittently, that means that it can't find a network to attach to. To set up the WaveLAN card, you must do the following:

1. Make sure that your kernel has the wi device driver compiled in. If you don't already have it, retrieve the kernel code from and look in the file /sys/i386/conf/<YOUR KERNEL NAME>. If you've never customized your kernel, you should look at GENERIC. Somewhere in the file should be the following line:

   device       wi
2. Make sure that you set the following lines in /etc/rc.conf:

If you find you are having address conflicts with your card, you may need to explicitly set it in /etc/rc.conf. Using dmesg, find out where the pccard bus is located. Usually it's something like pcic0. Check the iomem address for the slot, and add the following line to /etc/rc.conf. Let's assume your iomem address is 0xd8000.

If your site is using DHCP to assign your IP address, you'll also want the following line or you'll need to manually set the IP, DNS server information, etc:

3. Check /etc/pccard.conf to make sure that the io, irq, and memory addresses do not conflict with other peripherals. The memory address listed in /etc/pccard.conf must be different than the kernel iomem address listed with dmesg. A good memory address to try is 0xd4000, if your kernel iomem address is set to 0xd8000.

4. Put the WaveLAN card in the proper PCMCIA slot and reboot your laptop. You should see the card recognized by FreeBSD at this point and pccard should be running. Since we have not added the proper lines to /etc/pccard.conf, though, it will not yet come up.

5. Now that the hardware configuration for the card is done, you want to use /usr/sbin/wicontrol to manipulate the settings for the card. Options you might need to set:

• For each wicontrol line, you will need to specify the interface with the -i switch. Let's say that your card is wi0 for further examples. If you do just the wicontrol command with the -i <device> switch, it prints out the current configuration of the card (i.e., wicontrol -i wi0).

• You may need to set the network name with the -n switch. This depends on whether or not you need to have a valid network name to connect.

• You need to set the port type to either ad hoc or BSS mode with the -p switch. In ad hoc mode, the laptop will communicate directly with other other laptops. In BSS mode, the laptop will communicate with a base station instead of directly with other laptops. If you're doing a corporate-wide solution, you will probably want BSS mode.

• You may need to enable WEP encryption with the -e switch if your site is doing encryption. If you do use encryption, you'll also need the -k switch to set the encryption key. It must match the encryption key on the station you're communicating with. For more information on the various switches, see the manpage for wicontrol.

6. Once you have the card working, edit /etc/pccard.conf and add in the wicontrol commands so that pccard automatically does them when you insert and remove the card. For this example, let's say that my card is at wi0, my network name is Work, I'm using encryption, and my key is “thisistheekey.” My /etc/pccard.conf entry would look like the following:

   # Lucent WaveLAN/IEEE
   card "Lucent Technologies" "WaveLAN/IEEE"
        config  0x1 "wi0" ?
        insert  logger -t pccard:$device -s WaveLAN/IEEE inserted
        insert  wicontrol -i $device -p 1
        insert  wicontrol -i $device -n 'Work'
        insert  wicontrol -i $device -e 1
        insert  wicontrol -i $device -k 'thisistheekey'
        insert  /etc/pccard_ether $device
        remove  logger -t pccard:$device -s WaveLAN/IEEE removed
        remove  /sbin/ifconfig $device delete
 Q I have an Sun E3500 running 64-bit Solaris 2.7. How do I boot the machine so that it runs in 32-bit mode?

 A To boot the 32-bit kernel explicitly, the kernel file name should be specified. Halt the machine and, at the “ok” prompt, type the following to boot the machine into 32-bit single-user mode:

boot  kernel/unix -as
You can verify that the machine is in 32-bit mode by doing a:

/usr/bin/isainfo -kv
 Q I'm a UNIX user at heart, but I've recently been forced into using a Win98SE because of one application it supports. How do I make Windows more like UNIX?

 A There are two approaches you can take to this. One way to make your environment more UNIX-like is to run an emulator like VMware ( on top of your favorite supported UNIX. The other way is to add things to the Windows environment to make it more UNIX-like. A good start is to download and install cynwin32 ( This ports a number of your favorite GNU utilities to windows. You may also want to change your caps lock key into another control key with c2cap ( \
), if you're used to a UNIX-style keyboard. You may also want to install TweakUI to further customize your environment. It comes on your Windows 98 CDROM or, if you have Windows 95, you can pick up a version at windows95/ \

 Q What's the difference between differential SCSI and normal SCSI? Are there benefits to spending the extra money for differential components? Can I use the same cables and terminators for both?

 A Differential refers to the manner in which SCSI signals are placed on the cable. Single-ended (normal) SCSI drives one signal line against ground while differential SCSI drives two signal lines. The signal is the voltage difference between the two lines. There are actually two kinds of differential SCSI -- low voltage (LVD), and high voltage (HVD). HVD was rendered obsolete in the SPI-3 document of SCSI-3. Differential SCSI has greater noise immunity than single-ended SCSI allowing substantially longer SCSI cabling of up to 82 feet for HVD, and 39.4 feet for LVD, versus 19.7 feet or less for single-ended. Since they operate at different voltages, differential and single-ended SCSI are not compatible on the same bus segment, but generally both appear the same to the software so there are no modifications needed at the driver level.

HVD has no requirement for other than passive terminators. LVD terminators are usually active, and multimode LVD terminators must be active. Differential terminators and single-ended terminators can not be interchanged.

 Q I have a Solaris 2.7 system and I'm trying to run xntpd at boot time, but I'm seeing ntpdate run and xntpd never starts unless I kill ntpdate. The entries in /etc/inet/ntp.conf are correct, and syslog messages claim that ntpdate is retrying in X seconds (where X gets progressively larger). When I run ntpdate with -dd, it looks like it's doing something, however. Why is ntpdate running instead of xntpd, and why isn't my time syncing right?

 A /etc/init.d/xntpd (run as /etc/rc2.d/S74xntpd at boot time) first runs ntpdate to initally sync up the time. If the clock if off by more than .5 seconds, ntpdate incrementally steps the time by calling gettimeofday. So, if your time is far off what you're syncing to, it's going to take ntpdate a while to catch up and finally exit so that xntpd can run. You may want to run rdate to sync the time initially (or just date and set it to something close), and then you won't have to wait forever for ntpdate to set the correct time and exit.

 Q Our production environment contains a number of Linux and FreeBSD boxes. I've now been put in charge of a large Solaris box running Solaris 8 to which we want to add a number of IP aliases. I know how to do this on both Linux and FreeBSD, but I'm not sure how to add them with Solaris 8.

 A IP aliases (also known as “virtual hosts” under Solaris) can be added by doing the following:

1. Make sure /etc/nsswitch.conf has files dns listed for hosts.

2. Add the new entries, IP address and host name into /etc/hosts.

3. Create the file /etc/hostname.<interface>:<logical number>. This file should contain the hostname of the iP alias. For example, /etc/hostname.hme0:1 might contain

 Q I'm trying to jumpstart a Solaris 8 box hooked up to a switch instead of a hub. It's worked with other machines hooked up to the switch, but not this one. I can see that the client tftps ok, but then it just sits there broadcasting:

client -> BROADCAST    BPARAM C \
What's the problem with this one host?

 A My guess is that you have the host listed with the fully qualified domain in one or all of the following files:

/etc/ethers, /etc/hosts, /etc/bootparams
When hooked up to a switch, you can not specify the FQDN. If you change these files to list the hostname only, it should work, assuming that there are no other software or hardware issues.

 Q I have a Sparc Netra running Solaris 2.7. All interfaces and routes are correctly configured. Why is it that:

/usr/sbin/ping <gateway IP>

<gateway IP> is alive
but when I do:

ping -s <gateway IP>
I get 100% packet loss?

 Q I have few Sparc boxes running Solaris 2.6 and they are on the same LAN. There is a long period of delay when I telnet to some of them from other networks, but there is no problem when telnet within the network. Each of those servers has 3 NICs and are configured to be multi-homed hosts. When I try to run netstat -r on the problem servers, it takes forever to load the routing table, but it will come up. There is no delay when I run netstat -nr. I compared everything between the problem boxes but they appear fine, and I couldn't see any difference. I can't do ping -s routeripaddress packagesize xxx. 100% package loss happens from problem boxes.

 A Both of these issues sound like reverse DNS problems. Solaris ping with no options assumes the -n switch, displaying the target as an IP instead of a name. When you specify -s without the -n switch, ping tries to reverse-resolve the IP address. For the second person with this problem, another hint would be to try netstat -nr instead. The -n flag tells netstat not to do name lookups and use IP addresses only, similar to the -n switch to ping.

 Q I have two NICs on a Sparc 20 running Solaris 2.6, and they appear to have the same MAC address. How do I fix it so that they're seen as two separate MAC addresses?

 A The option to use the real MAC address of the NIC or to use the MAC address of the primary NIC for all NICs is controlled in the boot prom. By default Solaris will use only the MAC address of the primary NIC and mask all the others in software. From multi-user mode, you can do the following (making sure to escape the ? so it's not seen as a shell meta-character):

/usr/sbin/eeprom local-mac-address\?=true

About the Author

Amy Rich is the president of Oceanwave Consulting, Inc. (, a Massachusetts based consulting company. She can be reached at:

Jim McKinstry is a Senior Sales Engineer for MTI Technology Corporation (<). MTI is a leading international provider of data storage management products and services. He can be reached at: