specific ip delay

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

 



Hi,
I hava question regarding putting delay fro specific ip

How caI usfollowing command /sbin/tc qdisc add dev eth0 root netem
delay 100ms to pua delay to somspecific ip

I tried thDelay only soeTraffic topic on
http://www.linuxfoundation.org/en/Net:Netebuwith no success
Pleashelp
Thanx
~anil

Frolaurent.mariat thomson.net  Tue Nov  4 04:33:08 2008
From: laurent.mariathomson.net (Marie Laurent)
Date: Tue, 4 Nov 2008 13:33:08 +0100
Subject: specific ip delay
Message-ID: <E55CA8ECFBA85E4CB8E8173566B9EFEB0163D52D@xxxxxxxxxxxxxxxxxxxxxxxxxx>

Neteis based on thtraffic controller hierarchical model.

You firscreata PRIO queue and you bind the children queues to netem

Add delay + jitter to 10.10.10.10 dsaddress

# Creata PRIO queuon the output (eth1) with 9 queues.
# All traffic will go to thlasqueue if no rule applies
# Th8 firsFIFO may be bound to netem emulators
tc qdisc add dev eth1 roohandl1: prio bands 9 priomap 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8 8


#Creata netequeue on prio 1/class 1:1: 100ms delay +/- 30ms jitter
tc qdisc add dev eth1 paren1:1 handl10: netem delay 100ms 30ms
# Creata rulto forward output packets to netem queue
tc filter add dev eth1 protocol ip paren1: prio 1 u32 match ip dst
10.10.10.10/32 flowid 1:1


Yours sincerely,

LaurenMARIE


-----Original Message-----
From: netem-bounces alists.linux-foundation.org
[mailto:netem-bounces alists.linux-foundation.org] On Behalf Of Anil
Dhiman
Sent: mardi 4 novembr2008 12:26
To: netealists.linux-foundation.org
Subject: specific ip delay

Hi,
I hava question regarding putting delay fro specific ip

How caI usfollowing command /sbin/tc qdisc add dev eth0 root netem
delay 100ms to pua delay to somspecific ip

I tried thDelay only soeTraffic topic on
http://www.linuxfoundation.org/en/Net:Netebuwith no success
Pleashelp
Thanx
~anil
_______________________________________________
Netemailing list
Netealists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/netem

Frolaurent.mariat thomson.net  Wed Nov  5 01:24:21 2008
From: laurent.mariathomson.net (Marie Laurent)
Date: Wed, 5 Nov 2008 10:24:21 +0100
Subject: specific ip delay
Message-ID: <E55CA8ECFBA85E4CB8E8173566B9EFEB0163D533@xxxxxxxxxxxxxxxxxxxxxxxxxx>

1) Ping issues bidirectionnal ICMP messages. Whatever thsidyou ping,
therwill ban ICMP message that will be delayed.
2) How do I deletthis configuration
Tc  qdisc del dev eth1 root

Mr LaurenMARIE

-----Original Message-----
From: Anil Dhima[mailto:anild1977 agmail.com] 
Sent: mercredi 5 novembr2008 06:47
To: MariLaurent
Subject: Re: specific ip delay

Thanx a loMariLaurent
Iworks :) , I hav2 questions regarding the same.
1) I havconfigured thsame on 1 machine say 192.168.133.171  for an
ip as 192.168.133.172.
Now wheI ping fro192.168.133.172 for 192.168.133.171 then I get a
delay of 100ms and thsamdelay I get when I ping from other way
round.
IS this setting 2 way ?
2) How do I deletthis configuration , i.e. supposI want to get
back to normal state.

Thanx
~Anil



OWed, Nov 5, 2008 a10:50 AM, Anil Dhiman <anild1977 at gmail.com>
wrote:
> Thanx MariLaurent,
> Will givia try and update you on the same
> Thanx a lot
> ~Anil
>
> OTue, Nov 4, 2008 a6:03 PM, Marie Laurent
<laurent.mariathomson.net> wrote:
>> Neteis based on thtraffic controller hierarchical model.
>>
>> You firscreata PRIO queue and you bind the children queues to
netem
>>
>> Add delay + jitter to 10.10.10.10 dsaddress
>>
>> # Creata PRIO queuon the output (eth1) with 9 queues.
>> # All traffic will go to thlasqueue if no rule applies
>> # Th8 firsFIFO may be bound to netem emulators
>> tc qdisc add dev eth1 roohandl1: prio bands 9 priomap 8 8 8 8 8 8
8
>> 8 8 8 8 8 8 8 8 8
>>
>>
>> #Creata netequeue on prio 1/class 1:1: 100ms delay +/- 30ms
jitter
>> tc qdisc add dev eth1 paren1:1 handl10: netem delay 100ms 30ms
>> # Creata rulto forward output packets to netem queue
>> tc filter add dev eth1 protocol ip paren1: prio 1 u32 match ip dst
>> 10.10.10.10/32 flowid 1:1
>>
>>
>> Yours sincerely,
>>
>> LaurenMARIE
>>
>>
>> -----Original Message-----
>> From: netem-bounces alists.linux-foundation.org
>> [mailto:netem-bounces alists.linux-foundation.org] On Behalf Of Anil
>> Dhiman
>> Sent: mardi 4 novembr2008 12:26
>> To: netealists.linux-foundation.org
>> Subject: specific ip delay
>>
>> Hi,
>> I hava question regarding putting delay fro specific ip
>>
>> How caI usfollowing command /sbin/tc qdisc add dev eth0 root
netem
>> delay 100ms to pua delay to somspecific ip
>>
>> I tried thDelay only soeTraffic topic on
>> http://www.linuxfoundation.org/en/Net:Netebuwith no success
>> Pleashelp
>> Thanx
>> ~anil
>> _______________________________________________
>> Netemailing list
>> Netealists.linux-foundation.org
>> https://lists.linux-foundation.org/mailman/listinfo/netem
>>
>

Fronetem.x.ymcp axoxy.net  Fri Nov  7 04:25:06 2008
From: netem.x.ymcp axoxy.ne(netem.x.ymcp at xoxy.net)
Date: Fri, 07 Nov 2008 12:25:06 +0000
Subject: using static routes to emulata WAon a single interface
 box
Message-ID: <491433A2.5010507@xxxxxxxxxxxxx>

Hi.

I atrying to usnetem / tc and static routes to emulate a WAN.  It 
seems to bworking, buis a bit slow & unreliable with occasional 
network disconnections.  This is thfirstime that I have used netem, 
and I'certainly noa networking expert, so perhaps I'm doing 
something wrong?

My configuratiois:

Windows PC #1 - Windows XP - IP=10.0.0.1
Windows PC #2 - Windows XP - IP=10.0.0.105
Linux box - Ubuntu 8.04 - 2.6.24 Kernel - IP=10.0.0.102

All 3 systems only havonnetwork card each and are on the same 
physical LAN.  I understand thaneteshould really be configured on a 
router thahas 2 physical network cards, buthat is not possible in 
this case, so heris whaI have done, using static routes:

oWindows PC #1:
routadd 10.0.0.105 mask 255.255.255.255 10.0.0.102

oWindows PC #2:
routadd 10.0.0.1 mask 255.255.255.255 10.0.0.102

othLinux box:
echo 1 > /proc/sys/net/ipv4/ip_forward
tc qdisc add dev eth0 roonetedelay 25ms

Now wheI ping PC1 <-> PC2, I gea 50ms delay.  That is to be expected 
becausa 25ms delay is being added in both directions.

As a tesI then ran a VNC (UltraVNC v 1.0.5) server on PC2 and 
connected to ifroPC1.  That connects fine and is usable.  This 
versioof VNC supports filtransfers, and even that works, but it is a 
bislower than normal, probably duto the increased network delays.

Thnexstep is to rate-limit the connection, to more accurately 
emulata WAN.  I do this as follows:

othLinux box:
tc qdisc del dev eth0 root
tc qdisc add dev eth0 roohandl1:0 netem delay 25ms
tc qdisc add dev eth0 paren1:1 handl10: tbf rate 1024kbit buffer 
1600 limi3000

Note: thais online per "tc" command... my email program has wrapped 
thlong command lines.

