openBSD 3.8 firewall using 3com 3C509B nic speed problem - BSD

This is a discussion on openBSD 3.8 firewall using 3com 3C509B nic speed problem - BSD ; Hi, I'm building a firewall using OpenBSD 3.8 and 2 ISA 3com 3C509B etherlink III cards. At first I was using 2 cheap NE2000 compatible cards, but the speed was suffering (half the normal speed). I saw everywhere that building ...

+ Reply to Thread
Results 1 to 19 of 19

Thread: openBSD 3.8 firewall using 3com 3C509B nic speed problem

  1. openBSD 3.8 firewall using 3com 3C509B nic speed problem

    Hi,
    I'm building a firewall using OpenBSD 3.8 and 2 ISA 3com 3C509B
    etherlink III cards. At first I was using 2 cheap NE2000 compatible
    cards, but the speed was suffering (half the normal speed). I saw
    everywhere that building a firewall with NE2000 ISA NICs is not
    recommended so I ordered 2 3C509B cards from ebay (These cards seems
    the most recommended ISA cards for a firewall + openbsd) and thought
    that it would fix my problem. But to my surprise it seems even worst
    (not much, but at least not better).

    One of the 3C509B is revision B (which is supposed to be very good)
    and one is revision A (I saw that its limited buffering can cause
    terrible speed performance drop on
    http://www.holland-consulting.net/te...CommProbs.html).

    Here's my system
    - Pentium 150Mhz
    - 32 Meg RAM
    - 3com 3C509B rev A
    - 3com 3C509B rev B

    My normal internet (Ultra High Speed ADSL) speed (downloads):
    4400-4600 Kbits/s

    Using the NE2000 cards I get
    2000-2200 Kbits/s

    Using the 3C509B cards I get
    1400-2000 Kbits/s

    I use pf on the firewall for filtering and it is setup with NAT. I
    was sure that a Pentium 150Mhz/32Megs was more than enough for this
    kind of firewall & a ADSL connection. I have another firewall running
    at 75Mhz with 48Megs RAM with IPCOP 3.0 (linux with 1 NE2000 & 1 3C509B
    NIC) and it's more than fast enough (no noticiable speed drop).

    I tried everything in openbsd's configuration to found out what was
    the problem, like setting the net.inet.tcp.recvspace &
    net.inet.tcp.sendspace to 65535 instead of 16284. Right now the 3C509B
    NICs are configured in PNP and full-duplex enabled (but not enabled in
    openbsd), I tried to disable full-duplex with the 3com configuration
    utility but it doesn't change anything. I was not able to disable PNP
    (I know it's better to disable it when using openbsd) because the cards
    were not detected by openbsd is PNP is off (tried several manual
    combinations, even the one detected by PNP).

    One thing I have noticed if I run top on the firewall while
    downloading a large file is the in the CPU utilisation, the interrupt
    section is between 50-78% while downloading the file. Is it normal?

    Anyone has any idea of what could cause this speed drop? What could I
    do to diagnostic the problem (useful openbsd tools). Can the problem be
    caused by the revision A card? or because PNP is enabled? or since the
    speed is almost the same same with NE2000 cards, by an openbsd
    misconfiguration or because there's not enough RAM?

    Any informations will be greatly welcome.


  2. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem

    By the way the motherboard is from an IBM Aptiva 2176 (Type A-1)
    motherboard model: SI58P ver. I0 rev 1.0A


  3. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem

    I just tried the setup with one NE2000 card and one 3C509B card and
    getting the same speed problems.

    If I run netstat -I ep1 I see I'm getting some Oerrs, I was getting
    Oerrs from ep2 when it was installed too. But the errors number rarely
    change even if I surf the web or download some files. Right not the
    Oerrs number is between 5. I don't see any collisions on the epX nics,
    even when I was using 2 3C509B nics.

    On the ne1 nic I don't see any Oerrs but I see some collisions, Colls
    is 11 right now. But If I'm right collisions are normal and it's the
    way ethernet works. But why I don't see any collisions on the epX nics?
    Both nics are connected to switched network routers (in fact one is
    connected to the WAN port of a router), so I shouldn't see any
    collisions, Am I wrong?

    I'm really beginning to suspect that the computer may be too slow to
    handle the ADSL connection, but It's hard to believe. I was pretty sure
    that a 150Mhz/32M was fast enough for this purpose.


  4. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem

    I was just thinking that the Aptiva 2176 motherboard has only one ISA
    slot with an expantion board connected in it to split it in 8 ISA
    slot.Could it slow down the speed of the ISA cards? From what I know it
    shouldn't, it's much like the way the bus is on a normal motherboard,
    Am I wrong?


  5. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem

    On 25 Apr 2006 00:00:52 -0700, none wrote:
    >I was just thinking that the Aptiva 2176 motherboard has only one ISA
    >slot with an expantion board connected in it to split it in 8 ISA
    >slot.Could it slow down the speed of the ISA cards? From what I know it
    >shouldn't, it's much like the way the bus is on a normal motherboard,
    >Am I wrong?


    Does the board have any PCI slots? I think the ISA-bus is causing the
    low speed you are experiencing, because the ISA-bus itself is quite
    slow.

    --
    Maurice

  6. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem


    Maurice Janssen wrote:
    > Does the board have any PCI slots? I think the ISA-bus is causing the
    > low speed you are experiencing, because the ISA-bus itself is quite
    > slow.


    No there's no PCI slots, but I have another firewall built with a
    Pentium 75Mhz 48M RAM running linux (I don't remember which kernel) & 2
    ISA NIC cards (NE2000 & 3C509B). And it works very well and there's no
    speed drop, So I'm sure the ISA bus can handle a simple ADSL connection
    without any problem.


  7. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem


    Maurice Janssen wrote:
    > Does the board have any PCI slots? I think the ISA-bus is causing the
    > low speed you are experiencing, because the ISA-bus itself is quite
    > slow.


    In fact it's a EISA bus to be more specific.


  8. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem

    Here's my dmesg output in case it can be useful:

    OpenBSD 3.8 (GENERIC) #138: Sat Sep 10 15:41:37 MDT 2005
    deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
    cpu0: Intel Pentium (P54C) ("GenuineIntel" 586-class) 150 MHz
    cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8
    cpu0: F00F bug workaround installed
    real mem = 32088064 (31336K)
    avail mem = 21274624 (20776K)
    using 417 buffers containing 1708032 bytes (1668K) of memory
    mainbus0 (root)
    bios0 at mainbus0: AT/286+(fb) BIOS, date 02/26/97, BIOS32 rev. 0 @
    0xfd981
    pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000
    pcibios0: PCI BIOS has 6 Interrupt Routing table entries
    pcibios0: PCI Interrupt Router at 000:01:0 ("SIS 85C503 System" rev
    0x00)
    pcibios0: PCI bus #0 is the last bus
    bios0: ROM list: 0xc0000/0x8000
    cpu0 at mainbus0
    pci0 at mainbus0 bus 0: configuration mode 1 (bios)
    pchb0 at pci0 dev 0 function 0 "SIS 5511" rev 0x00
    pcib0 at pci0 dev 1 function 0 "SIS 85C503 System" rev 0x01
    pciide0 at pci0 dev 1 function 1 "SIS 5513 EIDE" rev 0x08: 5597/5598:
    DMA, channel 0 configured to compatibility, channel 1 configured to
    compatibility
    wd0 at pciide0 channel 0 drive 0:
    wd0: 16-sector PIO, LBA, 1222MB, 2503872 sectors
    wd0(pciide0:0:0): using PIO mode 4, DMA mode 2
    pciide0: channel 1 disabled (no drives)
    vga1 at pci0 dev 20 function 0 "SIS 86C205" rev 0xd3: aperture at
    0x20000000, size 0x400000
    wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
    wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
    isa0 at pcib0
    isadma0 at isa0
    pckbc0 at isa0 port 0x60/5
    pckbd0 at pckbc0 (kbd slot)
    pckbc0: using irq 1 for kbd slot
    wskbd0 at pckbd0: console keyboard, using wsdisplay0
    pcppi0 at isa0 port 0x61
    midi0 at pcppi0:
    spkr0 at pcppi0
    sysbeep0 at pcppi0
    npx0 at isa0 port 0xf0/16: using exception 16
    isapnp0 at isa0 port 0x279: read port 0x203
    ep1 at isapnp0 "3Com 3C509B EtherLink III, TCM5095, PNP80F7, " port
    0x210/16 irq 3: address 00:01:02:32:eb:9d, utp (default utp)
    ep2 at isapnp0 "3Com 3C509B EtherLink III, TCM5095, PNP80F7, " port
    0x220/16 irq 5: address 00:10:5a:16:5e:c2, utp (default utp)
    biomask ffd5 netmask fffd ttymask ffff
    pctr: 586-class performance counters and user-level cycle counter
    enabled
    dkcsum: wd0 matches BIOS drive 0x80
    root on wd0a
    rootdev=0x0 rrootdev=0x300 rawdev=0x302


  9. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem

    Here's my dmesg output in case it can be useful:

    OpenBSD 3.8 (GENERIC) #138: Sat Sep 10 15:41:37 MDT 2005
    deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
    cpu0: Intel Pentium (P54C) ("GenuineIntel" 586-class) 150 MHz
    cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8
    cpu0: F00F bug workaround installed
    real mem = 32088064 (31336K)
    avail mem = 21274624 (20776K)
    using 417 buffers containing 1708032 bytes (1668K) of memory
    mainbus0 (root)
    bios0 at mainbus0: AT/286+(fb) BIOS, date 02/26/97, BIOS32 rev. 0 @
    0xfd981
    pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000
    pcibios0: PCI BIOS has 6 Interrupt Routing table entries
    pcibios0: PCI Interrupt Router at 000:01:0 ("SIS 85C503 System" rev
    0x00)
    pcibios0: PCI bus #0 is the last bus
    bios0: ROM list: 0xc0000/0x8000
    cpu0 at mainbus0
    pci0 at mainbus0 bus 0: configuration mode 1 (bios)
    pchb0 at pci0 dev 0 function 0 "SIS 5511" rev 0x00
    pcib0 at pci0 dev 1 function 0 "SIS 85C503 System" rev 0x01
    pciide0 at pci0 dev 1 function 1 "SIS 5513 EIDE" rev 0x08: 5597/5598:
    DMA, channel 0 configured to compatibility, channel 1 configured to
    compatibility
    wd0 at pciide0 channel 0 drive 0:
    wd0: 16-sector PIO, LBA, 1222MB, 2503872 sectors
    wd0(pciide0:0:0): using PIO mode 4, DMA mode 2
    pciide0: channel 1 disabled (no drives)
    vga1 at pci0 dev 20 function 0 "SIS 86C205" rev 0xd3: aperture at
    0x20000000, size 0x400000
    wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
    wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
    isa0 at pcib0
    isadma0 at isa0
    pckbc0 at isa0 port 0x60/5
    pckbd0 at pckbc0 (kbd slot)
    pckbc0: using irq 1 for kbd slot
    wskbd0 at pckbd0: console keyboard, using wsdisplay0
    pcppi0 at isa0 port 0x61
    midi0 at pcppi0:
    spkr0 at pcppi0
    sysbeep0 at pcppi0
    npx0 at isa0 port 0xf0/16: using exception 16
    isapnp0 at isa0 port 0x279: read port 0x203
    ep1 at isapnp0 "3Com 3C509B EtherLink III, TCM5095, PNP80F7, " port
    0x210/16 irq 3: address 00:01:02:32:eb:9d, utp (default utp)
    ep2 at isapnp0 "3Com 3C509B EtherLink III, TCM5095, PNP80F7, " port
    0x220/16 irq 5: address 00:10:5a:16:5e:c2, utp (default utp)
    biomask ffd5 netmask fffd ttymask ffff
    pctr: 586-class performance counters and user-level cycle counter
    enabled
    dkcsum: wd0 matches BIOS drive 0x80
    root on wd0a
    rootdev=0x0 rrootdev=0x300 rawdev=0x302


  10. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem

    none wrote:
    > Maurice Janssen wrote:
    >> Does the board have any PCI slots? I think the ISA-bus is causing the
    >> low speed you are experiencing, because the ISA-bus itself is quite
    >> slow.

    >
    > No there's no PCI slots, but I have another firewall built with a
    > Pentium 75Mhz 48M RAM running linux (I don't remember which kernel) & 2
    > ISA NIC cards (NE2000 & 3C509B). And it works very well and there's no
    > speed drop, So I'm sure the ISA bus can handle a simple ADSL connection
    > without any problem.
    >

    The problem is not so much the bus speeds, but the interrupt model for ISA.

  11. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem

    So why is it working without any problems with 2 ISA card and linux on
    a slower computer? What is the maximum speed we can get from a 10baseT
    ISA nic? Everywhere I saw that openbsd with 2 3C509B ISA nics was able
    to achieve more then 500 Kbytes/s without any problems, even on a
    486/66. Here I only can get 200-250 Kbytes/s


  12. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem

    On 2006-04-25, none wrote:
    > So why is it working without any problems with 2 ISA card and linux on
    > a slower computer? What is the maximum speed we can get from a 10baseT
    > ISA nic? Everywhere I saw that openbsd with 2 3C509B ISA nics was able
    > to achieve more then 500 Kbytes/s without any problems, even on a
    > 486/66. Here I only can get 200-250 Kbytes/s
    >


    ignoring OS issues for a minute ... frequently when I've had troubles
    getting network cards to perform up to speed it's been related to
    auto-negotiation. Forcing full-duplex 100MB on the switch and
    on the end box resolved the problem.

    --
    ratfood@food.skaterat.net
    All foods should be removed to reply

  13. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem

    none wrote:
    > So why is it working without any problems with 2 ISA card and linux on
    > a slower computer? What is the maximum speed we can get from a 10baseT
    > ISA nic? Everywhere I saw that openbsd with 2 3C509B ISA nics was able
    > to achieve more then 500 Kbytes/s without any problems, even on a
    > 486/66. Here I only can get 200-250 Kbytes/s
    >

    What are you replying to? Please quote context.

    Assuming you are replying to my comment that interrupts can be
    problematic, different operating systems will certainly have different
    interrupt handling routines. I've heard of bad cards that set an
    interrupt on the ISA bus 3 or 4 times for a given frame.

    I imagine that some operating systems might have work-arounds for that,
    or the code talks to the card in such a way that this is not obviously a
    problem.

    ISA is a pretty ill-defined protocol, and many manufacturers have taken
    liberties with it.

  14. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem


    John McGrail wrote:
    > ignoring OS issues for a minute ... frequently when I've had troubles
    > getting network cards to perform up to speed it's been related to
    > auto-negotiation. Forcing full-duplex 100MB on the switch and
    > on the end box resolved the problem.


    One nic is connected to a speedstream 6520 dsl/wireless router and the
    other end to the wan port of a linksys BEFSR41 router. How can I force
    the routers to use half-duplex? I don't see any options in their
    configuration for this. I can't use the 3C509B in full-duplex because
    openbsd ep driver doesn't support it on the 3C509B nic even if the card
    is able to use full-duplex.


  15. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem

    Comparing performance from the two machines you have is a waste of time
    in a way, because there are many large variables and you seem to really
    be focusing on very very specific details. Why not try Openbsd on the
    other machine and linux on the one with problems and see if your
    results stand. That would surely narrow the problem somewhat, or even
    try the two cheap cards in the other PC. I have 3mb DSL with:

    ext: ne3 at isapnp0 "UMC PLUG & PLAY Ethernet Chip , UMC9008,
    PNP80D6, " port 0x240/32 irq 5 ne3: NE2000 Ethernet

    int: 3Com 3c905C (pci)

    speed is very fast / no problems though Monowall seemed somewhat more
    responsive, but same throughput over kernel pppoe and generic 3.8


  16. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem

    void * clvrmnky() wrote:
    > Assuming you are replying to my comment that interrupts can be
    > problematic, different operating systems will certainly have different
    > interrupt handling routines. I've heard of bad cards that set an
    > interrupt on the ISA bus 3 or 4 times for a given frame.
    >
    > I imagine that some operating systems might have work-arounds for that,
    > or the code talks to the card in such a way that this is not obviously a
    > problem.
    >
    > ISA is a pretty ill-defined protocol, and many manufacturers have taken
    > liberties with it.


    If I manage to use the NICs with PNP disabled, could I use the same IRQ
    for both cards? I know it can be done on a PCI bus and can reduce the
    context switching and improve network speed. I also saw that the EISA
    but can share IRQs but I'm not sure if this is correct.


  17. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem

    Forget it, I just saw that the 3C509B nics are ISA not EISA. And ISA
    doesn't support IRQ sharing, right?.

    What I will try to do is rebuilding the kernel with everything not
    needed removed and the following options:
    option NMBCLUSTERS=8192
    option NKMEMCLUSTERS=8192
    option MAX_KMAP=120
    option MAX_KMAPENT=6000

    I hope it will make a difference. Anyone has some other options
    suggestions?

    Thanks


  18. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem

    ga_obsd wrote:
    > Comparing performance from the two machines you have is a waste of time
    > in a way, because there are many large variables and you seem to really
    > be focusing on very very specific details. Why not try Openbsd on the
    > other machine and linux on the one with problems and see if your
    > results stand. That would surely narrow the problem somewhat, or even
    > try the two cheap cards in the other PC. I have 3mb DSL with:
    >
    > ext: ne3 at isapnp0 "UMC PLUG & PLAY Ethernet Chip , UMC9008,
    > PNP80D6, " port 0x240/32 irq 5 ne3: NE2000 Ethernet
    >
    > int: 3Com 3c905C (pci)
    >
    > speed is very fast / no problems though Monowall seemed somewhat more
    > responsive, but same throughput over kernel pppoe and generic 3.8


    What about the ethernet device polling patch for openbsd?
    http://web.archive.org/web/200410190...u/polling.html
    Is it still available for openbsd 3.8? I can't find it anywhere. Could
    it fix my problem?


  19. Re: openBSD 3.8 firewall using 3com 3C509B nic speed problem

    none wrote:
    > Forget it, I just saw that the 3C509B nics are ISA not EISA. And ISA
    > doesn't support IRQ sharing, right?.
    >
    > What I will try to do is rebuilding the kernel with everything not
    > needed removed and the following options:
    > option NMBCLUSTERS=8192
    > option NKMEMCLUSTERS=8192
    > option MAX_KMAP=120
    > option MAX_KMAPENT=6000
    >
    > I hope it will make a difference. Anyone has some other options
    > suggestions?


    Typically, it won't help - and very few people will want to support a
    nonstandard kernel. If it does, great, but...

    Joachim

+ Reply to Thread