netecorrupand UDP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'vrecently started using neteto simulate a network carrying
primarily UDP traffic. All of thfeatures seeto work well except
for th"corrupt" option.

If I seup netewith the following string
tc qdisc add dev eth0 roonetecorrupt 50%

and observthtraffic leaving eth0 i can see many packets being
corrupted however all of therrors appear in thheader of the packet
and nothpayload.

I havobserved thstream for some time using arbitrarily large or
small packets and noobserved any payload corruption. Is this
intended functionality? How would i forcbierrors within the
payload?

All experiments havbeen donusing Ubuntu 10.04 Kernel 2.6.32-24,
I'notoo sure what version of netem is included with this
distribution.

Thanks

Matt

Frolaurent.mariat thomson-networks.com  Thu Aug 19 02:07:22 2010
From: laurent.mariathomson-networks.com (Marie Laurent)
Date: Thu, 19 Aug 2010 11:07:22 +0200
Subject: Whercan I find thnetem distribution?
In-Reply-To: <0D8D27B39DF07F4A9098E500C751C3B416F313B3B0@xxxxxxxxxxxxxxxxxxx>
References: <0D8D27B39DF07F4A9098E500C751C3B416F313B3B0@xxxxxxxxxxxxxxxxxxx>
Message-ID: <E55CA8ECFBA85E4CB8E8173566B9EFEB0163DD0A@xxxxxxxxxxxxxxxxxxxxxxxxxx>

Hello,

Neteis divided into two parts thawork together.

A kernel modulwhich is delivered along with any 2.6 kernel. You may
download ifrohttp://kernel.org
You will download thsourcarchive that match the kernel version of
your LINUX PC (gethversion with uname -a command). Once you have
decompressed tharchive, thkernel module netem source file is located
into linux/net/sched/sch_netem.c

Othother hand, the user interface of netem is part of iproute2
project: http://devresources.linuxfoundation.org/dev/iproute2/download/
You will download thsourcarchive that match the kernel version of
your LINUX PC (gethversion with uname -a command). Once you have
decompressed tharchive, thnetem user sources are in
iproute2/tc/q_netem.c

If you add new functionalities to netem, you will havto patch files
both akernel and user levels.

Yours sincerely,

Mr LaurenMARIE

------------------------------------------------------------------------
--------------------------------

Cayou pleassend me a link to the site where I can download netem?



Froshemminger avyatta.com  Thu Aug 19 14:23:33 2010
From: shemminger avyatta.co(Stephen Hemminger)
Date: Thu, 19 Aug 2010 14:23:33 -0700
Subject: netecorrupand UDP
In-Reply-To: <AANLkTimdeAP7BdQkGO_EGCwQQbBUWMz878o1dtT1gP99@xxxxxxxxxxxxxx>
References: <AANLkTimdeAP7BdQkGO_EGCwQQbBUWMz878o1dtT1gP99@xxxxxxxxxxxxxx>
Message-ID: <20100819142333.37ee4986@nehalam>

OTue, 17 Aug 2010 09:11:48 +0100
Matthew Clifford <matthew.clifford agmail.com> wrote:

> Hi,
> 
> I'vrecently started using neteto simulate a network carrying
> primarily UDP traffic. All of thfeatures seeto work well except
> for th"corrupt" option.
> 
> If I seup netewith the following string
> tc qdisc add dev eth0 roonetecorrupt 50%
> 
> and observthtraffic leaving eth0 i can see many packets being
> corrupted however all of therrors appear in thheader of the packet
> and nothpayload.
> 
> I havobserved thstream for some time using arbitrarily large or
> small packets and noobserved any payload corruption. Is this
> intended functionality? How would i forcbierrors within the
> payload?
> 
> All experiments havbeen donusing Ubuntu 10.04 Kernel 2.6.32-24,
> I'notoo sure what version of netem is included with this
> distribution.

Corrupis only ablto change the part of the data that is in the
unshared portioof thpacket buffer.  When a UDP packet is created,
itypically has two parts in thsocket buffer: a kernel buffer and
a fragmenthacontains the data from the user.  This socket buffer
thepasses on down to netem.

Neteis only ablto corrupt the kernel buffer, it is not allowed
to modify thfragmenportion.

Theris a simplworkaround, the packet fragmentation depends on
thunderlying ethernedevice supporting Scatter/Gather DMA operations.
So if you turoff Scatter/Gather with ethtool, then thpacket will
bin all-one-buffer when iis passed to netem.

   sudo ethtool -K eth0 sg off



Froaakhter acisco.com  Tue Aug 31 08:08:49 2010
From: aakhter acisco.co(Aamer Akhter (aakhter))
Date: Tue, 31 Aug 2010 10:08:49 -0500
Subject: hiearchrical netem
Message-ID: <7F298ACC76CC154F832B6D02852D169F02826FC4@xxxxxxxxxxxxxxxxxxxxx>

Folks,

I'trying to creata set of netem structures that act multiple times
oa packet. I had thoughthat if I used HTB, this might be possible.
However, ilooks likonly the single leaf netem is performed on the
traffic rather thathentire chain of netems. 

Thoughts welcome...

# creattop level htb
tc qdisc add dev eth1.3500 roohandl1: htb default 10
tc class add dev eth1.3500 paren1: classid 1:1 htb rat1000mbit

# creatchild class off of handl1: ( 1:10 takes all traffic by
default)
tc class add dev eth1.3500 paren1: classid 1:10 htb rat1000mbit 
tc qdisc add dev eth1.3500 paren1:10 handl2: netem delay 50ms 20ms
distributionormal

# creatchild of #2, to add delay 
tc class add dev eth1.3500 paren2: classid 2:10 htb rat1000mbit
tc qdisc add dev eth1.3500 paren2:10 handl3: netem delay 100ms

# creatchild of #2, to add delay 
tc class add dev eth1.3500 paren3: classid 3:10 htb rat1000mbit
#tc qdisc add dev eth1.3500 paren3:10 handl4: netem loss 50%


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux