Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Jul 2001 17:57:52 -0400 (EDT)
From:      Kenneth Wayne Culver <culverk@wam.umd.edu>
To:        freebsd-hackers@freebsd.org
Subject:   NAT (ipf/ipnat) latency problems
Message-ID:  <Pine.GSO.4.21.0107081738150.23241-100000@rac3.wam.umd.edu>

next in thread | raw e-mail | index | archive | help
Recently over the weekend my friends and I had a lanparty, and we wanted
to use FreeBSD as his gateway machine (to replace Win2k) to his cable
modem. When I got there, he and 3 other people had been playing a game
online (over the internet through the Win2k NAT, the game was
counterstrike for those who care) and they were seeing really good pings
and no packet loss (pings of 15-39ms). I set up the FreeBSD server (which
I had already preconfigured for the task) using ipf and ipnat with very
simple rules (ipf passes all traffic in and out, and 
map 192.168.0.0/28 -> 0/32 portmap 20000:40000
as the ipnat rule. The portmap is so that multiple people from our lan
can connect to the same counterstrike server). I pinged the counterstrike
server online from our NAT machine and the NAT machine got 15-30ms pings,
but when I went online in counterstrike and went to that server, the ping
was about 200 ms, and if more than 2 people connected to any counterstrike
server at a time, the ping went up to 1500-2000 ms. I read about some
settings to the kernel's timecounters that might fix the problem, so I
rebuilt a kernel with the HZ=1000 option and rebooted the router. We still
had the same problem, so I tried using natd and ipfw. This was even
slower. My question is: why could 4 people total connect through a win2k
NAT server (using 2 3com 90x 10/100 cards, and a 933MHz PIII) through the
same server, and maintain a 15 - 30 ms ping and no packet loss, when with
FreeBSD using an 800 MHz athlon with 2 DEC 21140A ethernet cards, or with
2 intel (fxp) cards (we tried both) we maxed out at 2 people connected to
that same server we got a lot of packet loss and really high (200-2000ms
depending on how many people are connected )???

Thanks a lot ...

Kenneth Culver



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.21.0107081738150.23241-100000>