I recently switched to my RTL-8139 NIC instead of default onboard Intel NIC, after I came to know that e100
uses binary blobs. I’ve a Netgear WGT624 WiFi router (acting as switch, atm). I plug-in my desktop at a 100 Mbps switch port in the switch. So now when I connected my RTL8139 NIC to my wireless enabled wired-switch, it comes online at 10 Mbps (full-duplex)
abbe@chateau ~ $ sudo ethtool rl0 Settings for rl0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: No Speed: 10Mb/s Duplex: Full Port: MII PHYAD: 32 Transceiver: internal Auto-negotiation: off Supports Wake-on: pumbg Wake-on: p Current message level: 0x00000007 (7) Link detected: yes
Now, I tried manually switching it 100 Mbps (full-duplex):
abbe@chateau ~ $ sudo ethtool -s rl0 speed 10 abbe@chateau ~ $ sudo ethtool rl0 Settings for rl0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: No Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 32 Transceiver: internal Auto-negotiation: off Supports Wake-on: pumbg Wake-on: p Current message level: 0x00000007 (7) Link detected: yes
Now, to automate this, I added following line into /etc/modprobe.d/options
and executed update-modules
.
abbe@chateau ~ $ cat /etc/modprobe.d/options options 8139too media=0x231 abbe@chateau ~ $ sudo modprobe -r 8139too abbe@chateau ~ $ sudo update-modules * Updating /etc/modprobe.conf by hand ... [ ok ] * Updating modules.dep ... [ ok ] abbe@chateau ~ $ sudo modprobe 8139too abbe@chateau /etc/modprobe.d $ sudo /usr/sbin/ethtool rl0 Settings for rl0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: No Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 32 Transceiver: internal Auto-negotiation: off Supports Wake-on: pumbg Wake-on: p Current message level: 0x00000007 (7) Link detected: yes
How to arrive at the number 0x231, check out modinfo 8139too
and drivers/net/8139too.c source code. BtW, I just noticed that rl0 has auto-negotiation off, so I decided to turn it on, and following are the results:
abbe@chateau ~ $ sudo ethtool -s rl0 autoneg on abbe@chateau ~ $ sudo ethtool rl0 Settings for rl0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 10Mb/s Duplex: Half Port: MII PHYAD: 32 Transceiver: internal Auto-negotiation: on Supports Wake-on: pumbg Wake-on: p Current message level: 0x00000007 (7) Link detected: no abbe@chateau ~ $ sudo ethtool -s rl0 speed 100 duplex full abbe@chateau ~ $ sudo ethtool rl0 Settings for rl0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 32 Transceiver: internal Auto-negotiation: on Supports Wake-on: pumbg Wake-on: p Current message level: 0x00000007 (7) Link detected: yes
After this I tried testing network speed using iperf, and got speeds of ~ 67 Mbps
. With e100
, I used to get ~ 97 Mbps
. Anyways this is an 3-4 year old NIC, plugged (and unused) into my desktop unused since 2-3 years. So will try testing speeds with a new NIC soon.