From owner-freebsd-ipfw@FreeBSD.ORG Mon Sep 6 15:53:16 2010 Return-Path: Delivered-To: ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98D8E1065673 for ; Mon, 6 Sep 2010 15:53:16 +0000 (UTC) (envelope-from ozkan.kirik@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 4EFE58FC1E for ; Mon, 6 Sep 2010 15:53:16 +0000 (UTC) Received: by qyk31 with SMTP id 31so2614117qyk.13 for ; Mon, 06 Sep 2010 08:53:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=/MFBgGEkVkVSJkd56DkKCBqsXRhYDWNg4ER3Cx175aA=; b=aOVZzSSNYAnvAg9ZGF7oAMXgHhexHPBCqWZI5zIydLATiYMc9hcwDI0nZJpAA9OkV/ 8BPEl+rlVyXOIypP9lOScuLQpMSftR7A0Zmp6wdLwaWHbDd5RtICz5f7OrtVOgsQRiAb w9ZCzh9pdjw0K/3mLh7GPcyYFDvfGu0a7dN+o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=xFrnrkqCgiIMYrCbEqpVXVWszKA3wa6wbN0EQ91P9q3QaI31TWsWof1Dc6fFJRrlyc 0s+QpXcizWbYpKBvYXvE4ya5H0iYccEeol3JveRBhFhxm3q9J5l+8HJPtVq9le8t49fw fi1HmASTYvUxQ8u0L5Ui+d67PMP/QQ+H1IiSA= MIME-Version: 1.0 Received: by 10.229.181.210 with SMTP id bz18mr3660788qcb.43.1283788395301; Mon, 06 Sep 2010 08:53:15 -0700 (PDT) Received: by 10.229.46.146 with HTTP; Mon, 6 Sep 2010 08:53:15 -0700 (PDT) Date: Mon, 6 Sep 2010 18:53:15 +0300 Message-ID: From: =?ISO-8859-1?Q?=D6zkan_KIRIK?= To: ipfw@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Default router changes unexpectedly when dummynet enabled X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2010 15:53:16 -0000 Hi, When I enable dummynet rules, default router changes unexpectedly. If the pipe & queue rules not exists, there is no problem. I tried all FreeBSD 7.1, 7.2, 7.3, 8.1-STABLE-201008 releases ( both i386 and amd64 ). All this FreeBSD versions are affected. I inspected logs if someone logged in or changed route (with route -n monitor command). When the default route changed, there isnt any messages at the "route -n monitor" command output. I think there can be a buffer overflow in dummynet code. This problem repeats once per 10 minute. I wrote a shell script which monitors the default router. I saw that sometimes netstat -rn shows that default router is changed as 10.0.16.251 or 10.6.10.240 etc. which are client IP addresses but routing still routes to right router 193.X.Y.Z . After a while, routing really fails. You can access tcpdump capture file from: http://193.255.128.30/~ryland/flowdata_10_0_16_251 This file captured while the default router changes. Tcpdump capture, belongs to the IP Address which shown in default router (10.0.16.251) the tcpdump command: tcpdump -w /home/flowdata_10_0_16_251 -ni bce0.116 host 10.0.16.251 dummynet rules are: 30000 pipe 3 tcp from 10.0.0.0/8,192.168.0.0/16,172.16.0.0/12 to any dst-port 8000,80,22,25,88,110,443,1720,1863,1521,3389,4489 via em0 // Upload 30000 pipe 3 udp from 10.0.0.0/8,192.168.0.0/16,172.16.0.0/12 to any dst-port 53 via em0 // Upload 30000 pipe 4 tcp from 10.0.0.0/8,192.168.0.0/16,172.16.0.0/12 to any via em0 // Upload 30000 pipe 4 udp from 10.0.0.0/8,192.168.0.0/16,172.16.0.0/12 to any via em0 // Upload .... LOTS OF NAT RULES HERE (in kernel nat) 60000 pipe 1 tcp from any 8000,80,22,25,88,110,443,1720,1863,1521,3389,4489 to 10.0.0.0/8,192.168.0.0/16,172.16.0.0/12 via bce0* // Download 60000 pipe 1 udp from any 53 to 10.0.0.0/8,192.168.0.0/16,172.16.0.0/12 via bce0* // Download 60000 pipe 2 tcp from any to 10.0.0.0/8,192.168.0.0/16,172.16.0.0/12 via bce0* // Download 60000 pipe 2 udp from any to 10.0.0.0/8,192.168.0.0/16,172.16.0.0/12 via bce0* // Download /sbin/ipfw pipe 1 config bw 8192Kbit/s mask dst-ip 0xffffffff /sbin/ipfw pipe 3 config bw 1024Kbit/s mask src-ip 0xffffffff /sbin/ipfw pipe 2 config bw 4096Kbit/s mask dst-ip 0xffffffff /sbin/ipfw pipe 4 config bw 1024Kbit/s mask src-ip 0xffffffff sysctl vars: net.inet.ip.dummynet.hash_size=256 ( also tried with 8192 ) net.inet.ip.dummynet.pipe_slot_limit=500 net.inet.ip.dummynet.io_fast=1 Some Information about network: System has 3 NICS as WAN, LAN, DMZ. There are VLANs on WAN and LAN interfaces Throuput between 20Mbps and 100Mbps. Any ideas? Regards, Ozkan KIRIK Mersin University @ Turkey