# FXP troubles ?



## rghq (Aug 20, 2009)

Hello, first thought it might be a PF issue, but it isn't because even when unloading all rules the problems remains.
The transfer ratio of the network is really slow - other components look fine so far - since it's a server smart reports no errors and everything else is reported as ok as well.
Disabling all services except SSH and let tcpdump run also reported nothing unusual, the used bandwidth overviewed from the outside also doesn't show an installed bot being abused for DoS or as open relay.
Well, it's 7.1p7 - Generic and a self compile 7.1p6 but with both kernels the results don't differ.

Dmesg output:


```
...
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (2392.04-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf27  Stepping = 7
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x400<CNXT-ID>
real memory  = 1073479680 (1023 MB)
avail memory = 1041121280 (992 MB)
ACPI APIC Table: <D845WD WD84510A>
ioapic0 <Version 2.0> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <D845WD WD84510A> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, 3ff00000 (3) failed
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci2: <ACPI PCI bus> on pcib2
fxp0: <Intel 82550 Pro/100 Ethernet> port 0xdf00-0xdf3f mem 0xfeafe000-0xfeafefff,0xfeaa0000-0xfeabffff irq 18 at device 12.0 on pci2
miibus0: <MII bus> on fxp0
inphy0: <i82555 10/100 media interface> PHY 1 on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp0: Ethernet address: 00:07:e9:50:2a:d3
fxp0: [ITHREAD]
fxp1: <Intel 82550 Pro/100 Ethernet> port 0xde80-0xdebf mem 0xfeafd000-0xfeafdfff,0xfea80000-0xfea9ffff irq 19 at device 13.0 on pci2
miibus1: <MII bus> on fxp1
inphy1: <i82555 10/100 media interface> PHY 1 on miibus1
inphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp1: Ethernet address: 00:07:e9:50:2a:d5
fxp1: [ITHREAD]
vgapci0: <VGA-compatible display> port 0xd800-0xd8ff mem 0xfd000000-0xfdffffff,0xfeaff000-0xfeafffff irq 20 at device 15.0 on pci2
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH2 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 31.1 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
pci0: <serial bus, USB> at device 31.2 (no driver attached)
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
pci0: <serial bus, USB> at device 31.4 (no driver attached)
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
cpu0: <ACPI CPU> on acpi0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xc8fff,0xc9000-0xc9fff pnpid ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 2392042208 Hz quality 800
Timecounters tick every 1.000 msec
ad0: 57241MB <WDC WD600JB-00ETA0 77.07W77> at ata0-master UDMA100
```

Checking the load everything is fine as well, memory usage too so I've not much ideas what could be wrong. 

Any help is really welcome


----------



## SirDice (Aug 20, 2009)

Check with ifconfig and see if the interfaces are in full-duplex.


----------



## rghq (Aug 20, 2009)

Did already:


```
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=b<RXCSUM,TXCSUM,VLAN_MTU>
        ether 00:07:e9:50:2a:d3
...
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
fxp1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=b<RXCSUM,TXCSUM,VLAN_MTU>
        ether 00:07:e9:50:2a:d5
        media: Ethernet autoselect (none)
        status: no carrier
pflog0: flags=141<UP,RUNNING,PROMISC> metric 0 mtu 33204
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        inet 127.0.0.1 netmask 0xff000000
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        inet 127.0.10.1 netmask 0xffffff00
lo2: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        inet 127.0.20.1 netmask 0xffffff00
lo3: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        inet 127.0.30.1 netmask 0xffffff00
lo4: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        inet 127.0.40.1 netmask 0xffffff00
```

Dunno if it's a hardware problem, the connection itself doesn't drop, at least there's nothing in the logs about it and of course I didn't played with several sysctl vars - if it maybe matters:

/etc/sysctl.conf.local


```
kern.coredump=0
kern.randompid=348
security.bsd.see_other_uids=0
```

A typical BAMP system - each service resides in it's own Jail though even SFTP transfers that are not jailed run very slow.

