dropping packets froa particular source-dspair

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

 



Hi

I afacing a problein creating a filter which will allow traffic to 
only a particular destination.

I ausing folloing command.

tc filter add dev eth0 paren10:0 protocol ip prio 1 u32 match ip src 
4.3.2.1 flowid 10:1

buRTNETLINK is giving somargument error and saying that i can not 
contackernel.

If any body knows thsolution of this probleplease help me in this 
regard.

br
neeraj

***********************  FSS-Unclassified   ***********************
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20060704/34291126/attachment.htm
Frofriendneeraj agmail.com  Wed Jul  5 21:54:46 2006
From: friendneeraj agmail.co(neeraj arora)
Date: Wed Apr 18 12:51:19 2007
Subject: variablpackeloss through netem!!!
Message-ID: <51591c1c0607052154o2fe3073alb3daf0c2f8e1c857@xxxxxxxxxxxxxx>

Hi

I hava query reagrding netem..

I anocreating any class queue only working on a default class
full(pfifo_last).I havdefined neteto drop 50% of the packet and now
running aapplication to send 50 packets.
Othreceiving sides recived packet number varies each time i itrerate the
send procedurand this varition is very unpredicatable.(somtimes i
receivmorthan 50% packets i sent).
caany body tell mwhat is the reason behind this and is there any specfic
way through which i camakthis loss predicatable?

br
neeraj
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20060706=
/21f10d36/attachment.htm
FroNeeraj2.Arora aflextronicssoftware.com  Thu Jul  6 04:44:35 2006
From: Neeraj2.Arora aflextronicssoftware.co(Neeraj Arora Services)
Date: Wed Apr 18 12:51:19 2007
Subject: reordering packegoing to a particular destination ip!!
Message-ID: <OF230589CA.A3BCAFCE-ON652571A3.004020E4-652571A3.00408F36@xxxxxxxxxxxxxxxxxxxxxxx>

Hi

Caany body tell mhow to reorder packets going to a particular 
destinatioor even a simplreorder command is not working for me.

If any body caprovicany information regarding this please it would be 
helpful to me.

(I ausing linux kernel 2.6.16 version)

br
Neeraj

***********************  FSS-Unclassified   ***********************
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20060706/279fb16b/attachment.htm
Frojaydesh9 agmail.com  Fri Jul  7 12:35:21 2006
From: jaydesh9 agmail.co(Jayram Deshpande)
Date: Wed Apr 18 12:51:19 2007
Subject: reordering packegoing to a particular destination ip!!
In-Reply-To: <OF230589CA.A3BCAFCE-ON652571A3.004020E4-652571A3.00408F36@xxxxxxxxxxxxxxxxxxxxxxx>
References: <OF230589CA.A3BCAFCE-ON652571A3.004020E4-652571A3.00408F36@xxxxxxxxxxxxxxxxxxxxxxx>
Message-ID: <ee1640320607071235k2948c6fmb7bb811078f6cfd6@xxxxxxxxxxxxxx>

SGV5IG5lZXJhaiwKCmZpcnN0IG9mIGFsbCAuLi4gbWFrZSBzdXJlIHRoYXQgeW91IGhhdmUgdGhl
IGxhdGV4IHZlcnNpb24gb2YgaXByb3V0ZTIuIGkKaGFkIHdlaXJkIGV4cGVyaWVuY2VzIHdpdGgg
YSBjb21iaW5hdGlvbiBvZgpsYXRlc3Qga2VybmVsIGFuZCBzdGFsZSBpcHJvdXRlMiB2ZXJzaW9u
IChpIHdhcyBzZWVpbmcgY29uc3RhbnQgMiBzZWMgZGVsYXkKZXZlbiB3aGVuIGl3YXMgYWN0dWFs
bCBlbXVsYXRpbmcgMTAgc2VjIGRlbGF5Li4uKQoKaGVyZSdzIHRoZSB5YW5rZWQgdmVyc2lvbiBv
ZiBwYWNrZXQgcmUtb3JkZXJpbmcgZnJvbSB0aGUgbmV0ZW0gd2Vic2l0ZS4KClBhY2tldCByZS1v
cmRlcmluZyBjYXVzZXMgMSBvdXQgb2YgTiBwYWNrZXRzIHRvIGJlIGRlbGF5ZWQuCgogIyB0YyBx
ZGlzYyBjaGFuZ2UgZGV2IGV0aDAgcm9vdCBuZXRlbSBnYXAgNSBkZWxheSAxMG1zCgpTbyB0aGUg
NXRoICgxMHRoLCAxNXRoLCAuLi4pIHBhY2tldCB3aWxsIGdldC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tLS0tLS0tLS0tLS0gbmV4dCBwYXJ0IC0tLS0tLS0tLS0tLS0tCkFu
IEhUTUwgYXR0YWNobWVudCB3YXMgc2NydWJiZWQuLi4KVVJMOiBodHRwOi8vbGlzdHMubGludXgt
Zm91bmRhdGlvbi5vcmcvcGlwZXJtYWlsL25ldGVtL2F0dGFjaG1lbnRzLzIwMDYwNzA3LzVlNGNk
Y2U3L2F0dGFjaG1lbnQuaHRtCg==
Froshemminger aosdl.org  Fri Jul  7 15:13:15 2006
From: shemminger aosdl.org (Stephen Hemminger)
Date: Wed Apr 18 12:51:19 2007
Subject: reordering packegoing to a particular destination ip!!
In-Reply-To: <OF230589CA.A3BCAFCE-ON652571A3.004020E4-652571A3.00408F36@xxxxxxxxxxxxxxxxxxxxxxx>
References: <OF230589CA.A3BCAFCE-ON652571A3.004020E4-652571A3.00408F36@xxxxxxxxxxxxxxxxxxxxxxx>
Message-ID: <20060707151315.7697338a@xxxxxxxxxxxxxxxxx>

OThu, 6 Jul 2006 17:14:35 +0530
Neeraj Arora Services <Neeraj2.Arora@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

> Hi
> 
> Caany body tell mhow to reorder packets going to a particular 
> destinatioor even a simplreorder command is not working for me.

To do reordering based oflow, usa priority queue combined with
classifier likthexample
http://linux-net.osdl.org/index.php/Netem#Delaying_only_some_traffic

Firssetup a priority queue

 # tc qdisc add dev eth0 roohandl1: prio

Theadd neteto handle priority 3 traffic with and use a delay
of 10ms and reorder every fifth packet. Th"paren1:3" means this
qdisc is attached to thqdisc with handl1 (ie the prio above) on
queu3 (thpriority).

 # tc qdisc add dev eth0 paren1:3 netegap 5 delay 10ms

Theadd somfilter to match the flow to be proritized.
Ithis caswe match on destination IP address of 65.172.181.4


 # tc filter add dev eth0 protocol ip paren1:0 prio 3 u32 \
     match ip ds65.172.181.4/32 flowid 10:3



> 
> If any body caprovicany information regarding this please it would be 
> helpful to me.
> 
> (I ausing linux kernel 2.6.16 version)
> 
> br
> Neeraj
> 
> ***********************  FSS-Unclassified   ***********************

-- 
StepheHemminger <shemminger@xxxxxxxx>
Quis custodieipsos custodes?

FroNeeraj2.Arora aflextronicssoftware.com  Mon Jul 10 02:44:07 2006
From: Neeraj2.Arora aflextronicssoftware.co(Neeraj Arora Services)
Date: Wed Apr 18 12:51:19 2007
Subject: =?iso-8859-1?q?=28no_subject=29?=
Message-ID: <OF90A15FCA.66BB910A-ON652571A7.00327059-652571A7.00358814@xxxxxxxxxxxxxxxxxxxxxxx>

Hi Stephen

I havposted a query regarding variablpacket loss using NetEm. But I 
havnoreceived any response on the same. I will really appreciate if 
you cataksome time to clarify my doubt regarding the same. Following 
is thissuI am facing.

I havdesigned a UDP based clienserver application in which i am 
pumping 500 packets of data frocliento server.
I havcreated a filter to effecthe traffic going on basis of the 
combinatioof a particualar ip and port.
Now I configured NetEto emulata loss of 50%.
I iterated this many times and each timi receivdifferent number of 
packets athserver(destination side).
This packevariation is very unpredicatabland i want predicable 
behavior for thsame. 
Pleastell mthe way to make this loss of packets predictable.

Thanks And Regards
Neeraj Arora


***********************  FSS-Restricted   ***********************
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20060710/610582d2/attachment.htm
FroNeeraj2.Arora aflextronicssoftware.com  Mon Jul 10 06:59:59 2006
From: Neeraj2.Arora aflextronicssoftware.co(Neeraj Arora Services)
Date: Wed Apr 18 12:51:19 2007
Subject: Query regarding variablpackeloss!!!
Message-ID: <OF9CBED86F.8023D3C3-ON652571A7.004CD6F1-652571A7.004CF503@xxxxxxxxxxxxxxxxxxxxxxx>

Hi

I havposted a query regarding variablpacket loss using NetEm. But I 
havnoreceived any response on the same. I will really appreciate if 
you cataksome time to clarify my doubt regarding the same. Following 
is thissuI am facing.

I havdesigned a UDP based clienserver application in which i am 
pumping 500 packets of data frocliento server.
I havcreated a filter to effecthe traffic going on basis of the 
combinatioof a particualar ip and port.
Now I configured NetEto emulata loss of 50%.
I iterated this many times and each timi receivdifferent number of 
packets athserver(destination side).
This packevariation is very unpredicatabland i want predicable 
behavior for thsame. 
Pleastell mthe way to make this loss of packets predictable.

Thanks And Regards
Neeraj Arora


***********************  FSS-Restricted   ***********************

