# RealTek RTL8139 Full Duplex

## carpman

Hello, just been trying 2gb ftp between 2 box on local lan and it only reaches speed of 31.62 KB/s which is not very good, the problem seems to be with box caxton as speed is fine to other boxs.

I did netperf and got:

```

 # netperf -c -C -H caxton

TCP STREAM TEST to caxton

Recv   Send    Send                          Utilization       Service Demand

Socket Socket  Message  Elapsed              Send     Recv     Send    Recv

Size   Size    Size     Time     Throughput  local    remote   local   remote

bytes  bytes   bytes    secs.    10^6bits/s  % T      % T      us/KB   us/KB

 87380  16384  16384    10.22         0.53   0.00     0.00     0.000   0.000

prospero michael # netperf -H caxton

TCP STREAM TEST to caxton

Recv   Send    Send

Socket Socket  Message  Elapsed

Size   Size    Size     Time     Throughput

bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    10.25       0.61

```

Both box have 10/100 cards which have been set to FD and 100mb using 

```

mii-tool -F 100baseTx-FD eth0

```

```
caxton ~ # mii-tool

eth0: 100 Mbit, full duplex, link ok
```

But with dmesg | grep eth0 you can see below the realtek seems to be only half duplex:

```

caxton ~ # dmesg | grep eth0

eth0: RealTek RTL8139 at 0xa400, 00:10:a7:08:5e:54, IRQ 11

eth0:  Identified 8139 chip type 'RTL-8139B'

eth0: link up, 100Mbps, half-duplex, lpa 0x40A1

prospero michael # dmesg | grep eth0

eth0: SiS 900 PCI Fast Ethernet at 0x1800, IRQ 4, 00:30:13:6d:3f:20.

eth0: Media Link On 100mbps full-duplex

```

Any ideas how i can get the realtek to actually be set to FD?

Here is netperf output for connection to another box on lan:

```

prospero storage # netperf -c -C -H hamlet

TCP STREAM TEST to hamlet

Recv   Send    Send                          Utilization       Service Demand

Socket Socket  Message  Elapsed              Send     Recv     Send    Recv

Size   Size    Size     Time     Throughput  local    remote   local   remote

bytes  bytes   bytes    secs.    10^6bits/s  % T      % T      us/KB   us/KB

 87380  16384  16384    10.01        63.37   8.59     1.80     11.102  2.323

```

cheers

----------

## DDV01

Is this  a sudden problem? Otherwise what module are you using?

It might be worth a try to reboot the switch or try a different cable.

----------

## carpman

 *DDV01 wrote:*   

> Is this  a sudden problem? Otherwise what module are you using?
> 
> It might be worth a try to reboot the switch or try a different cable.

 

Thanks for reply, don't think it is switch as connection with other boxs connected through switch are ok, may be cable, to be honest only just noticed it as box is new build.

Would it not be the duplex issue?

----------

## Cintra

hei

my 8139 gives the following:

```
root@p4pe ~ # dmesg | grep eth0

[   49.639849] eth0: RealTek RTL8139 at 0xf1216000, 00:30:4f:3c:e6:07, IRQ 11

[   49.639854] eth0:  Identified 8139 chip type 'RTL-8100B/8139D'

[   56.699071] eth0: link up, 100Mbps, full-duplex, lpa 0x41E1

root@p4pe ~ # dmesg | grep 8139

[   49.625473] 8139too Fast Ethernet driver 0.9.27

[   49.639849] eth0: RealTek RTL8139 at 0xf1216000, 00:30:4f:3c:e6:07, IRQ 11

[   49.639854] eth0:  Identified 8139 chip type 'RTL-8100B/8139D'

```

you do have only the 8139too module?

mvh

----------

## carpman

Thanks for replies, have modeule compiled into kernel,

```

 # dmesg | grep 8139

8139too Fast Ethernet driver 0.9.27

eth0: RealTek RTL8139 at 0xa400, 00:10:a7:08:5e:54, IRQ 11

eth0:  Identified 8139 chip type 'RTL-8139B'

```

