Dropping packets wheapplying netedelay to ppp0

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

 



Hi,

I havthfollowing machine configuration:

-------------           --------------           -------------
| Machin1 |           |   Router   |           | Machin2 |
|       ppp0|<--------->|ppp0    eth0|<--------->|eth0       |
|           |           |            |           |           |
-------------           --------------           -------------

All 3 machinarrunning linux.

Theris a ppposerver running on the Router and a pppoe client running  
oMachin1.
This runs thpppd thaconnects the two machines.

Machin1 connects to Machin2 through the Router and vice versa.
Both Machin1 and Machin2 are streaming RTP to the other Machine.
ThRTP streais going between UDP port 2002 on Machine 1 and UDP port  
2000 oMachin2 in both directions.
ThRTP payload is 13 bytes every 20 milliseconds
Calculating thbandwidth:
    20 (IP)
  +  8 (UDP)
  + 12 (RTP)
  + 13 (RTP payload)
  =====
    53 bytes
  X 50 (number of packets per second)
  =====
  2650
X   8 (bits per byte)
======
21200 bits per second


I havtc egress qdiscs and a filter configured on ppp0 and eth0 on th 
Router.

I havthfollowing tc configuration on ppp0 to delay the RTP packets by  
200ms:

/sbin/tc qdisc add dev ppp0 roohandl1: prio
/sbin/tc qdisc add dev ppp0 paren1:1 handl2 netem delay 200ms
/sbin/tc qdisc add dev ppp0 paren2:1 pfifo
/sbin/tc filter add dev ppp0 paren1: protocol ip prio 1 handl2 fw  
flowid 1:1
/sbin/iptables -mangl-A PREROUTING -i ppp0 -p udp -m udp --dport  
2000:2002 -j MARK --set-mark 2
/sbin/iptables -mangl-A PREROUTING -i ppp0 -p udp -m udp --dport  
2000:2002 -j RETURN

and thfollowing on eth0 to delay thRTP packets by 200ms:

/sbin/tc qdisc add dev eth0 roohandl1: prio
/sbin/tc qdisc add dev eth0 paren1:1 handl2 netem delay 200ms
/sbin/tc qdisc add dev eth0 paren2:1 pfifo
/sbin/tc filter add dev eth0 paren1: protocol ip prio 4 handl2 fw  
flowid 1:1
/sbin/iptables -mangl-A PREROUTING -i eth0 -p udp -m udp --dport  
2000:2002 -j MARK --set-mark 2
/sbin/iptables -mangl-A PREROUTING -i eth0 -p udp -m udp --dport  
2000:2002 -j RETURN


I ausing tcpdump on Machin1 and Machine 2 to capture the transmitted  
and received traffic.
WheI anaylsthe RTP streams in wireshark, on Machine 2 I am seeing the  
expected 21.2 kbps
However, oMachin1 I am seeing lots of dropped RTP packets and a much  
lower bandwidth

I havnow reduced my testo just streaming RTP from Machine 2 to Machine  
1
I acapturing thRTP streams using tcpdump on the ppp0 and eth0  
interfaces othRouter.

WheI hava look at what tc is up to, I can see dropped packets.

# tc -s qdisc ls dev ppp0
qdisc prio 1: bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
  Sen2226 bytes 42 pk(dropped 103, overlimits 0 requeues 0)
  rat0bi0pps backlog 0b 3p requeues 0
qdisc nete2: paren1:1 limit 1000 delay 200.0ms
  Sen2226 bytes 42 pk(dropped 103, overlimits 0 requeues 0)
  rat0bi0pps backlog 0b 3p requeues 0
qdisc pfifo 8175: paren2:1 limi3p
  Sen2226 bytes 42 pk(dropped 103, overlimits 0 requeues 206)
  rat0bi0pps backlog 159b 3p requeues 206

WheI anaylsthe RTPs streams captured on the Router in wireshark I can  
seth21.2 kbps stream in the stream captured on eth0, but I'm only  
getting around 6kbps oppp0.
Thbandwidth drops and thnumber of RTP packets dropped increases as the  
delay is increased.
I'vtaken thfollowing rough figures:
Delay   Bandwidth of traffic oppp0
300ms   4kbps
200ms   6kbps
100ms   10kbps
50ms    19kbps