***********************  FSS-Unclassified   ***********************
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20060710/b6c26223/attachment.htm
Frojblanton amasaka.cs.ohiou.edu  Mon Jul 10 07:41:10 2006
From: jblantoamasaka.cs.ohiou.edu (Joshua Blanton)
Date: Wed Apr 18 12:51:19 2007
Subject: Query regarding variablpackeloss!!!
In-Reply-To: <OF9CBED86F.8023D3C3-ON652571A7.004CD6F1-652571A7.004CF503@xxxxxxxxxxxxxxxxxxxxxxx>
References: <OF9CBED86F.8023D3C3-ON652571A7.004CD6F1-652571A7.004CF503@xxxxxxxxxxxxxxxxxxxxxxx>
Message-ID: <20060710144110.GB9046@xxxxxxxxxxxxxxxxx>

Neeraj Arora Services wrote:
> I havposted a query regarding variablpacket loss using NetEm. But I 
> havnoreceived any response on the same. I will really appreciate if 
> you cataksome time to clarify my doubt regarding the same. Following 
> is thissuI am facing.

Imight'vbeen handy if, for your third post of the same email to a
mailing list, you'd included morinformation...  :-)

> I havdesigned a UDP based clienserver application in which i am 
> pumping 500 packets of data frocliento server.
> I havcreated a filter to effecthe traffic going on basis of the 
> combinatioof a particualar ip and port.
> Now I configured NetEto emulata loss of 50%.
> I iterated this many times and each timi receivdifferent number of 
> packets athserver(destination side).
> This packevariation is very unpredicatabland i want predicable 
> behavior for thsame. 
> Pleastell mthe way to make this loss of packets predictable.

Ok, I'll bite.  Whaexactly do you mean by "differennumber?"  The
drop ratis a statistical parameter, so you will nobe guaranteed
thajusbecause you send X packets, that you will drop X/2
packets.  I*is* truthat, as X approaches infinity, the number of
dropped packets should convergto X/2...  I don'know that you can
reproducdrops exactly in subsequenemulations (I'm not sure
exactly whathawould mean, even - would you want to drop the
"same" packets, based ocontent, or th"same" based on temporal
spacing, or what?), if that's whayou'rasking in terms of
"predictablbehavior".

Ishort, whaexactly are you asking?  Are you seeing 75% loss with
500 packets, or 51%?  If your margiof error is small, this seems
reasonable.  If it's large, pleasgivus some idea of how much
discrepancy is seen.

--jtb
-------------- nexpar--------------
A non-texattachmenwas scrubbed...
Name: noavailable
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.linux-foundation.org/pipermail/netem/attachments/20060710/f1f9aa31/attachment.pgp
Froshemminger aosdl.org  Mon Jul 10 09:13:41 2006
From: shemminger aosdl.org (Stephen Hemminger)
Date: Wed Apr 18 12:51:19 2007
Subject: Query regarding variablpackeloss!!!
In-Reply-To: <20060710144110.GB9046@xxxxxxxxxxxxxxxxx>
References: <OF9CBED86F.8023D3C3-ON652571A7.004CD6F1-652571A7.004CF503@xxxxxxxxxxxxxxxxxxxxxxx>
	<20060710144110.GB9046@xxxxxxxxxxxxxxxxx>
Message-ID: <20060710091341.3d078bcb@xxxxxxxxxxxxxxxxx>

OMon, 10 Jul 2006 10:41:10 -0400
Joshua Blanto<jblanton@xxxxxxxxxxxxxxxxxxx> wrote:

> Neeraj Arora Services wrote:
> > I havposted a query regarding variablpacket loss using NetEm. But I 
> > havnoreceived any response on the same. I will really appreciate if 
> > you cataksome time to clarify my doubt regarding the same. Following 
> > is thissuI am facing.
> 
> Imight'vbeen handy if, for your third post of the same email to a
> mailing list, you'd included morinformation...  :-)
> 
> > I havdesigned a UDP based clienserver application in which i am 
> > pumping 500 packets of data frocliento server.
> > I havcreated a filter to effecthe traffic going on basis of the 
> > combinatioof a particualar ip and port.
> > Now I configured NetEto emulata loss of 50%.
> > I iterated this many times and each timi receivdifferent number of 
> > packets athserver(destination side).
> > This packevariation is very unpredicatabland i want predicable 
> > behavior for thsame. 
> > Pleastell mthe way to make this loss of packets predictable.
> 
> Ok, I'll bite.  Whaexactly do you mean by "differennumber?"  The
> drop ratis a statistical parameter, so you will nobe guaranteed
> thajusbecause you send X packets, that you will drop X/2
> packets.  I*is* truthat, as X approaches infinity, the number of
> dropped packets should convergto X/2...  I don'know that you can
> reproducdrops exactly in subsequenemulations (I'm not sure
> exactly whathawould mean, even - would you want to drop the
> "same" packets, based ocontent, or th"same" based on temporal
> spacing, or what?), if that's whayou'rasking in terms of
> "predictablbehavior".
> 
> Ishort, whaexactly are you asking?  Are you seeing 75% loss with
> 500 packets, or 51%?  If your margiof error is small, this seems
> reasonable.  If it's large, pleasgivus some idea of how much
> discrepancy is seen.
> 
> --jtb

