From owner-freebsd-questions@FreeBSD.ORG Wed Jan 28 08:15:24 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C4E31065673 for ; Wed, 28 Jan 2009 08:15:24 +0000 (UTC) (envelope-from kes-kes@yandex.ru) Received: from forwards4.yandex.ru (forwards4.yandex.ru [77.88.32.20]) by mx1.freebsd.org (Postfix) with ESMTP id ABED08FC1A for ; Wed, 28 Jan 2009 08:15:23 +0000 (UTC) (envelope-from kes-kes@yandex.ru) Received: from smtp13.yandex.ru (smtp13.yandex.ru [77.88.32.83]) by forwards4.yandex.ru (Yandex) with ESMTP id 6677A4C59C8; Wed, 28 Jan 2009 11:15:21 +0300 (MSK) Received: from 254-0-113-92.pool.ukrtel.net ([92.113.0.254]:19460 "EHLO HOMEUSER" smtp-auth: "kes-kes" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S5980285AbZA1IPS (ORCPT + 2 others); Wed, 28 Jan 2009 11:15:18 +0300 X-Yandex-Spam: 1 X-Yandex-Front: smtp13 X-Yandex-TimeMark: 1233130518 X-BornDate: 1149541200 X-Yandex-Karma: 0 X-Yandex-KarmaStatus: 0 X-MsgDayCount: 3 X-Comment: RFC 2476 MSA function at smtp13.yandex.ru logged sender identity as: kes-kes Date: Wed, 28 Jan 2009 10:15:16 +0200 From: KES X-Mailer: The Bat! (v4.0.24) Professional Organization: SaftTen X-Priority: 3 (Normal) Message-ID: <5510133465.20090128101516@yandex.ru> To: Ian Smith In-Reply-To: <20090128183250.O86094@sola.nimnet.asn.au> References: <58305.62.206.221.107.1233071856.squirrel@anubis.getmyip.com> <20090128183250.O86094@sola.nimnet.asn.au> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 8bit Cc: Sebastian Mellmann , freebsd-questions@freebsd.org Subject: Re[2]: IPFW DUMMYNET: Several pipes after each other X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: KES List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2009 08:15:24 -0000 Здравствуйте, Ian. May be this will be usefull for you #1. ping -D -S 10.10.16.16 -s 1472 -i 0.01 10.0.16.1 #2. ping -S 10.10.16.17 10.0.16.1 ### --- ### --- ### --- ### --- ### --- ### --- #### # 111 ### --- ### --- ### --- ### --- ### --- ### --- #### #Put each flow to different pipes #1 do not affect 2. Each flow goes through its own pipe. #c add 10 pipe 1 proto icmp out xmit nfe0 #c add 11 pipe 2 proto icmp in recv nfe0 #c pipe 1 config bw 64k mask src-ip 0xffffffff gred 0.002/10/30/0.1 #c pipe 2 config bw 64k mask dst-ip 0xffffffff gred 0.002/10/30/0.1 #00001: 64.000 Kbit/s 0 ms 50 sl. 2 queues (64 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 # mask: 0x00 0xffffffff/0x0000 -> 0x00000000/0x0000 #BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp # 40 ip 10.10.16.17/0 0.0.0.0/0 10 840 0 0 0 # 44 ip 10.10.16.19/0 0.0.0.0/0 1143 1714500 49 73500 1030 0 #00002: 64.000 Kbit/s 0 ms 50 sl. 2 queues (64 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 # mask: 0x00 0x00000000/0x0000 -> 0xffffffff/0x0000 #BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp # 5 ip 0.0.0.0/0 10.10.16.17/0 10 840 0 0 0 # 7 ip 0.0.0.0/0 10.10.16.19/0 64 96000 1 1500 0 ### --- ### --- ### --- ### --- ### --- ### --- #### # 222 ### --- ### --- ### --- ### --- ### --- ### --- #### #Put each flow to the same pipe. #1 affect 2. There are packets drop as for 1 as for 2 #c add 10 pipe 1 proto icmp out xmit nfe0 #c add 11 pipe 2 proto icmp in recv nfe0 #c pipe 1 config bw 64k mask src-ip 0x00000000 gred 0.002/10/30/0.1 #c pipe 2 config bw 64k mask dst-ip 0x00000000 gred 0.002/10/30/0.1 #00001: 64.000 Kbit/s 0 ms 50 sl. 1 queues (1 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 # mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 #BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp # 0 icmp 10.10.16.17/0 10.0.16.1/0 879 1159908 49 70668 293 #00002: 64.000 Kbit/s 0 ms 50 sl. 1 queues (1 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 # mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 #BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp # 0 icmp 10.0.16.1/0 10.10.16.17/0 537 706380 1 1500 0 ### --- ### --- ### --- ### --- ### --- ### --- #### # 333 ### --- ### --- ### --- ### --- ### --- ### --- #### #Put each flow to same queue. # 1 affect 2. There is drops for 1 and 99% drop for 2. #c add 10 queue 1 proto icmp out xmit nfe0 #c add 11 queue 2 proto icmp in recv nfe0 #c pipe 1 config bw 64k mask src-ip 0x00000000 gred 0.002/10/30/0.1 #c pipe 2 config bw 64k mask dst-ip 0x00000000 gred 0.002/10/30/0.1 #c queue 1 config pipe 1 mask src-ip 0x00000000 gred 0.002/10/30/0.1 #c queue 2 config pipe 2 mask dst-ip 0x00000000 gred 0.002/10/30/0.1 #00001: 64.000 Kbit/s 0 ms 50 sl. 0 queues (1 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 #00002: 64.000 Kbit/s 0 ms 50 sl. 0 queues (1 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 #q00001: weight 1 pipe 1 50 sl. 1 queues (1 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 # mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 #BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp # 0 icmp 10.10.16.19/0 10.0.16.1/0 40854 61184712 0 0 40241 #q00002: weight 1 pipe 2 50 sl. 1 queues (1 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 # mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 #BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp # 0 icmp 10.0.16.1/0 10.10.16.19/0 613 909588 0 0 0 ### --- ### --- ### --- ### --- ### --- ### --- #### # 444 ### --- ### --- ### --- ### --- ### --- ### --- #### #!Put each flow to different queue. These queues share same pipe #1 affect 2. There are packets drop for 1 and no drops for 2. There is only dellay for 2. #c add 10 queue 1 proto icmp out xmit nfe0 #c add 11 queue 2 proto icmp in recv nfe0 #c pipe 1 config bw 64k mask src-ip 0x00000000 gred 0.002/10/30/0.1 #c pipe 2 config bw 64k mask dst-ip 0x00000000 gred 0.002/10/30/0.1 #c queue 1 config pipe 1 mask src-ip 0xffffffff gred 0.002/10/30/0.1 #c queue 2 config pipe 2 mask dst-ip 0xffffffff gred 0.002/10/30/0.1 #00001: 64.000 Kbit/s 0 ms 50 sl. 0 queues (1 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 #00002: 64.000 Kbit/s 0 ms 50 sl. 0 queues (1 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 #q00001: weight 1 pipe 1 50 sl. 2 queues (64 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 # mask: 0x00 0xffffffff/0x0000 -> 0x00000000/0x0000 #BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp # 40 ip 10.10.16.17/0 0.0.0.0/0 371 31164 0 0 0 # 44 ip 10.10.16.19/0 0.0.0.0/0 17422 26133000 0 0 16175 #q00002: weight 1 pipe 2 50 sl. 2 queues (64 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 # mask: 0x00 0x00000000/0x0000 -> 0xffffffff/0x0000 #BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp # 5 ip 0.0.0.0/0 10.10.16.17/0 371 31164 0 0 0 # 7 ip 0.0.0.0/0 10.10.16.19/0 1247 1870500 0 0 0 ### --- ### --- ### --- ### --- ### --- ### --- #### # 555 ### --- ### --- ### --- ### --- ### --- ### --- #### #Put each flow to same queue. These queues share same pipe (see conclusion) # 1 affect 2. There is drops for 1 and 99% drop for 2. # Results are same as for experiment 3. # Conclusion: mask for pipe does not take account on queue #c add 10 queue 1 proto icmp out xmit nfe0 #c add 11 queue 2 proto icmp in recv nfe0 #c pipe 1 config bw 64k mask src-ip 0xffffffff gred 0.002/10/30/0.1 #c pipe 2 config bw 64k mask dst-ip 0xffffffff gred 0.002/10/30/0.1 #c queue 1 config pipe 1 mask src-ip 0x00000000 gred 0.002/10/30/0.1 #c queue 2 config pipe 2 mask dst-ip 0x00000000 gred 0.002/10/30/0.1 #00001: 64.000 Kbit/s 0 ms 50 sl. 0 queues (64 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 #00002: 64.000 Kbit/s 0 ms 50 sl. 0 queues (64 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 #q00001: weight 1 pipe 1 50 sl. 1 queues (1 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 # mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 #BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp # 0 icmp 10.10.16.19/0 10.0.16.1/0 1030 1447296 0 0 800 #q00002: weight 1 pipe 2 50 sl. 1 queues (1 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 # mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 #BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp # 0 icmp 10.0.16.1/0 10.10.16.19/0 230 254376 0 0 0 ### --- ### --- ### --- ### --- ### --- ### --- #### # 666 ### --- ### --- ### --- ### --- ### --- ### --- #### #Put each flow to different queue. These queues share same pipe #1 affect 2. There are packets drop for 1 and no drops for 2. There is only dellay for 2. #Conclusion: mask for pipe does not take account on queue #c add 10 queue 1 proto icmp out xmit nfe0 #c add 11 queue 2 proto icmp in recv nfe0 #c pipe 1 config bw 64k mask src-ip 0xffffffff gred 0.002/10/30/0.1 #c pipe 2 config bw 64k mask dst-ip 0xffffffff gred 0.002/10/30/0.1 #c queue 1 config pipe 1 mask src-ip 0xffffffff gred 0.002/10/30/0.1 #c queue 2 config pipe 2 mask dst-ip 0xffffffff gred 0.002/10/30/0.1 #00001: 64.000 Kbit/s 0 ms 50 sl. 0 queues (64 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 #00002: 64.000 Kbit/s 0 ms 50 sl. 0 queues (64 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 #q00001: weight 1 pipe 1 50 sl. 2 queues (1 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 # mask: 0x00 0xffffffff/0x0000 -> 0x00000000/0x0000 #BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp # 0 ip 10.10.16.19/0 0.0.0.0/0 4379 6568500 50 75000 4098 # 0 ip 10.10.16.17/0 0.0.0.0/0 122 10248 0 0 0 #q00002: weight 1 pipe 2 50 sl. 2 queues (1 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 # mask: 0x00 0x00000000/0x0000 -> 0xffffffff/0x0000 #BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp # 0 ip 0.0.0.0/0 10.10.16.19/0 158 237000 0 0 0 # 0 ip 0.0.0.0/0 10.10.16.17/0 86 7224 0 0 0 ### --- ### --- ### --- ### --- ### --- ### --- #### # 777 ### --- ### --- ### --- ### --- ### --- ### --- #### #We can not add queue without pipe =(. So if you want just queuing add pipe without 'bw' #c add 10 queue 1 proto icmp out xmit nfe0 #c add 11 queue 2 proto icmp in recv nfe0 #c queue 1 config mask src-ip 0xffffffff gred 0.002/10/30/0.1 #c queue 2 config mask dst-ip 0xffffffff gred 0.002/10/30/0.1 ### --- ### --- ### --- ### --- ### --- ### --- #### # 888 ### --- ### --- ### --- ### --- ### --- ### --- #### #Put flows to different queues #1 does not affect 2. #c add 10 queue 1 proto icmp out xmit nfe0 #c add 11 queue 2 proto icmp in recv nfe0 #c pipe 1 config mask src-ip 0xffffffff gred 0.002/10/30/0.1 #c pipe 2 config mask dst-ip 0xffffffff gred 0.002/10/30/0.1 #c queue 1 config pipe 1 mask src-ip 0xffffffff gred 0.002/10/30/0.1 #c queue 2 config pipe 2 mask dst-ip 0xffffffff gred 0.002/10/30/0.1 #00001: unlimited 0 ms 50 sl. 0 queues (64 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 #00002: unlimited 0 ms 50 sl. 0 queues (64 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 #q00001: weight 1 pipe 1 50 sl. 2 queues (64 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 # mask: 0x00 0xffffffff/0x0000 -> 0x00000000/0x0000 #BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp # 40 ip 10.10.16.17/0 0.0.0.0/0 39 3276 0 0 0 # 44 ip 10.10.16.19/0 0.0.0.0/0 3805 5707500 0 0 0 #q00002: weight 1 pipe 2 50 sl. 2 queues (64 buckets) # GRED w_q 0.001999 min_th 10 max_th 30 max_p 0.099991 # mask: 0x00 0x00000000/0x0000 -> 0xffffffff/0x0000 #BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp # 5 ip 0.0.0.0/0 10.10.16.17/0 27 2268 0 0 0 # 7 ip 0.0.0.0/0 10.10.16.19/0 3198 4797000 0 0 0 ### --- ### --- ### --- ### --- ### --- ### --- #### # 999 ### --- ### --- ### --- ### --- ### --- ### --- #### #Put flows to same queues #1 does not affect 2. EXPECTED: 1 affect 2. #Thoughts: 2 is not affected because of capability of device nfe0 #c add 10 queue 1 proto icmp out xmit nfe0 #c add 11 queue 2 proto icmp in recv nfe0 #c pipe 1 config mask src-ip 0xffffffff gred 0.002/10/30/0.1 #c pipe 2 config mask dst-ip 0xffffffff gred 0.002/10/30/0.1 #c queue 1 config pipe 1 mask src-ip 0x00000000 gred 0.002/10/30/0.1 #c queue 2 config pipe 2 mask dst-ip 0x00000000 gred 0.002/10/30/0.1 -- С уважением, KES mailto:kes-kes@yandex.ru