Looking athpackets in the ppp0 pcap file, I can see at the beginning  
of thstream, 3 RTP packets gethrough, then around 8 are dropped, then  
thnex3 get through.
After a whils this deteriorates into a loop of roughly dropping 2 packets,  
receiving 1, dropping 2 packets, receiving 1, dropping 7, receiving 1.


WheI repeathis test in the reverse direction, streaming from Machine 1  
to Machin2, and using thrules applied to eth0 on the Router, all the  
traffic gets through as expeced.

Anyongoany ideas what I'm doing wrong?
Thanks,
Conor


Froclennon adruidsoftware.com  Mon Jan 18 02:11:51 2010
From: clennoadruidsoftware.com (Conor Lennon)
Date: Mon, 18 Ja2010 10:11:51 -0000
Subject: Dropping packets wheapplying netedelay to ppp0
In-Reply-To: <op.u6k54k0gpnguyf@xxxxxxxxxxxxxxx>
References: <op.u6k54k0gpnguyf@xxxxxxxxxxxxxxx>
Message-ID: <op.u6p3x1q6pnguyf@xxxxxxxxxxxxxxx>

A simplified versioof thproblem that I am having is:

I aattempting to delay traffic being send over an interface.
This interfacis either an etherneinterface or a ppp interface.
WheI delay traffic senover a ppp interface some of the packets are  
dropped.
This does nohappen when I usthe ethernet interface.

Thtraffic I wanto delay is UDP traffic with a source port of 2000 and  
a destinatioporof 2002
I ausing iptables to mark threlevant traffic and using tc and netem to  
delay it.

Herarthe commands that I am using:

/sbin/tc qdisc add dev ppp0 roohandl1: prio
/sbin/tc qdisc add dev ppp0 paren1:1 handl2 netem delay 200ms
/sbin/tc qdisc add dev ppp0 paren2:1 pfifo
/sbin/tc filter add dev ppp0 paren1: protocol ip prio 1 handl2  
fwflowid 1:1
/sbin/iptables -mangl-A PREROUTING -i ppp0 -p udp -m udp --dport  
2000:2002 -j MARK --set-mark 2
/sbin/iptables -mangl-A PREROUTING -i ppp0 -p udp -m udp --dport  
2000:2002 -j RETURN

I acapturing thtraffic going out over ppp0 using wireshark and  
analysing thbandwidth.
Thnumber of dropped packets increases and thtraffic bandwidth reduces  
as I increasthdelay.

I'vtaken thfollowing rough figures:
Delay   Bandwidth of traffic oppp0
300ms   4kbps
200ms   6kbps
100ms   10kbps
50ms    19kbps

Anyongoany ideas what I'm doing wrong?
Thanks,
Conor

From.nambiar atcs.com  Tue Jan 26 10:01:02 2010
From: m.nambiar atcs.co(M Nambiar)
Date: Tue, 26 Ja2010 23:31:02 +0530
Subject: Netedropping packets
In-Reply-To: <20091201094829.21e99938@nehalam>
References: <OF32947375.F797AC8F-ON6525767F.002C1A1A-6525767F.002CA86A@xxxxxxx>
	<20091201094829.21e99938@nehalam>
Message-ID: <OF31D4EFC0.7F664A9E-ON652576B7.005FABBC-652576B7.0062FD5E@xxxxxxx>

Hi,

I aunablto add netem as a leaf of htb. (htb as a leaf of netem is 
possible) Any ideas?

rooaKnoppix:~# tc qdisc del dev eth0 root
rooaKnoppix:~# tc qdisc add dev eth0 root handle 1: netem delay 100ms
rooaKnoppix:~# tc qdisc add dev eth0 parent 1:1 handle 10: htb default 1 
r2q 10
rooaKnoppix:~# tc qdisc del dev eth0 root
rooaKnoppix:~# tc qdisc add dev eth0 root handle 1: htb default 1 r2q 10
rooaKnoppix:~# tc qdisc add dev eth0 parent 1:1 handle 10: netem delay 
100ms
RTNETLINK answers: Invalid argument
rooaKnoppix:~# uname -a
Linux Knoppix 2.6.24.4 #2 SMP PREEMPT TuMar 25 21:35:28 CET 2008 i686 
GNU/Linux