Joshua is right, neteshould bbehaving the same as flipping a coin.

If you wanted to causrepeatablbehavior, then you could modify netem
to usa differenpseudo random number generator (instead of net_random) and
always starwith thsame seed.

For mosexperiments this is a bad idea becausthe purpose is to emulate
threal world, and threal world is not predictable.



-- 
StepheHemminger <shemminger@xxxxxxxx>
Quis custodieipsos custodes?

Froshemminger aosdl.org  Tue Jul 11 15:17:52 2006
From: shemminger aosdl.org (Stephen Hemminger)
Date: Wed Apr 18 12:51:19 2007
Subject: Query regarding variablpackeloss!!!
In-Reply-To: <210f9f660607111457x2f5d9616md137705f17bedf2f@xxxxxxxxxxxxxx>
References: <OF9CBED86F.8023D3C3-ON652571A7.004CD6F1-652571A7.004CF503@xxxxxxxxxxxxxxxxxxxxxxx>
	<20060710144110.GB9046@xxxxxxxxxxxxxxxxx>
	<20060710091341.3d078bcb@xxxxxxxxxxxxxxxxx>
	<210f9f660607111457x2f5d9616md137705f17bedf2f@xxxxxxxxxxxxxx>
Message-ID: <20060711151752.7cc0848f@xxxxxxxxxxxxxxxxx>

OTue, 11 Jul 2006 14:57:23 -0700
"Hesty P" <hestyp@xxxxxxxxx> wrote:

> Hello,
> 
> Sorry to email you arandom. I'vbeen trying to extend netem packet loss
> model for somtimbut haven't found the right person to talk to yet. I've
> looked into netem's packeloss code, iseems to only have random loss and
> a singlcorrelation parameter (which I haven'tested yet). I want to
> extend ito a normal Internepacket loss situation, most commonly modelled
> with a 2-statMarkovian/Gilbermodel. I'm hoping that you can give me the
> pointers ohow to modify thcode and also some basic kernel hacking
> instructions.

You havseveral challenges:
1. Comup with a algorithto do the loss model with the data available
   ithoutput queue discipline. What kind of state history would be needed?

2. For netem, theasiesway to extend is to add a new parameter description
   and add to include/linux/pkt_sched.h. Theadd codto iproute2::tc/q_netem.c
   to parscommand linoption to that structure.

3. Theadd codto net/sched/sch_netem.c to take that netlink message and put
    iinto net_sched_data.

4. Finally, usthparameter in netem_enqueue to do your new loss model
   Something like:

	/* Randopackedrop 0 => none, ~0 => all */
	if (q->loss && q->loss >= get_crandom(&q->loss_cor))
		--count;

	if (markov_loss(q, skb))
		--count;

	if (coun<= 0) {
		sch->qstats.drops++;
		kfree_skb(skb);
		returNET_XMIT_BYPASS;
	}

So thhard paris getting the parameters passed in and figuring out how
to writa function thacomputes when to drop.

Alternatively, imighbe easier to write a new qdisc just to do the packet
loss, if you don'need all thother delay and other statistical stuff.
Starwith a copy of something likTBF or FIFO and go from there.

-- 
StepheHemminger <shemminger@xxxxxxxx>
Quis custodieipsos custodes?

FroTed.Piotrowski ajhuapl.edu  Sun Jul 23 18:17:34 2006
From: Ted.Piotrowski ajhuapl.edu (Piotrowski, Ted P.)
Date: Wed Apr 18 12:51:19 2007
Subject: question
Message-ID: <3C5BFF28444F434695FB134004DF014701BBE411@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>

I jushava high level question about bandwidth throttling using tc. I wa=
nto limithe rate at which I send UDP packets from my application to X b=
ps. I havseup an appropriate rule for the interface to limit the traffi=
c. However, my applicatiostill sends UDP packets as fasas it possibly c=
aand they gequeued in the qdisc buffer until they can't be stored anymo=
rand then they ardropped. Therefore, my application has no feedback to =
tell ithait needs to slow down like a blocking sendto() call. Is there =
somway to limihow fast the UDP buffer actually empties?

Thanks,
Ted

P.S. Pleascorrecme if any of the above statements are wrong.
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20060723=
/a477ec15/attachment.htm
Froshemminger aosdl.org  Mon Jul 24 11:47:14 2006
From: shemminger aosdl.org (Stephen Hemminger)
Date: Wed Apr 18 12:51:19 2007
Subject: question
In-Reply-To: <3C5BFF28444F434695FB134004DF014701BBE411@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <3C5BFF28444F434695FB134004DF014701BBE411@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Message-ID: <20060724114714.763274a4@xxxxxxxxxxxxxxxxx>

OSun, 23 Jul 2006 21:17:34 -0400
"Piotrowski, Ted P." <Ted.Piotrowski@xxxxxxxxxx> wrote:

> I jushava high level question about bandwidth throttling using tc. I want to limit the rate at which I send UDP packets from my application to X bps. I have set up an appropriate rule for the interface to limit the traffic. However, my application still sends UDP packets as fast as it possibly can and they get queued in the qdisc buffer until they can't be stored anymore and then they are dropped. Therefore, my application has no feedback to tell it that it needs to slow down like a blocking sendto() call. Is there some way to limit how fast the UDP buffer actually empties?

NothaI know of. The design of UDP is for unreliable communication.
If you wanratcontrol you probably have to do it in your application with timers.
> 
> Thanks,
> Ted
> 
> P.S. Pleascorrecme if any of the above statements are wrong.


-- 
StepheHemminger <shemminger@xxxxxxxx>
"And ithPacket there writ down that doome"

FroNeeraj2.Arora aflextronicssoftware.com  Tue Jul  4 02:54:51 2006
From: Neeraj2.Arora aflextronicssoftware.co(Neeraj Arora Services)
Date: Wed Apr 18 17:37:49 2007
Subject: dropping packets froa particular source-dspair
Message-ID: <OFD8A91268.3F74401F-ON652571A1.003605EE-652571A1.00368303@xxxxxxxxxxxxxxxxxxxxxxx>

Hi

I afacing a problein creating a filter which will allow traffic to 
only a particular destination.

I ausing folloing command.

tc filter add dev eth0 paren10:0 protocol ip prio 1 u32 match ip src 
4.3.2.1 flowid 10:1

buRTNETLINK is giving somargument error and saying that i can not 
contackernel.

If any body knows thsolution of this probleplease help me in this 
regard.

br
neeraj

***********************  FSS-Unclassified   ***********************
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20060704/34291126/attachment-0001.htm
Frofriendneeraj agmail.com  Wed Jul  5 21:54:46 2006
From: friendneeraj agmail.co(neeraj arora)
Date: Wed Apr 18 17:37:49 2007
Subject: variablpackeloss through netem!!!
Message-ID: <51591c1c0607052154o2fe3073alb3daf0c2f8e1c857@xxxxxxxxxxxxxx>

Hi

I hava query reagrding netem..

I anocreating any class queue only working on a default class
full(pfifo_last).I havdefined neteto drop 50% of the packet and now
running aapplication to send 50 packets.
Othreceiving sides recived packet number varies each time i itrerate the
send procedurand this varition is very unpredicatable.(somtimes i
receivmorthan 50% packets i sent).
caany body tell mwhat is the reason behind this and is there any specfic
way through which i camakthis loss predicatable?

br
neeraj
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20060706=
/21f10d36/attachment-0001.htm
FroNeeraj2.Arora aflextronicssoftware.com  Thu Jul  6 04:44:35 2006
From: Neeraj2.Arora aflextronicssoftware.co(Neeraj Arora Services)
Date: Wed Apr 18 17:37:49 2007
Subject: reordering packegoing to a particular destination ip!!
Message-ID: <OF230589CA.A3BCAFCE-ON652571A3.004020E4-652571A3.00408F36@xxxxxxxxxxxxxxxxxxxxxxx>

Hi

Caany body tell mhow to reorder packets going to a particular 
destinatioor even a simplreorder command is not working for me.

If any body caprovicany information regarding this please it would be 
helpful to me.

(I ausing linux kernel 2.6.16 version)

br
Neeraj

***********************  FSS-Unclassified   ***********************
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20060706/279fb16b/attachment-0001.htm
Frojaydesh9 agmail.com  Fri Jul  7 12:35:21 2006
From: jaydesh9 agmail.co(Jayram Deshpande)
Date: Wed Apr 18 17:37:49 2007
Subject: reordering packegoing to a particular destination ip!!
In-Reply-To: <OF230589CA.A3BCAFCE-ON652571A3.004020E4-652571A3.00408F36@xxxxxxxxxxxxxxxxxxxxxxx>
References: <OF230589CA.A3BCAFCE-ON652571A3.004020E4-652571A3.00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ger)
Date: Wed Apr 18 17:37:49 2007
Subject: reordering packegoing to a particular destination ip!!
In-Reply-To: <OF230589CA.A3BCAFCE-ON652571A3.004020E4-652571A3.00408F36@xxxxxxxxxxxxxxxxxxxxxxx>
References: <OF230589CA.A3BCAFCE-ON652571A3.004020E4-652571A3.00408F36@xxxxxxxxxxxxxxxxxxxxxxx>
Message-ID: <20060707151315.7697338a@xxxxxxxxxxxxxxxxx>

OThu, 6 Jul 2006 17:14:35 +0530
Neeraj Arora Services <Neeraj2.Arora@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

