From owner-freebsd-net@FreeBSD.ORG Mon Feb 9 16:45:24 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E21E16A4D1 for ; Mon, 9 Feb 2004 16:45:24 -0800 (PST) Received: from mail.valuehost.co.uk (mail.valuehost.co.uk [62.25.99.6]) by mx1.FreeBSD.org (Postfix) with SMTP id 5A65B43D1D for ; Mon, 9 Feb 2004 16:45:23 -0800 (PST) (envelope-from bjorn@eikeland.info) Received: (qmail 16310 invoked by uid 89); 10 Feb 2004 00:45:06 +0000 Received: from unknown (HELO beer.eikeland.info) (bjorn@eikeland.info@80.202.106.8) by mail.valuehost.co.uk with SMTP; 10 Feb 2004 00:45:06 +0000 Date: Tue, 10 Feb 2004 01:43:44 +0100 To: "freebsd-net@freebsd.org" From: Bjorn Eikeland Content-Type: text/plain; format=flowed; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: User-Agent: Opera7.23/FreeBSD M2 build 518 Subject: dummynet = local taffic > 100ms - help! X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2004 00:45:24 -0000 I think I've made a mess of my attempt to shape my traffic, the traffic on my lan ip is getting delayed. (About 18ms idle and 100ms full load, load is the same as for internet traffic) Traffic to localhost and other lan hosts are not delayed, the delay only occurs from my box to my ip. I started with http://www.topfx.com/prioritizingackfreebsd.shtml as a template for my traffic shaping and have extended it a bit: DUMMYNET and HZ=10000 is in the kernel. Any suggestions what can be causing this? (I've only got the one nic, and use a adsl router for internett) thanks, Bjorn # # Traffic shaping rules # # # Define some variables (or "constants" really) # echo Setting up variables IPFW=ipfw WAN_UL_CAP=18KByte/s WAN_DL_CAP=180KByte/s LAN_NET=10.0.0.0 LAN_CIDR=24 echo WAN UPLOAD ${WAN_UL_CAP} echo WAN DOWNLOAD ${WAN_DL_CAP} echo LAN_NET ${LAN_NET} echo LAN_MASK ${LAN_MASK} echo LAN_CIDR ${LAN_CIDR} # # FLUSH old rules (< `echo y` answers yes) # echo Flushing rules ${IPFW} flush < `echo y` # # TRAFFIC SHAPING: # # Make packets exiting dummynet not continue down the chain # If this is not enabled, then packets leaving an early # queue might enter a later queue if the conditions for # the later queue are met, which would be completely # devastating to all the prioritizing we're doing # ${IPFW} enable one_pass # # Lopback and local net traffic # ${IPFW} pipe 1 config bw lo0 ${IPFW} pipe 2 config bw fxp0 ${IPFW} add pipe 1 all from localhost to localhost ${IPFW} add pipe 2 all from ${LAN_NET}/${LAN_CIDR} to ${LAN_NET}/${LAN_CIDR} # # WAN Pipes # echo Setting up WAN Pipes WAN_UL=3 WAN_DL=4 ${IPFW} pipe $WAN_UL config bw $WAN_UL_CAP ${IPFW} pipe $WAN_DL config bw $WAN_DL_CAP # # WAN_UL queues # echo Setting up WAN_UL Queues WAN_UL_HI=1 WAN_UL_M1=2 WAN_UL_M2=3 WAN_UL_LO=4 # Define a high-priority queue ${IPFW} queue $WAN_UL_HI config pipe $WAN_UL weight 50 # Define a medium-high-priority queues ${IPFW} queue $WAN_UL_M1 config pipe $WAN_UL weight 10 ${IPFW} queue $WAN_UL_M2 config pipe $WAN_UL weight 5 # Define a low-priority queue ${IPFW} queue $WAN_UL_LO config pipe $WAN_UL weight 1 # #Assign WAN_UL traffic to queue's # echo Assigning WAN_UL traffic # HIGH PRIORITY # Assign outgoing empty/small ACK + ICMP packets to the high-priority queue: ${IPFW} add queue $WAN_UL_HI tcp from me to not ${LAN_NET}/${LAN_CIDR} tcpflags ack iplen 0-80 ${IPFW} add queue $WAN_UL_HI icmp from me to not ${LAN_NET}/${LAN_CIDR} # MEDIUM PRIORITY # Outgoing DNS and SSH traffic to the medium-high-priority queue: ${IPFW} add queue $WAN_UL_M1 ip from me to not ${LAN_NET}/${LAN_CIDR} domain ${IPFW} add queue $WAN_UL_M1 tcp from me to not ${LAN_NET}/${LAN_CIDR} ssh,telnet,login # Outgoing http requests - possibly file uploads & mails ${IPFW} add queue $WAN_UL_M2 tcp from me to not ${LAN_NET}/${LAN_CIDR} http,https,pop3,imap,smtp # Outgoing ftp-control ${IPFW} add queue $WAN_UL_M2 ip from me to not ${LAN_NET}/${LAN_CIDR} ftp # Add gaming traffic later # LOW PRIORITY # Assign all other outgoing traffic to the low-priority queue: ${IPFW} add queue $WAN_UL_LO all from me to not ${LAN_NET}/${LAN_CIDR} # # WAN_DL queues # echo Setting up WAN_DL Queues WAN_DL_HI=5 WAN_DL_M1=6 WAN_DL_M2=7 WAN_DL_LO=8 # Define a high-priority queue ${IPFW} queue $WAN_DL_HI config pipe $WAN_DL weight 50 # Define a medium-high-priority queues ${IPFW} queue $WAN_DL_M1 config pipe $WAN_DL weight 10 ${IPFW} queue $WAN_DL_M2 config pipe $WAN_DL weight 5 # Define a low-priority queue ${IPFW} queue $WAN_DL_LO config pipe $WAN_DL weight 1 # #Assign WAN_DL traffic to queue's # echo Assigning WAN_DL traffic # HIGH PRIORITY # Assign outgoing empty/small ACK + ICMP packets to the high-priority queue: ${IPFW} add queue $WAN_DL_HI tcp from not ${LAN_NET}/${LAN_CIDR} to me tcpflags ack iplen 0-80 ${IPFW} add queue $WAN_DL_HI icmp from not ${LAN_NET}/${LAN_CIDR} to me # MEDIUM PRIORITY # Outgoing DNS and SSH traffic to the medium-high-priority queue: ${IPFW} add queue $WAN_DL_M1 ip from not ${LAN_NET}/${LAN_CIDR} to me domain ${IPFW} add queue $WAN_DL_M1 tcp from not ${LAN_NET}/${LAN_CIDR} to me ssh,telnet,login # Outgoing http requests - possibly file uploads & mails ${IPFW} add queue $WAN_DL_M2 tcp from not ${LAN_NET}/${LAN_CIDR} to me http,https,pop3,imap,smtp # Outgoing ftp-control ${IPFW} add queue $WAN_DL_M2 ip from not ${LAN_NET}/${LAN_CIDR} to me ftp # Add gaming traffic later # LOW PRIORITY # Assign all other outgoing traffic to the low-priority queue: ${IPFW} add queue $WAN_DL_LO all from not ${LAN_NET}/${LAN_CIDR} to me