| dec2000.tar |
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.
This problem/solution was submitted by Andrew T. Young. Andy can be reached at aty@sciences.sdsu.edu: 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.
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 freebsd.org 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 wi2. Make sure that you set the following lines in /etc/rc.conf:
pccard_enable="YES" pccard_conf="/etc/pccard.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.
pccard_mem="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:
pccard_ifconfig="DHCP"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
boot kernel/unix -asYou can verify that the machine is in 32-bit mode by doing a:
/usr/bin/isainfo -kv
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.
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 www.my.domain.com.
client -> BROADCAST BPARAM C \ WHOAMI? 192.168.1.2What's the problem with this one host?
/etc/ethers, /etc/hosts, /etc/bootparamsWhen 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.
/usr/sbin/ping <gateway IP>returns:
<gateway IP> is alivebut when I do:
ping -s <gateway IP>I get 100% packet loss?
/usr/sbin/eeprom local-mac-address\?=true
About the AuthorAmy Rich is the president of Oceanwave Consulting, Inc. (www.oceanwave.com), a Massachusetts based consulting company. She can be reached at: arr@oceanwave.com.
Jim McKinstry is a Senior Sales Engineer for MTI Technology Corporation (www.mti.com<). MTI is a leading international provider of data storage management products and services. He can be reached at: jrmckins@yahoo.com.
|