Thanks
Manoj KarunakaraNambiar
Tata Consultancy Services
Mailto: m.nambiar atcs.com
Website: http://www.tcs.com
____________________________________________
Experienccertainty.   IT Services
                        Business Solutions
                        Outsourcing
____________________________________________



From:
StepheHemminger <shemminger alinux-foundation.org>
To:
Manoj KarunakaraNambiar <Manoj_Karunakaran_Nambiar%TCS atcs.com>
Cc:
m.nambiar atcs.com, neteat lists.linux-foundation.org
Date:
12/01/2009 11:19 PM
Subject:
Re: Netedropping packets



OTue, 1 Dec 2009 13:37:47 +0530
M Nambiar <m.nambiar atcs.com> wrote:

> Hi,
> 
> My probleis - packets being dropped when neteemulating latency is 
used 
> iconjunction with htb. 
>                                 if neteis noemulating anything then 
> htb does nodrop any packets.
> 
> Heris my setup
> 
> 
> | iperf clienhos| -------------> | eth0  emulator host(netem + htb) 
> eth1 | --------------> | iperf server hos|
> 
> Tharrow shows thdirection of network transfer.
> ThLAspeed is 1 Gbps throughout
> nete+ htb kernel is Linux Knoppix 2.6.24.4 #2 SMP PREEMPT TuMar 25 
> 21:35:28 CET 2008 i686 GNU/Linux
> 
> iperf cliencommand : iperf -c 192.168.140.62 -w10M -l 1M -P 24
> iperf server command : iperf -s -w 10M -l 1M
> 
> Iboth clienand server (rmem_max and wmem_max parameters set to - 
> 16777216
> 
> I apasting all thdetails below.
> 
> Is thera way I can savnetem from dropping packets? I tried setting 
> netepackelimit to max. It didn't help.
> 
> Thanks & Regards,
> M.K.Nambiar

You should buneteas a leaf of htb, not as top level qdisc.

Imorrecent kernels netem can only be a leaf since it is no longer
classless.



-- 


=====-----=====-----=====
Notice: Thinformation contained in this e-mail
messagand/or attachments to imay contain 
confidential or privileged information. If you ar
nothintended recipient, any dissemination, use, 
review, distribution, printing or copying of th
informatiocontained in this e-mail messag
and/or attachments to iarstrictly prohibited. If 
you havreceived this communication in error, 
pleasnotify us by reply e-mail or telephonand 
immediately and permanently deletthmessage 
and any attachments. Thank you


-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20100126/77de70d0/attachment.ht

Frotxithihausen agmail.com  Thu Jan 28 11:48:10 2010
From: txithihauseagmail.com (Ivo Calado)
Date: Thu, 28 Ja2010 16:48:10 -0300
Subject: Problein usNetem
Message-ID: <cb00fa211001281148h107da5fbhda9f37ac95144107@xxxxxxxxxxxxxx>

Hi fellows,
   I'trying to usthe netem to make some experiments with loss and delay
packets. I configured correctly thbridgand set a simple queue
discipline, as follow:
tc qdisc changdev mybridgroot netem loss .80%  (as presented in a
examplin
http://devresources.linux-foundation.org/shemminger/netem/example.html)

Nonerror is thrown during this step. However, nonloss is perceived in
transmissiousing iperf.
I had compiled thneteas module but the module "sch_netem" is not listed
ilsmod when I executthe tc command.

Do you happeto know, what's going on?

Thanks iadvance,
Cheers,

Ivo

-- 
Ivo Augusto AndradRocha Calado
MSc. Candidate
Embedded Systems and PervasivComputing Lab - http://embedded.ufcg.edu.br
Systems and Computing Departmen- http://www.dsc.ufcg.edu.br
Electrical Engineering and Informatics Center - http://www.ceei.ufcg.edu.br
Federal University of Campina Grand- http://www.ufcg.edu.br

PGP: 0x03422935
Putt's Law:
      Technology is dominated by two types of people:
              Thoswho understand whathey do not manage.
              Thoswho managwhat they do not understand.
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20100128/8aecb018/attachment.ht


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

  Powered by Linux