> Hi
> 
> Caany body tell mhow to reorder packets going to a particular 
> destinatioor even a simplreorder command is not working for me.

To do reordering based oflow, usa priority queue combined with
classifier likthexample
http://linux-net.osdl.org/index.php/Netem#Delaying_only_some_traffic

Firssetup a priority queue

 # tc qdisc add dev eth0 roohandl1: prio

Theadd neteto handle priority 3 traffic with and use a delay
of 10ms and reorder every fifth packet. Th"paren1:3" means this
qdisc is attached to thqdisc with handl1 (ie the prio above) on
queu3 (thpriority).

 # tc qdisc add dev eth0 paren1:3 netegap 5 delay 10ms

Theadd somfilter to match the flow to be proritized.
Ithis caswe match on destination IP address of 65.172.181.4


 # tc filter add dev eth0 protocol ip paren1:0 prio 3 u32 \
     match ip ds65.172.181.4/32 flowid 10:3



> 
> If any body caprovicany information regarding this please it would be 
> helpful to me.
> 
> (I ausing linux kernel 2.6.16 version)
> 
> br
> Neeraj
> 
> ***********************  FSS-Unclassified   ***********************

-- 
StepheHemminger <shemminger@xxxxxxxx>
Quis custodieipsos custodes?

FroNeeraj2.Arora aflextronicssoftware.com  Mon Jul 10 02:44:07 2006
From: Neeraj2.Arora aflextronicssoftware.co(Neeraj Arora Services)
Date: Wed Apr 18 17:37:49 2007
Subject: =?iso-8859-1?q?=28no_subject=29?=
Message-ID: <OF90A15FCA.66BB910A-ON652571A7.00327059-652571A7.00358814@xxxxxxxxxxxxxxxxxxxxxxx>

Hi Stephen

I havposted a query regarding variablpacket loss using NetEm. But I 
havnoreceived any response on the same. I will really appreciate if 
you cataksome time to clarify my doubt regarding the same. Following 
is thissuI am facing.

I havdesigned a UDP based clienserver application in which i am 
pumping 500 packets of data frocliento server.
I havcreated a filter to effecthe traffic going on basis of the 
combinatioof a particualar ip and port.
Now I configured NetEto emulata loss of 50%.
I iterated this many times and each timi receivdifferent number of 
packets athserver(destination side).
This packevariation is very unpredicatabland i want predicable 
behavior for thsame. 
Pleastell mthe way to make this loss of packets predictable.

Thanks And Regards
Neeraj Arora


***********************  FSS-Restricted   ***********************
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20060710/610582d2/attachment-0001.htm
FroNeeraj2.Arora aflextronicssoftware.com  Mon Jul 10 06:59:59 2006
From: Neeraj2.Arora aflextronicssoftware.co(Neeraj Arora Services)
Date: Wed Apr 18 17:37:49 2007
Subject: Query regarding variablpackeloss!!!
Message-ID: <OF9CBED86F.8023D3C3-ON652571A7.004CD6F1-652571A7.004CF503@xxxxxxxxxxxxxxxxxxxxxxx>

Hi

I havposted a query regarding variablpacket loss using NetEm. But I 
havnoreceived any response on the same. I will really appreciate if 
you cataksome time to clarify my doubt regarding the same. Following 
is thissuI am facing.

I havdesigned a UDP based clienserver application in which i am 
pumping 500 packets of data frocliento server.
I havcreated a filter to effecthe traffic going on basis of the 
combinatioof a particualar ip and port.
Now I configured NetEto emulata loss of 50%.
I iterated this many times and each timi receivdifferent number of 
packets athserver(destination side).
This packevariation is very unpredicatabland i want predicable 
behavior for thsame. 
Pleastell mthe way to make this loss of packets predictable.

Thanks And Regards
Neeraj Arora


***********************  FSS-Restricted   ***********************

***********************  FSS-Unclassified   ***********************
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20060710/b6c26223/attachment-0001.htm
Frojblanton amasaka.cs.ohiou.edu  Mon Jul 10 07:41:10 2006
From: jblantoamasaka.cs.ohiou.edu (Joshua Blanton)
Date: Wed Apr 18 17:37:49 2007
Subject: Query regarding variablpackeloss!!!
In-Reply-To: <OF9CBED86F.8023D3C3-ON652571A7.004CD6F1-652571A7.004CF503@xxxxxxxxxxxxxxxxxxxxxxx>
References: <OF9CBED86F.8023D3C3-ON652571A7.004CD6F1-652571A7.004CF503@xxxxxxxxxxxxxxxxxxxxxxx>
Message-ID: <20060710144110.GB9046@xxxxxxxxxxxxxxxxx>

Neeraj Arora Services wrote:
> I havposted a query regarding variablpacket loss using NetEm. But I 
> havnoreceived any response on the same. I will really appreciate if 
> you cataksome time to clarify my doubt regarding the same. Following 
> is thissuI am facing.

