Issues forcing Speed / Duplex on ”ce” and ”bge” Ethernet cards

After doing a number of system upgrades over the weekend, I became quickly frustrated by the fact that the standard settings in the /etc/system file, normally used to lock the Ethernet interface to 100 / Full Duplex don’t seem to work if your server is using a "ce" or "bge" Ethernet card.

Normally, the settings in /etc/system would look something like this:

set ce:adv_100hdx_cap=0
set ce:adv_10fdx_cap=0
set ce:adv_10hdx_cap=0
set ce:adv_autoneg_cap=0
set ce:adv_100fdx_cap=1

Unfortunately, if you are using a "ce" or "bge" Ethernet adaptor, this tried and true method does not work, and the kernel gives the following errors at boot:

Feb 6 08:10:02 hostname genunix: [ID 492708 kern.notice] sorry, variable ‘adv_100fdx_cap’ is not defined in the ‘ce’
Feb 6 08:10:02 hostname genunix: [ID 492708 kern.notice] sorry, variable ‘adv_100hdx_cap’ is not defined in the ‘ce’
Feb 6 08:10:02 hostname genunix: [ID 492708 kern.notice] sorry, variable ‘adv_10fdx_cap’ is not defined in the ‘ce’
Feb 6 08:10:02 hostname genunix: [ID 492708 kern.notice] sorry, variable ‘adv_10hdx_cap’ is not defined in the ‘ce’
Feb 6 08:10:02 hostname genunix: [ID 492708 kern.notice] sorry, variable ‘adv_autoneg_cap’ is not defined in the ‘ce’

After doing a little poking around, I learned that the method for forcing Ethernet interfaces on the newer (ce & bge) cards has changed, and it is now necessary to create a driver configuration file in /platform/sun4u/kernel/drv.
First, so that you don’t have to reboot again, force the interface using the ndd commands. Remember to change all instances of "ce" to "bge" if that is your card type.

ndd -set /dev/ce instance 0
ndd -set /dev/ce adv_100T4_cap 0
ndd -set /dev/ce adv_100fdx_cap 1
ndd -set /dev/ce adv_100hdx_cap 0
ndd -set /dev/ce adv_10fdx_cap 0
ndd -set /dev/ce adv_10hdx_cap 0
ndd -set /dev/ce adv_1000fdx_cap 0
ndd -set /dev/ce adv_1000hdx_cap 0
ndd -set /dev/ce adv_autoneg_cap 0

Now, create a /platform/sun4u/kernel/drv/ce.conf (or bge.conf) file with the following line, and reboot the system whenever you get around to it.

adv_autoneg_cap=0 adv_1000fdx_cap=0 adv_1000hdx_cap=0 adv_100fdx_cap=1 adv_100hdx_cap=0 adv_10fdx_cap=0 adv_10hdx_cap=0;

Make sure this is all one long string of text. There should be no tabs, and their needs to be a semicolon at then end. There should also be no more than this one line of text in the file. Occasionally, carriage returns get added by various text editors in different ways, so make sure to use a predictable editor like vi.

9 thoughts on “Issues forcing Speed / Duplex on ”ce” and ”bge” Ethernet cards

  1. Unfortunately you do net tell the whole story. If you “fix” the ce to full-100 make sure that your switch is matching these settings. Otherwise the switch (cisco or whatever) might start an auto negotiate, get no answer from the sun box (it is not auto negotiate) get no answer, and it will assume the worst (like 100-half or somehting), leaving your network setup with abismal performance.
    Best leave switch SUN at auto negotiate so they can sort out what’s optimal.

  2. Leaving it to the Switch and the NIC sounds like a good idea but I have found, in practice, that speed and duplex negotiations on Unix systems in general doesn’t always work. This could lead to one being set to half-duplex and the other set to full-duplex which causes degraded performance due to dropped packets and retransmits after timeout. I agree that you can’t forget to mention that the SWITCH PORT also needs to be forced to the fixed speed/duplex or you will surely have problems. Either NEITHER the switch or system should autonegotiate or BOTH have to be set to autonegotiate.

  3. Sun reads the (ambiguous) RFP in a way different from many vendors (Cisco, in particular). If both switch and server NIC are set to auto-negotiate, the Sun NIC will *automatically* drop to half-duplex and the highest speed setting available. Therefore it is always preferrable to have your server enclave switches hard set to the speed and duplex you require for each server; then follow the above directions to guarantee maximal throughput.

  4. Grate Post helped with my ce0 force to FDX on V440 Sol10 zones . I should just mention that setting should be done from and on global zone

Leave a Reply