----------

## Cintra

I wonder if ethtool might do better than MII.. 

ref. https://forums.gentoo.org/viewtopic-t-393465-highlight-.html

mvh

----------

## carpman

Hello tried ethtool but stl only getting half duplex?

```

 # ethtool -s eth0 speed 100 duplex full autoneg off

caxton ~ # dmesg | grep eth0

eth0: RealTek RTL8139 at 0xa400, 00:10:a7:08:5e:54, IRQ 11

eth0:  Identified 8139 chip type 'RTL8139B'

eth0: link up, 100Mbps, half-duplex, lpa 0x40A1

```

----------

## Cintra

sounds as though the card might just be too old a rev., or duff

btw, I did nothing special to set up the RTL8139..

you might want to compare

```
 # modinfo 8139too

author:         Jeff Garzik <jgarzik@pobox.com>

description:    RealTek RTL-8139 Fast Ethernet driver

license:        GPL

version:        0.9.27

parmtype:       multicast_filter_limit:int

parmtype:       media:array of int

parmtype:       full_duplex:array of int

parmtype:       debug:int

parm:           debug:8139too bitmapped message enable number

parm:           multicast_filter_limit:8139too maximum number of filtered multicast addresses

parm:           media:8139too: Bits 4+9: force full duplex, bit 5: 100Mbps

parm:           full_duplex:8139too: Force full duplex for board(s) (1)

vermagic:       2.6.14-rc5 PENTIUM4 gcc-3.4

depends:        mii

alias:          pci:v000010ECd00008139sv*sd*bc*sc*i*

alias:          pci:v000010ECd00008138sv*sd*bc*sc*i*

alias:          pci:v00001113d00001211sv*sd*bc*sc*i*

alias:          pci:v00001500d00001360sv*sd*bc*sc*i*

alias:          pci:v00004033d00001360sv*sd*bc*sc*i*

alias:          pci:v00001186d00001300sv*sd*bc*sc*i*

alias:          pci:v00001186d00001340sv*sd*bc*sc*i*

alias:          pci:v000013D1d0000AB06sv*sd*bc*sc*i*

alias:          pci:v00001259d0000A117sv*sd*bc*sc*i*

alias:          pci:v00001259d0000A11Esv*sd*bc*sc*i*

alias:          pci:v000014EAd0000AB06sv*sd*bc*sc*i*

alias:          pci:v000014EAd0000AB07sv*sd*bc*sc*i*

alias:          pci:v000011DBd00001234sv*sd*bc*sc*i*

alias:          pci:v00001432d00009130sv*sd*bc*sc*i*

alias:          pci:v000002ACd00001012sv*sd*bc*sc*i*

alias:          pci:v0000018Ad00000106sv*sd*bc*sc*i*

alias:          pci:v0000126Cd00001211sv*sd*bc*sc*i*

alias:          pci:v00001743d00008139sv*sd*bc*sc*i*

alias:          pci:v0000021Bd00008139sv*sd*bc*sc*i*

alias:          pci:v*d00008139sv000010ECsd00008139bc*sc*i*

alias:          pci:v*d00008139sv00001186sd00001300bc*sc*i*

alias:          pci:v*d00008139sv000013D1sd0000AB06bc*sc*i*

srcversion:     CFC7C44C605F9761BDA48C7

```

mvh

----------

## carpman

Hello, ok i change NIC for a version C but still half duplex?

```

dmesg | grep 8139

8139too Fast Ethernet driver 0.9.27

eth0: RealTek RTL8139 at 0xa400, 00:c0:df:0d:86:87, IRQ 11

eth0:  Identified 8139 chip type 'RTL-8139C'

caxton / # dmesg | grep eth0

eth0: RealTek RTL8139 at 0xa400, 00:c0:df:0d:86:87, IRQ 11

eth0:  Identified 8139 chip type 'RTL-8139C'

eth0: link up, 100Mbps, half-duplex, lpa 0x40A1

```

I have 8139too compiled into kernel, will try rebuilding kernel with it as module and see if that helps.

----------

## carpman

thanks for reply,

```

caxton michael # ethtool -s eth0 speed 100 duplex full

dmesg | grep eth0

eth0: RealTek RTL8139 at 0xa400, 00:c0:df:0d:86:87, IRQ 11

eth0:  Identified 8139 chip type 'RTL-8139C'

eth0: link up, 100Mbps, half-duplex, lpa 0x40A1

```

```

caxton michael # modinfo 8139too

author:         Jeff Garzik <jgarzik@pobox.com>

description:    RealTek RTL-8139 Fast Ethernet driver

license:        GPL

version:        0.9.27

parmtype:       multicast_filter_limit:int

parmtype:       media:array of int

parmtype:       full_duplex:array of int

parmtype:       debug:int

parm:           debug:8139too bitmapped message enable number

parm:           multicast_filter_limit:8139too maximum number of filtered multicast addresses

parm:           media:8139too: Bits 4+9: force full duplex, bit 5: 100Mbps

parm:           full_duplex:8139too: Force full duplex for board(s) (1)

vermagic:       2.6.13-gentoo-r3 SMP PENTIUMIII gcc-3.4

depends:

alias:          pci:v000010ECd00008139sv*sd*bc*sc*i*

alias:          pci:v000010ECd00008138sv*sd*bc*sc*i*

alias:          pci:v00001113d00001211sv*sd*bc*sc*i*

alias:          pci:v00001500d00001360sv*sd*bc*sc*i*

alias:          pci:v00004033d00001360sv*sd*bc*sc*i*

alias:          pci:v00001186d00001300sv*sd*bc*sc*i*

alias:          pci:v00001186d00001340sv*sd*bc*sc*i*

alias:          pci:v000013D1d0000AB06sv*sd*bc*sc*i*

alias:          pci:v00001259d0000A117sv*sd*bc*sc*i*

alias:          pci:v00001259d0000A11Esv*sd*bc*sc*i*

alias:          pci:v000014EAd0000AB06sv*sd*bc*sc*i*

alias:          pci:v000014EAd0000AB07sv*sd*bc*sc*i*

alias:          pci:v000011DBd00001234sv*sd*bc*sc*i*

alias:          pci:v00001432d00009130sv*sd*bc*sc*i*

alias:          pci:v000002ACd00001012sv*sd*bc*sc*i*

alias:          pci:v0000018Ad00000106sv*sd*bc*sc*i*

alias:          pci:v0000126Cd00001211sv*sd*bc*sc*i*

alias:          pci:v00001743d00008139sv*sd*bc*sc*i*

alias:          pci:v0000021Bd00008139sv*sd*bc*sc*i*

alias:          pci:v000010ECd00008129sv*sd*bc*sc*i*

alias:          pci:v*d00008139sv000010ECsd00008139bc*sc*i*

alias:          pci:v*d00008139sv00001186sd00001300bc*sc*i*

alias:          pci:v*d00008139sv000013D1sd0000AB06bc*sc*i*

srcversion:     CFC7C44C605F9761BDA48C7

```

----------

## linuxtuxhellsinki

Are U sure about the cable is good ?

----------

## carpman

 *linuxtuxhellsinki wrote:*   

> Are U sure about the cable is good ?

 

yep tried changing cable  :Sad: 

----------

## carpman

Ok this seems to be a one way issue.

From workstation (hamlet) to server (caxton)

```

hamlet michael # scp /home/michael/temp/Gentoo-RR4-2.60.iso sysadmin@caxton:temp

Password:

Gentoo-RR4-2.60.iso                                                                  1%  256KB   6.8KB/s - stalled -

```

From server (caxton) to workstation (hamlet)

```

sysadmin@caxton ~ $ scp temp/Gentoo-RR4-2.60.iso michael@192.168.1.5:temp

Password:

Gentoo-RR4-2.60.iso                                                                100%   24MB   4.0MB/s   00:06

```

I can replicate this from other boxs on LAN.

It appears connection out of Caxton is ok but connection in is very slow?

----------