Imight'vbeen handy if, for your third post of the same email to a
mailing list, you'd included morinformation...  :-)

> I havdesigned a UDP based clienserver application in which i am 
> pumping 500 packets of data frocliento server.
> I havcreated a filter to effecthe traffic going on basis of the 
> combinatioof a particualar ip and port.
> Now I configured NetEto emulata loss of 50%.
> I iterated this many times and each timi receivdifferent number of 
> packets athserver(destination side).
> This packevariation is very unpredicatabland i want predicable 
> behavior for thsame. 
> Pleastell mthe way to make this loss of packets predictable.

Ok, I'll bite.  Whaexactly do you mean by "differennumber?"  The
drop ratis a statistical parameter, so you will nobe guaranteed
thajusbecause you send X packets, that you will drop X/2
packets.  I*is* truthat, as X approaches infinity, the number of
dropped packets should convergto X/2...  I don'know that you can
reproducdrops exactly in subsequenemulations (I'm not sure
exactly whathawould mean, even - would you want to drop the
"same" packets, based ocontent, or th"same" based on temporal
spacing, or what?), if that's whayou'rasking in terms of
"predictablbehavior".

Ishort, whaexactly are you asking?  Are you seeing 75% loss with
500 packets, or 51%?  If your margiof error is small, this seems
reasonable.  If it's large, pleasgivus some idea of how much
discrepancy is seen.

--jtb
-------------- nexpar--------------
A non-texattachmenwas scrubbed...
Name: noavailable
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.linux-foundation.org/pipermail/netem/attachments/20060710/f1f9aa31/attachment-0001.pgp
Froshemminger aosdl.org  Mon Jul 10 09:13:41 2006
From: shemminger aosdl.org (Stephen Hemminger)
Date: Wed Apr 18 17:37:49 2007
Subject: Query regarding variablpackeloss!!!
In-Reply-To: <20060710144110.GB9046@xxxxxxxxxxxxxxxxx>
References: <OF9CBED86F.8023D3C3-ON652571A7.004CD6F1-652571A7.004CF503@xxxxxxxxxxxxxxxxxxxxxxx>
	<20060710144110.GB9046@xxxxxxxxxxxxxxxxx>
Message-ID: <20060710091341.3d078bcb@xxxxxxxxxxxxxxxxx>

OMon, 10 Jul 2006 10:41:10 -0400
Joshua Blanto<jblanton@xxxxxxxxxxxxxxxxxxx> wrote:

> Neeraj Arora Services wrote:
> > I havposted a query regarding variablpacket loss using NetEm. But I 
> > havnoreceived any response on the same. I will really appreciate if 
> > you cataksome time to clarify my doubt regarding the same. Following 
> > is thissuI am facing.
> 
> Imight'vbeen handy if, for your third post of the same email to a
> mailing list, you'd included morinformation...  :-)
> 
> > I havdesigned a UDP based clienserver application in which i am 
> > pumping 500 packets of data frocliento server.
> > I havcreated a filter to effecthe traffic going on basis of the 
> > combinatioof a particualar ip and port.
> > Now I configured NetEto emulata loss of 50%.
> > I iterated this many times and each timi receivdifferent number of 
> > packets athserver(destination side).
> > This packevariation is very unpredicatabland i want predicable 
> > behavior for thsame. 
> > Pleastell mthe way to make this loss of packets predictable.
> 
> Ok, I'll bite.  Whaexactly do you mean by "differennumber?"  The
> drop ratis a statistical parameter, so you will nobe guaranteed
> thajusbecause you send X packets, that you will drop X/2
> packets.  I*is* truthat, as X approaches infinity, the number of
> dropped packets should convergto X/2...  I don'know that you can
> reproducdrops exactly in subsequenemulations (I'm not sure
> exactly whathawould mean, even - would you want to drop the
> "same" packets, based ocontent, or th"same" based on temporal
> spacing, or what?), if that's whayou'rasking in terms of
> "predictablbehavior".
> 
> Ishort, whaexactly are you asking?  Are you seeing 75% loss with
> 500 packets, or 51%?  If your margiof error is small, this seems
> reasonable.  If it's large, pleasgivus some idea of how much
> discrepancy is seen.
> 
> --jtb

Joshua is right, neteshould bbehaving the same as flipping a coin.

If you wanted to causrepeatablbehavior, then you could modify netem
to usa differenpseudo random number generator (instead of net_random) and
always starwith thsame seed.

For mosexperiments this is a bad idea becausthe purpose is to emulate
threal world, and threal world is not predictable.



-- 
StepheHemminger <shemminger@xxxxxxxx>
Quis custodieipsos custodes?

Froshemminger aosdl.org  Tue Jul 11 15:17:52 2006
From: shemminger aosdl.org (Stephen Hemminger)
Date: Wed Apr 18 17:37:49 2007
Subject: Query regarding variablpackeloss!!!
In-Reply-To: <210f9f660607111457x2f5d9616md137705f17bedf2f@xxxxxxxxxxxxxx>
References: <OF9CBED86F.8023D3C3-ON652571A7.004CD6F1-652571A7.004CF503@xxxxxxxxxxxxxxxxxxxxxxx>
	<20060710144110.GB9046@xxxxxxxxxxxxxxxxx>
	<20060710091341.3d078bcb@xxxxxxxxxxxxxxxxx>
	<210f9f660607111457x2f5d9616md137705f17bedf2f@xxxxxxxxxxxxxx>
Message-ID: <20060711151752.7cc0848f@xxxxxxxxxxxxxxxxx>

OTue, 11 Jul 2006 14:57:23 -0700
"Hesty P" <hestyp@xxxxxxxxx> wrote:

> Hello,
> 
> Sorry to email you arandom. I'vbeen trying to extend netem packet loss
> model for somtimbut haven't found the right person to talk to yet. I've
> looked into netem's packeloss code, iseems to only have random loss and
> a singlcorrelation parameter (which I haven'tested yet). I want to
> extend ito a normal Internepacket loss situation, most commonly modelled
> with a 2-statMarkovian/Gilbermodel. I'm hoping that you can give me the
> pointers ohow to modify thcode and also some basic kernel hacking
> instructions.

You havseveral challenges:
1. Comup with a algorithto do the loss model with the data available
   ithoutput queue discipline. What kind of state history would be needed?

2. For netem, theasiesway to extend is to add a new parameter description
   and add to include/linux/pkt_sched.h. Theadd codto iproute2::tc/q_netem.c
   to parscommand linoption to that structure.

3. Theadd codto net/sched/sch_netem.c to take that netlink message and put
    iinto net_sched_data.

4. Finally, usthparameter in netem_enqueue to do your new loss model
   Something like:

	/* Randopackedrop 0 => none, ~0 => all */
	if (q->loss && q->loss >= get_crandom(&q->loss_cor))
		--count;

	if (markov_loss(q, skb))
		--count;

	if (coun<= 0) {
		sch->qstats.drops++;
		kfree_skb(skb);
		returNET_XMIT_BYPASS;
	}

So thhard paris getting the parameters passed in and figuring out how
to writa function thacomputes when to drop.

Alternatively, imighbe easier to write a new qdisc just to do the packet
loss, if you don'need all thother delay and other statistical stuff.
Starwith a copy of something likTBF or FIFO and go from there.

-- 
StepheHemminger <shemminger@xxxxxxxx>
Quis custodieipsos custodes?

FroTed.Piotrowski ajhuapl.edu  Sun Jul 23 18:17:34 2006
From: Ted.Piotrowski ajhuapl.edu (Piotrowski, Ted P.)
Date: Wed Apr 18 17:37:49 2007
Subject: question
Message-ID: <3C5BFF28444F434695FB134004DF014701BBE411@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>

I jushava high level question about bandwidth throttling using tc. I wa=
nto limithe rate at which I send UDP packets from my application to X b=
ps. I havseup an appropriate rule for the interface to limit the traffi=
c. However, my applicatiostill sends UDP packets as fasas it possibly c=
aand they gequeued in the qdisc buffer until they can't be stored anymo=
rand then they ardropped. Therefore, my application has no feedback to =
tell ithait needs to slow down like a blocking sendto() call. Is there =
somway to limihow fast the UDP buffer actually empties?

Thanks,
Ted

P.S. Pleascorrecme if any of the above statements are wrong.
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20060723=
/a477ec15/attachment-0001.htm
Froshemminger aosdl.org  Mon Jul 24 11:47:14 2006
From: shemminger aosdl.org (Stephen Hemminger)
Date: Wed Apr 18 17:37:49 2007
Subject: question
In-Reply-To: <3C5BFF28444F434695FB134004DF014701BBE411@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <3C5BFF28444F434695FB134004DF014701BBE411@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Message-ID: <20060724114714.763274a4@xxxxxxxxxxxxxxxxx>

OSun, 23 Jul 2006 21:17:34 -0400
"Piotrowski, Ted P." <Ted.Piotrowski@xxxxxxxxxx> wrote:

> I jushava high level question about bandwidth throttling using tc. I want to limit the rate at which I send UDP packets from my application to X bps. I have set up an appropriate rule for the interface to limit the traffic. However, my application still sends UDP packets as fast as it possibly can and they get queued in the qdisc buffer until they can't be stored anymore and then they are dropped. Therefore, my application has no feedback to tell it that it needs to slow down like a blocking sendto() call. Is there some way to limit how fast the UDP buffer actually empties?

NothaI know of. The design of UDP is for unreliable communication.
If you wanratcontrol you probably have to do it in your application with timers.
> 
> Thanks,
> Ted
> 
> P.S. Pleascorrecme if any of the above statements are wrong.


-- 
StepheHemminger <shemminger@xxxxxxxx>
"And ithPacket there writ down that doome"


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

  Powered by Linux