Really weird at all


----------



## Maurovale (Aug 20, 2009)

Hum sometime ago there was a bios problem with some intel nic cards (FXP), I will try to find what revision whas and post back.

Intel released a bios update that corrected that beaviour.


----------



## rghq (Aug 20, 2009)

Already asked the hoster to take a look - not much I can do remote except running some tools, checking logs 

Thanks for the help everyone


----------



## Maurovale (Aug 21, 2009)

Hi, can you confirm that your nick card is the 82573 NIC ??

If yes then you need to apply a patch to correct that beaviour:

http://www.bohica.net/main/freebsd-and-unix-mainmenu-28/18-intel-82573-nic-patch

Hope it helps.


----------



## rghq (Aug 21, 2009)

Ah - sorry - should have added this in the first post:


```
~# pciconf -lv

hostb0@pci0:0:0:0:      class=0x060000 card=0x00000000 chip=0x1a308086 rev=0x11 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82845G[GL/GV/GE/PE] Host-Hub Interface Bridge'
    class      = bridge
    subclass   = HOST-PCI
pcib1@pci0:0:1:0:       class=0x060400 card=0x00000000 chip=0x1a318086 rev=0x11 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82845/E/MP/MZ Brookdale CPU to AGP Bridge'
    class      = bridge
    subclass   = PCI-PCI
pcib2@pci0:0:30:0:      class=0x060400 card=0x00000000 chip=0x244e8086 rev=0x05 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801 Family (ICH2/3/4/4/5/5/6/7/8/9,63xxESB) Hub Interface to PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
isab0@pci0:0:31:0:      class=0x060100 card=0x00000000 chip=0x24408086 rev=0x05 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801BA (ICH2) LPC Interface Controller'
    class      = bridge
    subclass   = PCI-ISA
atapci0@pci0:0:31:1:    class=0x010180 card=0x57448086 chip=0x244b8086 rev=0x05 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801BA (ICH2) UltraATA/100 IDE Controller'
    class      = mass storage
    subclass   = ATA
none0@pci0:0:31:2:      class=0x0c0300 card=0x57448086 chip=0x24428086 rev=0x05 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801BA/BAM (ICH2/ICH2-M) USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
none1@pci0:0:31:3:      class=0x0c0500 card=0x57448086 chip=0x24438086 rev=0x05 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801BA/BAM (ICH2/ICH2-M) SMBus Controller'
    class      = serial bus
    subclass   = SMBus
none2@pci0:0:31:4:      class=0x0c0300 card=0x57448086 chip=0x24448086 rev=0x05 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801BA/BAM (ICH2/ICH2-M) USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
fxp0@pci0:2:12:0:       class=0x020000 card=0x301a8086 chip=0x12298086 rev=0x0d hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82550/1/7/8/9 EtherExpress PRO/100(B) Ethernet Adapter'
    class      = network
    subclass   = ethernet
fxp1@pci0:2:13:0:       class=0x020000 card=0x301a8086 chip=0x12298086 rev=0x0d hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82550/1/7/8/9 EtherExpress PRO/100(B) Ethernet Adapter'
    class      = network
    subclass   = ethernet
vgapci0@pci0:2:15:0:    class=0x030000 card=0x57448086 chip=0x47521002 rev=0x27 hdr=0x00
    vendor     = 'ATI Technologies Inc'
    device     = 'Rage XL PCI'
    class      = display
    subclass   = VGA
```

About the patch - there're no such messages in syslog - like said, the interface doesn't drop and reconnects, it's always up though the bandwidth is slow - downloading a testfile usually runs with up to 3 MB/s from another server, I just get around 50 KB/s while netstat / tcpdump report nothing unusual.
Did already a complete sha / md5 comparision with a local installed system and the checksum don't differ so it shouldn't be a hidden rootkit abusing bandwidth for DoS / Spam or other attacks.

Thanks again for the help


----------

