high cpu usage on natd / dhcpd

Matthew Luckie mjl at luckie.org.nz
Thu Jan 31 15:04:28 UTC 2013


On 01/31/13 00:45, Eggert, Lars wrote:
> Hi,
> 
>> I have a small system running FreeBSD 8.2 that does NAT using ipfw and 
>> natd to systems attached to two interfaces: em0 and wlan0.  I have a 
>> dhcpd daemon issuing leases on those interfaces.  The system has an em1 
>> interface plugged into a cable modem where it obtains a DHCP lease from 
>> an ISP.
>>
>> For some reason, when traffic from the Internet terminates on the system 
>> itself (I scp a file from the computer) the natd and dhcpd processes 
>> consume significant CPU, and the throughput is less than I expect. 
>> Traffic that passes through to a computer behind the NAT flows without 
>> causing the natd or dhcpd processes to measurably consume CPU.
> 
> I see exactly the same issue on -STABLE. Have you been able to figure out the cause?

sudo ipfw list
00501 allow ip from any to any via lo0
00502 allow ip from any to any via em0
00503 allow ip from any to any via wlan0
00504 allow ip from any to any via vr0
00505 allow ip from any to any via gif0
00506 allow ip from any to any via tun0
00510 allow ip from me to not me out via em1
00550 divert 8668 ip from any to any via em1

Rule 510 fixes it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20130131/85195c8b/attachment.sig>


More information about the freebsd-net mailing list