Skip to contentSkip to conversation

Speed Issues through NAT Firewall

DISCUSSION Travis Crook 5 participants 12 messages Jul 9, 2002

lore
Share & tools
lore
#0 lore raw

Hello,
I currently have two firewalls running. Both on Mandrake 8.1 running iptables. I currently have two internet connections (one is a DSL line at 1Mb, the other is straight from an ISP at 2.5 Mb). I can get 700Kb speeds through the firewall on the DSL line (which is about as fast as it ever is) but I only get about 500Kb speeds through the firewall on the ISP line. Shouldn't I be able to get at least 2Mb speeds through this firewall?

Thanks

Travis Crook
Visions Beyond

#1 lore raw
Quoted 2 lines · Travis Crook

Hello,
I currently have two firewalls running. Both on Mandrake 8.1 running iptables. I currently have two internet connections (one is a DSL line at 1Mb, the other is straight from an ISP at 2.5 Mb). I can get 700Kb speeds through the firewall on the DSL line (which is about as fast as it ever is) but I only get about 500Kb speeds through the firewall on the ISP line. Shouldn't I be able to get at least 2Mb speeds through this firewall?

How do you measure the throughput?

Ramin
PS. Line breaks are good things.

Quoted 5 lines

Thanks

Travis Crook
Visions Beyond

#4 lore raw
In reply to Travis Crook
Quoted 1 line

I currently have two firewalls running. Both on Mandrake 8.1 running iptables. I currently have two internet connections (one is a DSL line at 1Mb, the other is straight from an ISP at 2.5 Mb). I can get 700Kb speeds through the firewall on the DSL line (which is about as fast as it ever is) but I only get about 500Kb speeds through the firewall on the ISP line. Shouldn't I be able to get at least 2Mb speeds through this firewall?

At least you can be almost assured that your problems have nothing to do with iptables and it's NAT. Starting up my crystal ball, I predict you'll find some half/full duplex mismatch on one of your Ethernets. Oh, and what type and speed are your CPUs?

best regards
Patrick

#11 lore raw
In reply to Travis Crook
Quoted 8 lines · Travis Crook

Hello,

I currently have two firewalls running. Both on Mandrake 8.1 running
iptables. I currently have two internet connections (one is a DSL line at 1Mb, the other is straight from an ISP at 2.5 Mb). I can get 700Kb speeds through the firewall on the DSL line (which is about as fast as it ever is) but I only get about 500Kb speeds through the firewall on the ISP line. Shouldn't I be able to get at least 2Mb speeds through this firewall?

What's your hardware (CPU, RAM, NIC) ?

How many connections do you have concurrently through the boxes ?

Quick way to get a rough idea:

wc -l /proc/net/ip_conntrack

Antony.

#5 lore raw
In reply to Patrick Schaaf

The firewall on the DSL is an Athlon XP 1500+. The firewall on the ISP line is a PII 333. I will check on the full/half duplex issue.

Travis Crook
Visions Beyond

----- Original Message -----
From: "Patrick Schaaf" <[email protected]>
To: "Travis Crook" <[email protected]>
Cc: <[email protected]>
Sent: Tuesday, July 09, 2002 11:49 AM
Subject: Re: Speed Issues through NAT Firewall

Quoted 1 line
Quoted 1 line

I currently have two firewalls running. Both on Mandrake 8.1

running iptables. I currently have two internet connections (one is a DSL line at 1Mb, the other is straight from an ISP at 2.5 Mb). I can get 700Kb speeds through the firewall on the DSL line (which is about as fast as it ever is) but I only get about 500Kb speeds through the firewall on the ISP line. Shouldn't I be able to get at least 2Mb speeds through this firewall?

Quoted 9 lines

At least you can be almost assured that your problems have nothing to do with iptables and it's NAT. Starting up my crystal ball, I predict you'll find some half/full duplex mismatch on one of your Ethernets. Oh, and what type and speed are your CPUs?

best regards
Patrick

#2 lore raw
In reply to Ramin Alidousti
Quoted 2 lines

Hello,
I currently have two firewalls running. Both on Mandrake 8.1 running

iptables. I currently have two internet connections (one is a DSL line at 1Mb, the other is straight from an ISP at 2.5 Mb). I can get 700Kb speeds through the firewall on the DSL line (which is about as fast as it ever is) but I only get about 500Kb speeds through the firewall on the ISP line. Shouldn't I be able to get at least 2Mb speeds through this firewall?

Quoted 2 lines

How do you measure the throughput?

I used http://promos.mcafee.com/speedometer and http://www.dslreports.com.
I can get 3Mb testing on the firewall itself but not on a machine behind the firewall.

Quoted 2 lines

Ramin
PS. Line breaks are good things.

I'll use more linebreaks. Thanks!

#6 lore raw
In reply to Travis Crook
Quoted 2 lines · Travis Crook

The firewall on the DSL is an Athlon XP 1500+. The firewall on the ISP line is a PII 333. I will check on the full/half duplex issue.

That's a hell of a difference, and could conceivably account for the
bandwidth. I'd say it depends on how much RAM you have in the PII/333 and
how many connections you're trying to support.

Antony.

#7 lore raw
Quoted 8 lines · Antony Stone
Quoted 2 lines · Travis Crook

The firewall on the DSL is an Athlon XP 1500+. The firewall on the ISP line is a PII 333. I will check on the full/half duplex issue.

That's a hell of a difference, and could conceivably account for the
bandwidth. I'd say it depends on how much RAM you have in the PII/333 and
how many connections you're trying to support.

No way a pII 333 is to slow to handle 2Mbit/s, my old 486 can handle that easily. You would have to trash the conntrack hashtable with multiple attacks to even have a chance of getting it that slow.

I also believe there's a duplex-mismatch somewhere, probably between the firewall and the internal network.

Signature · 4 lines
/Martin

Never argue with an idiot. They drag you down to their level, then beat
you with experience.
#3 lore raw
In reply to Travis Crook
Quoted 8 lines · Travis Crook
Quoted 2 lines

Hello,
I currently have two firewalls running. Both on Mandrake 8.1 running

iptables. I currently have two internet connections (one is a DSL line at 1Mb, the other is straight from an ISP at 2.5 Mb). I can get 700Kb speeds through the firewall on the DSL line (which is about as fast as it ever is) but I only get about 500Kb speeds through the firewall on the ISP line. Shouldn't I be able to get at least 2Mb speeds through this firewall?

Quoted 1 line
Quoted 5 lines
Quoted 1 line

How do you measure the throughput?

I used http://promos.mcafee.com/speedometer and http://www.dslreports.com.
I can get 3Mb testing on the firewall itself but not on a machine behind the firewall.

Haven't been able to check the second site but the first one sends you a file and measures the actual download time. Now, imagine what happens when there is congestion along the path. Your throughput would show a very low number while the actual problem does not have anything to do with you and/or your upstream router.

The reason for your "ISP line" showing 500kb and the "DSL line" showing 700Kb is IMO irrelevant to the netfilter overhead/througput. However, the delta between the same test done (a) on the firewall (b) from behind the firewall might be an indication of how fast (or slow, for that matter) the firewall machine is forwarding the packets.

Like Patrick has pointed out, first of all you need to make sure that your devices and the wiring is healthy, though.

Ramin

Quoted 5 lines
Quoted 3 lines

Ramin
PS. Line breaks are good things.

I'll use more linebreaks. Thanks!

#8 lore raw
In reply to Martin Josefsson
Quoted 7 lines · Martin Josefsson
Quoted 6 lines
Quoted 2 lines

The firewall on the DSL is an Athlon XP 1500+. The firewall on the ISP line is a PII 333. I will check on the full/half duplex issue.

That's a hell of a difference, and could conceivably account for the
bandwidth. I'd say it depends on how much RAM you have in the PII/333 and
how many connections you're trying to support.

Quoted 6 lines

No way a pII 333 is to slow to handle 2Mbit/s, my old 486 can handle that easily. You would have to trash the conntrack hashtable with multiple attacks to even have a chance of getting it that slow.

I also believe there's a duplex-mismatch somewhere, probably between the firewall and the internal network.

In that case a simple ping flood across the suspicious link can help...

Ramin

Quoted 6 lines
Signature · 5 lines
-- 
/Martin

Never argue with an idiot. They drag you down to their level, then beat
you with experience.
#9 lore raw
In reply to Martin Josefsson
Quoted 6 lines · Martin Josefsson
Quoted 5 lines · Antony Stone
Quoted 2 lines · Travis Crook

The firewall on the DSL is an Athlon XP 1500+. The firewall on the ISP line is a PII 333. I will check on the full/half duplex issue.

Quoted 7 lines
Quoted 3 lines

That's a hell of a difference, and could conceivably account for the
bandwidth. I'd say it depends on how much RAM you have in the PII/333
and how many connections you're trying to support.

No way a pII 333 is to slow to handle 2Mbit/s, my old 486 can handle that easily. You would have to trash the conntrack hashtable with multiple attacks to even have a chance of getting it that slow.

I only said it could *conceivably* account for the bandwidth limit - I didn't
say it was likely. I agree with you that a 486 can easily exceed this
performance, but it depends what Travis is doing with the system - last summer I saw netfilter boxes reduced to tens of kbits/sec bandwidth by Nimda and Code Red saturating the conntracking tables with half-open links.

I agree with several people here that Travis should check the hardware first, and I would also recommend testing the bandwidth by doing several downloads simultaneously from sites with high-bandwidth links, as close (in hops) to his machine as possible.

Antony.

#10 lore raw
Quoted 1 line

I agree with several people here that Travis should check the hardware

first,

Quoted 1 line

and I would also recommend testing the bandwidth by doing several

downloads

Quoted 4 lines

simultaneously from sites with high-bandwidth links, as close (in hops) to his machine as possible.

Antony.

I checked the hardware. Everything is running 100baseTx-FD (100 mb full duplex). I used several different workstations and found the problem. If I test with a Windows 98 box I get 500Kb. If I test with a Windows 2000 box I get 1Mb, if I test with a Linux box I get 3.5Mb. Windows must have some kind of internet throttling.

Yet another reason to use Linux.

Thanks Everyone for your help!

Travis Crook
Visions Beyond