connecting to the network

connecting to the network

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

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).

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.

Testing the interface

The first test is:


You should see something like:

PING ( 56 data bytes
64 bytes from icmpseq=0 ttl=255 time=0.819s
64 bytes from icmpseq=1 ttl=255 time=0.586s
64 bytes from icmpseq=2 ttl=255 time=0.554s
64 bytes from icmpseq=2 ttl=255 time=0.549s
--- ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/std-dev = 0.549/0.627/0.819/0.112ms

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.

2 thoughts on “connecting to the network”

  1. I’m having a problem.
    I have a NIC set up and I can ping my subnet 192.168.15.x but I can’t get out the gw. I get 100% packet loss. Any ideas?
    Sorry I can’t give more detail, I’m new and might not be asking the right questions.

Leave a Comment

Scroll to Top