Specify speed and duplex of network card



  • The network adapter on my pfSense netbook keeps entering a faulted state, "bge0 phy read timed out".  The issue goes away for hours at a time when the system is rebooted.  I've tried out two switches.  It appears that others getting this issue have found that setting the speed/duplex of the NIC to 100Mbps full duplex fixed the issue.  When I look at the speed/duplex settings it has this warning:

    Here you can explicitly set speed and duplex mode for this interface. WARNING: You MUST leave this set to autoselect (automatically negotiate speed) unless the port this interface connects to has its speed and duplex forced.

    My switches are all unmanaged, so I can't specify a port speed on the switch.

    Is there a way to force network adapter to connect at a specific speed?

    I could reverse my cabling and have that NIC connect to my modem instead, but I'd rather not have to reconfigure everything and I'm nervous having the USB NIC handle the much higher inbound traffic.



  • Just go on interface setup and set speed.


  • Netgate Administrator

    Does it normally default to 1000tx?
    If it doesn't like being forced you could try using a 4 wire connection which will only support up to 100tx.

    Steve



  • It does default to 1000T.  I went ahead and specified 100TX Full Duplex in pfSense, and the connection on the switch says it is 100Mbps.  I guess it worked.

    Is that warning to scare people away or something?


  • Netgate Administrator

    Some cards object to being told what speed to run at and some switches try to negotiate the speed, fail and then disconnect.

    Steve



  • @atamido:

    It does default to 1000T.  I went ahead and specified 100TX Full Duplex in pfSense, and the connection on the switch says it is 100Mbps.  I guess it worked.

    Is that warning to scare people away or something?

    It's there because way too many people don't understand how autonegotiation works and screw it up, as you just did. We kept it out of the GUI for years for that reason. You cannot force full duplex when connected to an unmanaged switch, it will leave you with a duplex mismatch which will cause serious performance problems. You have a 100 Mb connection now, but the firewall is at 100 full and the switch is at 100 half. You have to let it autonegotiate, force it to half duplex, or get a managed switch.



  • @stephenw10:

    Does it normally default to 1000tx?
    If it doesn't like being forced you could try using a 4 wire connection which will only support up to 100tx.

    Don't do that. My experience shows that if you're connecting two simple 1000tx devices with a 4 wire cable, the won't be able to connect at all. This is because the inner two pairs are used for negotiation (the 4 wires - pins 1,2,3,6), the devices agree that both can talk 1000tx, and when they switch to that, the missing other 4 wires will cause an error state. The only way to connect them was to specifically set one of the interface to connect at 100tx.

    I tested this with a Cisco/Linksys SD2016 and a Windows 7-based PC.



  • @cmb:

    You cannot force full duplex when connected to an unmanaged switch, it will leave you with a duplex mismatch which will cause serious performance problems. …  You have to let it autonegotiate, force it to half duplex, or get a managed switch.

    ??????

    The SD2016 is a very simple unmanaged gigabit switch. I have both my server and a client connected to it at 1000tx full duplex:

    $ sudo ethtool eth0
    Settings for eth0:
            Supported ports: [ TP MII ]
            Supported link modes:   10baseT/Half 10baseT/Full
                                    100baseT/Half 100baseT/Full
                                    1000baseT/Half 1000baseT/Full
            Supports auto-negotiation: Yes
            Advertised link modes:  10baseT/Half 10baseT/Full
                                    100baseT/Half 100baseT/Full
                                    1000baseT/Half 1000baseT/Full
            Advertised auto-negotiation: Yes
            Speed: 1000Mb/s
            Duplex: Full
            Port: MII
            PHYAD: 0
            Transceiver: internal
            Auto-negotiation: on
            Supports Wake-on: pumbg
            Wake-on: d
            Current message level: 0x00000033 (51)
            Link detected: yes
    
    

  • Netgate Administrator

    @robi:

    Don't do that. My experience shows that if you're connecting two simple 1000tx devices with a 4 wire cable, the won't be able to connect at all.

    Interesting. I did this recently with two Apple devices using two spare pairs in a phone line. Worked fine at auto negotiated 100TX.
    I'm not sure both were Gigabit though but one certainly was. Could explain it. Thanks for the heads up.

    Steve

    Edit:
    Looks like some (most?) gigabit devices can detect this and fall back to 100Tx
    @http://en.wikipedia.org/wiki/Gigabit_Ethernet:

    Since negotiation takes place on only two pairs, if two gigabit devices are connected through a cable with only two pairs, the devices will successfully choose 'gigabit' as the highest common denominator (HCD), but the link will never come up. Most gigabit physical devices have a specific register to diagnose this behaviour. Some drivers offer an "Ethernet@Wirespeed" option where this situation leads to a slower yet functional connection.

    So I guess I was lucky. Anyone got any idea if this is implemented in FreeBSD? In which drivers?



  • Using CAT5 rather than CAT5e should work reliably to stay at 100 Mb only, though that may not be the case depending on your equipment.


Log in to reply