The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
New NIC was causing network problems 12 February 2000
Need more help on this topic? Click here
This article has no comments
Show me similar articles
I recently obtained a new box (buff, named after a cat owned by someone in an IRC channel I frequent).  I installed a brand new NIC in it but found that the box would drop off the net.  In fact, so would my gateway.  This article discusses that problem and how I solved it.
Going all the way
When I bought this new NIC, I figured it was time to upgrade and try a 10/100 card.  Such cards are capable of running at either 10Mb/s or 100Mb/s.   They run at either one speed or the other.  I just put the card in and it ran as dc0.
The symptoms
After starting a cvsup on this box, I noticed that the cvsup stopped for no reason.  The screen was halted, but the cvsup was not yet completed.  I tried to ping the box.  It didn't work.  From the console, I pinged my local cvsup server.  The cvsup recommenced.  Hmmm, that's interesting.  So I started a ping -i10 my.cvsup.server in an attempt to keep things ticking along.  The next morning I found I couldn't access any external websites.  My IRC connection wasn't very healthy.  And my mail server was backed up with outgoing mail.

I found I couldn't ping anything external.  A check with my ISP revealed no known problems.

After a couple of days of asking on IRC and of thinking about it, icmpecho (a regular on Undernet's #freebsd IRC channel) mentioned that it might be a media problem.  NICs which can do more than one speed typically have an autosense mode.  He suggested I explicitly set my NIC's speed using ifconfig.  That sounded like a good idea to me.

The solution
I started looking at man ifconfig and found the section on media:
media type
    If the driver supports the media selection system, set the media
    type of the interface to type. Some interfaces support the mutu-
    ally exclusive use of one of several different physical media
    connectors.  For example, a 10Mb/s Ethernet interface might sup-
    port the use of either AUI or twisted pair connectors.  Setting
    the media type to ``10base5/AUI'' would change the currently ac-
    tive connector to the AUI port.  Setting it to ``10baseT/UTP''
    would activate twisted pair.  Refer to the interfaces' driver
    specific documentation or man page for a complete list of the
    available types.

I didn't know where to look for more information, but when I did an ifconfig on the card itself, I found the answer:

$ ifconfig dc0
dc0: flags=8843<up,broadcast,running,simplex,multicast> mtu 1500
        inet 10.0.0.9 netmask 0xffffff00 broadcast 10.0.0.255
        ether 00:80:ad:7f:4e:7b 
        media: autoselect status: active
        supported media: autoselect 100baseTX <full-duplex>100baseTX 10baseT/UTP
                                        10baseT/UTP 100baseTX <hw-loopback> none

There's the answer.  Look at those media values.

Here is what I put in my /etc/rc.conf (all on one line"

ifconfig_dc0="inet 10.0.0.9 netmask 255.255.255.0 media 10baseT/UTP"

Things look good so far.  It's only been 34 minutes of uptime, but we'll see how it goes.  I just started a make buildworld.  I may have to amend this article tomorrow night.

p.s.: This "solution" didn't actually work.  After enough of these attempts, I returned the NIC and will try some plain old 10M cards.

15 Feb 2000
Two nights ago, I found the problem had not been solved.  I tried some old NICs, mostly SMC cards and was unable to get them to work.  These ed0 cards where normally easy to use.  But Azoos mentioned that I should try 0x300 as he had never been able to get them to work with 0x280.  So I tried that.  Low and behold, they worked.  Here's the line from my kernel config:
device          ed0     at isa? port 0x300 irq 10 iomem 0xcc000

With this setting, and a newly compiled kernel, I was able to use the NIC.

But then the old problems started turning up again.  The folks on undernet #freebsd suggested I try another patch cable and a different port on the hub.  I disconnected the NIC from the hub, put that cable aside for further reference, and replaced the connection with a different cable to a new port on the hub.  I then rebooted my gateway and tried again.  All seemed well.

I have yet to determine whether it's the cable or the port on the hub which is causing the problems.  My guess and hope it is the cable which is faulty.  But one night, I'll figure out which one it is.


Need more help on this topic? Click here
This article has no comments
Show me similar articles