Howdy Guys, I have a strange problem, I'm on FreeBSD 8.1 and ifconfig re0 shows half-duplex (see output) and the download speed is damn slow, maximum 20 kbps. I'm not sure how to debug this so it would be nice if someone can help me to fix it. When i change it manually via command line, the media line appeared to have 2 entries -- full-duplex and half-duplex re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC> ether 6c:62:6d:90:6e:63 inet XXXXXX netmask 0xffffffc0 broadcast XXXXXX media: Ethernet 100baseTX <full-duplex> (100baseTX <half-duplex>) status: active main# uname -a FreeBSD XXXX 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #0: Fri Jan 14 04:15:56 UTC 2011 root@freebsd:/usr/obj/usr/src/sys/GENERIC amd64 main# # dmesg re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xe800-0xe8ff mem 0xfbeff000-0xfbefffff,0xf6ff0000-0xf6ffffff irq 16 at device 0.0 on pci6 re0: Using 1 MSI messages re0: Chip rev. 0x3c000000 re0: MAC rev. 0x00400000 miibus0: <MII bus> on re0 re0: Ethernet address: 6c:62:6d:90:6e:63 re0: [FILTER] re0: link state changed to UP main# # pciconf -lv re0@pci0:6:0:0: class=0x020000 card=0x75221462 chip=0x816810ec rev=0x02 hdr=0x00 vendor = 'Realtek Semiconductor' device = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)' class = network subclass = ethernet # dmideco http://nopaste.unixfreunde.de/46256
Hi It seems im using the same chip. [lbl@atom0 ~]$ uname -a FreeBSD atom0.xserv.dk 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 [lbl@atom0 ~]$ ifconfig re0 re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC> ether 00:1c:c0:7f:6f:64 inet6 fe80::21c:c0ff:fe7f:6f64%re0 prefixlen 64 scopeid 0x1 nd6 options=3<PERFORMNUD,ACCEPT_RTADV> media: Ethernet autoselect (1000baseT <full-duplex>) status: active [lbl@atom0 ~]$ pciconf -lv | grep -A 4 ^re0 re0@pci0:1:0:0: class=0x020000 card=0x01008680 chip=0x816810ec rev=0x02 hdr=0x00 vendor = 'Realtek Semiconductor' device = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)' class = network subclass = ethernet [lbl@atom0 ~]$ I have for a long time experienced collisions, but I haven't had the time to look at it yet, the interface holds 3 vlans so. http://xserv.dk/munin/xserv.dk/atom0.xserv.dk/if_errcoll_re0.html The funny thing is that i got 3 of the same types of main boards running and its only happening on 2 of them so i think its a hardware/network problem. /lbl On 17 January 2011 06:08, Martin Wilke <miwi@freebsd.org> wrote:> Howdy Guys, > > I have a strange problem, I'm on FreeBSD 8.1 and ifconfig re0 shows > half-duplex (see output) and the download speed > is damn slow, maximum 20 kbps. I'm not sure how to debug this so it would be > nice if someone can > help me to fix it. > > When i change it manually via command line, the media line appeared to have > 2 entries -- full-duplex and half-duplex > > re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 > options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC> > ether 6c:62:6d:90:6e:63 > inet XXXXXX netmask 0xffffffc0 broadcast XXXXXX > media: Ethernet 100baseTX <full-duplex> (100baseTX <half-duplex>) > status: active > > > main# uname -a > FreeBSD XXXX 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #0: Fri Jan 14 04:15:56 > UTC 2011 root@freebsd:/usr/obj/usr/src/sys/GENERIC amd64 > main# > > # dmesg > re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port > 0xe800-0xe8ff mem 0xfbeff000-0xfbefffff,0xf6ff0000-0xf6ffffff irq 16 at > device 0.0 on pci6 > re0: Using 1 MSI messages > re0: Chip rev. 0x3c000000 > re0: MAC rev. 0x00400000 > miibus0: <MII bus> on re0 > re0: Ethernet address: 6c:62:6d:90:6e:63 > re0: [FILTER] > re0: link state changed to UP > main# > > # pciconf -lv > re0@pci0:6:0:0: class=0x020000 card=0x75221462 chip=0x816810ec rev=0x02 > hdr=0x00 > vendor = 'Realtek Semiconductor' > device = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)' > class = network > subclass = ethernet > > > # dmideco > http://nopaste.unixfreunde.de/46256 > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >
On Mon, Jan 17, 2011 at 05:08:33AM +0000, Martin Wilke wrote:> Howdy Guys, > > I have a strange problem, I'm on FreeBSD 8.1 and ifconfig re0 shows > half-duplex (see output) and the download speed > is damn slow, maximum 20 kbps. I'm not sure how to debug this so it would be > nice if someone can > help me to fix it. > > When i change it manually via command line, the media line appeared to have > 2 entries -- full-duplex and half-duplex > > re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 > options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC> > ether 6c:62:6d:90:6e:63 > inet XXXXXX netmask 0xffffffc0 broadcast XXXXXX > media: Ethernet 100baseTX <full-duplex> (100baseTX <half-duplex>) > status: activeThe above indicates that you've run "ifconfig re0 media 100baseTX mediaopt full-duplex" or have set similar media/mediaopt parameter sin rc.conf, but 802.3u or 802.3ab auto-negotiation between your switch and your NIC/PHY has resulted half-duplex. Is the switch you're connected to a managed switch? If so, have you forced the port speed/duplex on the switch to 100/full? If not, then the above can happen (this is normal/per specification), and the result will be abysmal performance. Please do so and the problem should go away. If not, the exact brand and model of switch will need to be disclosed, as well as whether or not the physical port is gigE capable. See Wikipedia's article on this matter: http://en.wikipedia.org/wiki/Autonegotiation#Interoperability_problems If the switch is a non-managed switch (e.g. a generic "home user desktop" switch, such as a product from D-Link, Netgear, Linksys, etc.), then do not specify the speed/duplex via ifconfig. You should always use autoselect (the default) in this scenario. When using autoselect, you should see something like "media: Ethernet autoselect ({speed} <{duplex}>)", where {speed} and {duplex} are what have been negotiated via 802.3u/802.3ab. If using autoselect results in "100baseTX <half-duplex>" then something is indeed incompatible between the NIC/PHY and the switch. It could be a driver bug, but it could also very well be a bug in the switch. In these scenarios I tend to buy a different brand of switch. HTH! -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB |