Providing practical examples since 1998

Things look quiet here. But I've been doing a lot of blogging at
dan.langille.org because I prefer WordPress now.
Not all my posts there are FreeBSD related.
I am in the midst of migrating The FreeBSD Diary over to WordPress
(and you can read about that here).
Once the migration is completed, I'll move the FreeBSD posts into the
new FreeBSD Diary website.

This section deals with setting up a Network Interface Card (NIC) and making it work
with FreeBSD. With a working NIC, your computer can communicate with other computers
on a network.

Matching hardware and software

In order for the software to use the hardware, it must know something about it.
For a NIC, this means that the IRQ and IO address must match what FreeBSD will be looking
for. If they don't match, either FreeBSD should be modified or the NIC should be
modified.

Modifying the NIC

To change the IRQ or IO address on NIC will involve either some jumpers and/or
switches or a floppy disk. The easy way is a floppy disk. Just insert that
disk and reboot your machine. Normally this requires a DOS bootable disk, but you
should be able to find one. These programs are usually easy to run.

Modifying FreeBSD

If you know what the settings of your NIC, it is fairly simple to change the FreeBSD
settings. At the reboot prompt, enter -c. After the boot finishes,
use the visual option to view and change the settings of your system.

Configure the interface

In this page, we'll refer to ed0 which is an NE2000 compatible device.
FreeBSD normally expects this card to be configured with IRQ 10 and base address of
0x280. What I prefer to do is set the card to match this. I will now assume
that you have configured hardware to match the software (or vice versa, whatever).

The
first step is to inet the card. Do this by issuing:

ifconfig ed0 inet <ip> <mask>

where <ip> is the IP address you wish to assign to this NIC and <mask>
is the mask you wish to use.

PING will continue to run until you interrupt it, as I did using CTRL-C.

This address should work on all machine and it represents the local host. If this
doesn't work, I have no suggestions.

The next test will ensure that the system can find the correct IP.

ping <ip>

where <ip> is the IP address you specified during the ifconfig
above. If you've forgotten the IP, issue ifconfig -a and use the address
you find there. You should see something similar to the previous results, but with
different numbers.

The last test is to ping something else on your network. Ping an IP address,
which you know exists, and ping that one. If that doesn't work, but the others do,
seek help. Sorry, but I can't help you more than that.

Error messages

This section contains the error messages which I encountered when setting my ed0 and
the solutions I found that worked.

no route to host

If you receive the message "ping: sendto: no route to host", then my first
guess is that ipfw is running and it is specifying that you aren't allowed to
send to that host. If you issue ipfw list and you get a list of the ipfw
rules, I will assume you are attempting to run a firewall. If this is the case, then
for our testing, try an open firewall:

sh /etc/rc.firewall open

then try the test again.

device timed out

If you receive a "device timed out" message, check your cabling.
That's what caused most of my problems. If that does fix it, I would suggest your
hardware and software is not matched. See above for how to resolve that issue.