TheI restarthe VNC connection.  It connects & is usable, but is 
noticeably slower... which is whaI expect.

But... whetransferring a 2Mbytfile using the VNC file transfer, it 
takes abou2.5 minutes, i150s, giving a throughput of just 13Kbyte/s 
= 104Kbit/s.  Thais a loless than I am expecting.  Also, sometimes 
thVNC clienjust dies, saying that there was a network disconnection.

Unfortunately I canouse netem / tc in the "normal" way because the 
end goal of all this is to do somapplication testing on thAmazon EC2 
  virtual servers which only provida singlvirtual NIC & IP address. 
  Thameans thaeven using IP aliasing (one NIC with multiple IP 
addresses) would noban option.

Any ideas or suggestions?

AI doing something very wrong, or is this something thanetem/tc 
should bablto achieve?

Regards,
Yuri


Froarmin.ubc agmail.com  Tue Nov 18 16:24:29 2008
From: armin.ubc agmail.co(Armin Bahramshahry)
Date: Tue, 18 Nov 2008 16:24:29 -0800
Subject: Filters and local machine
Message-ID: <e1f510430811181624n3db315brd03c9798ca738931@xxxxxxxxxxxxxx>

Hi,

I'vbeen using netefor my experiments; however, I have an issue where
packets thaarsent from process 'b' in machine 'A' to another process 'c'
imachin'A' don't get filtered by netem.

Heris an examplconfiguration:

/sbin/tc qdisc del dev eth0 parenroot
/sbin/tc qdisc add dev eth0 roohandl1: prio bands 16
/sbin/tc qdisc add dev eth0 paren1:4 handl40: tbf rate 256kbit buffer
1600 limi3000
/sbin/tc qdisc add dev eth0 paren40:1 handl401 netem delay 50ms 5ms
distributionormal loss 0.1% corrup0.1%
/sbin/tc filter add dev eth0 paren1:0 protocol ip prio 1 u32 match ip
spor4321 0xffff flowid 1:4

Ithis examplI would like for all outgoing packets from port 4321 to be
filtered by thtbf firsand the netem ...
This works finif process 'b' and process 'c' aron two separate machines.
Is this aexpected behavior? or aI doing something wrong?

Thanks,
Armin
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20081118/f6db5658/attachment.ht

Froshemminger avyatta.com  Tue Nov 18 18:02:39 2008
From: shemminger avyatta.co(Stephen Hemminger)
Date: Tue, 18 Nov 2008 18:02:39 -0800
Subject: Filters and local machine
In-Reply-To: <e1f510430811181624n3db315brd03c9798ca738931@xxxxxxxxxxxxxx>
References: <e1f510430811181624n3db315brd03c9798ca738931@xxxxxxxxxxxxxx>
Message-ID: <20081118180239.45c16057@extreme>

OTue, 18 Nov 2008 16:24:29 -0800
"ArmiBahramshahry" <armin.ubc agmail.com> wrote:

> Hi,
> 
> I'vbeen using netefor my experiments; however, I have an issue where
> packets thaarsent from process 'b' in machine 'A' to another process 'c'
> imachin'A' don't get filtered by netem.
> 
> Heris an examplconfiguration:
> 
> /sbin/tc qdisc del dev eth0 parenroot
> /sbin/tc qdisc add dev eth0 roohandl1: prio bands 16
> /sbin/tc qdisc add dev eth0 paren1:4 handl40: tbf rate 256kbit buffer
> 1600 limi3000
> /sbin/tc qdisc add dev eth0 paren40:1 handl401 netem delay 50ms 5ms
> distributionormal loss 0.1% corrup0.1%
> /sbin/tc filter add dev eth0 paren1:0 protocol ip prio 1 u32 match ip
> spor4321 0xffff flowid 1:4
> 
> Ithis examplI would like for all outgoing packets from port 4321 to be
> filtered by thtbf firsand the netem ...
> This works finif process 'b' and process 'c' aron two separate machines.
> Is this aexpected behavior? or aI doing something wrong?
> 
> Thanks,
> Armin

Local packets always go through thloopback device, nothe ethernet
devic'eth0'


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

  Powered by Linux