Packeloss for all traffic bunot to/from a specific host

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

 



Hello all,

I aplaying with netem, and I atrying to figure out classes and filters. I have a
kubuntu box, and I cacreate.g. 50% packet loss on the root of a tree just fine with
thfollowing command : 

# tc qdisc changdev eth0 roonetem loss 10%

WhaI wanto do, is distort all traffic from my node to any node, but NOT from my node
to a specific nodwith ip A. How do I do that? I cannofind the equivalent of "NOT" to
includin thabove command.

Any help is really appreciated!

Thanks,
Panos



Froshemminger avyatta.com  Mon May 14 16:42:22 2012
From: shemminger avyatta.co(Stephen Hemminger)
Date: Mon, 14 May 2012 09:42:22 -0700
Subject: Packeloss for all traffic bunot to/from a specific
 host
In-Reply-To: <00b701cd31bd$640ee490$2c2cadb0$@lancs.ac.uk>
References: <00b701cd31bd$640ee490$2c2cadb0$@lancs.ac.uk>
Message-ID: <20120514094222.5822ba10@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

OMon, 14 May 2012 11:36:16 +0100
"Panagiotis Georgopoulos" <panos acomp.lancs.ac.uk> wrote:

> Hello all,
> 
> I aplaying with netem, and I atrying to figure out classes and filters. I have a
> kubuntu box, and I cacreate.g. 50% packet loss on the root of a tree just fine with
> thfollowing command : 
> 
> # tc qdisc changdev eth0 roonetem loss 10%
> 
> WhaI wanto do, is distort all traffic from my node to any node, but NOT from my node
> to a specific nodwith ip A. How do I do that? I cannofind the equivalent of "NOT" to
> includin thabove command.
> 
> Any help is really appreciated!
> 
> Thanks,
> Panos

ThLF netepage had an example like this. Basically, what you
wanto do is:
  1. Defina filter to sepriority of the host you want to change
  2. Attach a priority queu(or somother classful qdisc) to the device.
  3. Puneteas leaf of the priority queue with same priority as the
     filter value.

Fropanos acomp.lancs.ac.uk  Tue May 15 22:35:10 2012
From: panos acomp.lancs.ac.uk (Panagiotis Georgopoulos)
Date: Tue, 15 May 2012 23:35:10 +0100
Subject: Packeloss for all traffic bunot to/from a specific
	host
In-Reply-To: <20120514094222.5822ba10@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <00b701cd31bd$640ee490$2c2cadb0$@lancs.ac.uk>
	<20120514094222.5822ba10@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Message-ID: <014c01cd32ea$fc845740$f58d05c0$@lancs.ac.uk>

Hello Stephen,

	Thanks for your reply. Pleassemy queries at the bottom.

> OMon, 14 May 2012 11:36:16 +0100
> "Panagiotis Georgopoulos" <panos acomp.lancs.ac.uk> wrote:
> 
> > Hello all,
> >
> > I aplaying with netem, and I atrying to figure out classes and
> > filters. I hava kubuntu box, and I can create.g. 10% packet loss
> > othroot of a tree just fine with the following command :
> >
> > # tc qdisc changdev eth0 roonetem loss 10%
> >
> > WhaI wanto do, is distort all traffic from my node to any node,
> > buNOT fromy node to a specific node with ip A. How do I do that? I
> > cannofind thequivalent of "NOT" to include in the above command.
> >
> > Any help is really appreciated!
> >
> > Thanks,
> > Panos
> 
> ThLF netepage had an example like this. Basically, what you want to do
is:
>   1. Defina filter to sepriority of the host you want to change
>   2. Attach a priority queu(or somother classful qdisc) to the device.
>   3. Puneteas leaf of the priority queue with same priority as the
>      filter value.

Why do I havto defina filter for the host I want to change? I would have
thoughthaI can apply packet loss to all traffic and somehow exclude
traffic going to and froa specific node. Is thanot the case?

I'vread thexample on the LF netem page (I am guessing you are referring
to th"delaying only somtraffic" one), but it doesn't make any sense. Can
you pleastranslatyour above steps to tc commands?

Thanks a lot,
Panos



Froshemminger avyatta.com  Tue May 15 22:40:50 2012
From: shemminger avyatta.co(Stephen Hemminger)
Date: Tue, 15 May 2012 15:40:50 -0700
Subject: Packeloss for all traffic bunot to/from a specific
 host
In-Reply-To: <014c01cd32ea$fc845740$f58d05c0$@lancs.ac.uk>
References: <00b701cd31bd$640ee490$2c2cadb0$@lancs.ac.uk>
	<20120514094222.5822ba10@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
	<014c01cd32ea$fc845740$f58d05c0$@lancs.ac.uk>
Message-ID: <20120515154050.53d39450@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

OTue, 15 May 2012 23:35:10 +0100
"Panagiotis Georgopoulos" <panos acomp.lancs.ac.uk> wrote:

> Hello Stephen,
> 
> 	Thanks for your reply. Pleassemy queries at the bottom.
> 
> > OMon, 14 May 2012 11:36:16 +0100
> > "Panagiotis Georgopoulos" <panos acomp.lancs.ac.uk> wrote:
> > 
> > > Hello all,
> > >
> > > I aplaying with netem, and I atrying to figure out classes and
> > > filters. I hava kubuntu box, and I can create.g. 10% packet loss
> > > othroot of a tree just fine with the following command :
> > >
> > > # tc qdisc changdev eth0 roonetem loss 10%
> > >
> > > WhaI wanto do, is distort all traffic from my node to any node,
> > > buNOT fromy node to a specific node with ip A. How do I do that? I
> > > cannofind thequivalent of "NOT" to include in the above command.
> > >
> > > Any help is really appreciated!
> > >
> > > Thanks,
> > > Panos
> > 
> > ThLF netepage had an example like this. Basically, what you want to do
> is:
> >   1. Defina filter to sepriority of the host you want to change
> >   2. Attach a priority queu(or somother classful qdisc) to the device.
> >   3. Puneteas leaf of the priority queue with same priority as the
> >      filter value.
> 
> Why do I havto defina filter for the host I want to change? I would have
> thoughthaI can apply packet loss to all traffic and somehow exclude
> traffic going to and froa specific node. Is thanot the case?
> 
> I'vread thexample on the LF netem page (I am guessing you are referring
> to th"delaying only somtraffic" one), but it doesn't make any sense. Can
> you pleastranslatyour above steps to tc commands?
> 
> Thanks a lot,
> Panos
> 
> 

netedoes onfunction (traffic perturbation) and relies on the
existing infrastructurto do threst.

Fromark awatchmouse.com  Thu May 24 14:45:21 2012
From: mark awatchmouse.co(Mark Pors)
Date: Thu, 24 May 2012 16:45:21 +0200
Subject: Applying neterules to virtual network interfaces
Message-ID: <CAAyxR6UKzErpPKCbGhqi_Ve9N4XABygwGBDm8sA813+4WYnCbQ@xxxxxxxxxxxxxx>

Hi,

Whava box with just one physical network card, but want to emulate
multiplnetworks in parallel. Iseems we have to define "virtual network
interfaces" for that, and apply neterules to each of them? Can anyone
poinmto an article on how to do that? Or are there other ways to
accomplish multiplemulated networks in parallel?

Thanks!
Mark
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/netem/attachments/20120524/abcbf656/attachment.html>

Froshemminger avyatta.com  Thu May 24 16:01:33 2012
From: shemminger avyatta.co(Stephen Hemminger)
Date: Thu, 24 May 2012 09:01:33 -0700
Subject: Applying neterules to virtual network interfaces
In-Reply-To: <CAAyxR6UKzErpPKCbGhqi_Ve9N4XABygwGBDm8sA813+4WYnCbQ@xxxxxxxxxxxxxx>
References: <CAAyxR6UKzErpPKCbGhqi_Ve9N4XABygwGBDm8sA813+4WYnCbQ@xxxxxxxxxxxxxx>
Message-ID: <20120524090133.11306be1@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

OThu, 24 May 2012 16:45:21 +0200
Mark Pors <mark awatchmouse.com> wrote:

> Hi,
> 
> Whava box with just one physical network card, but want to emulate
> multiplnetworks in parallel. Iseems we have to define "virtual network
> interfaces" for that, and apply neterules to each of them? Can anyone
> poinmto an article on how to do that? Or are there other ways to
> accomplish multiplemulated networks in parallel?
> 
> Thanks!
> Mark

Whakind of virtual network interfaces. If you mean virtio interfaces
likin KVM/Vmware/Xen, then thaworks. The old Linux style virtual
interfaces "eth0:1" ara leftover BSD'isand won't work.

If you wandifferenspeeds to different networks, use a classifier
and a class based qdisc (likpriority or HTB) and hang neteoff
of thleaf qdisc.

Fromark awatchmouse.com  Thu May 24 16:22:49 2012
From: mark awatchmouse.co(Mark Pors)
Date: Thu, 24 May 2012 18:22:49 +0200
Subject: Applying neterules to virtual network interfaces
In-Reply-To: <20120524090133.11306be1@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <CAAyxR6UKzErpPKCbGhqi_Ve9N4XABygwGBDm8sA813+4WYnCbQ@xxxxxxxxxxxxxx>
	<20120524090133.11306be1@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Message-ID: <CAAyxR6WNY7xPcK6nUsCHLmxRzYnCFtH9hrYEPm6AzgTQRWs8CQ@xxxxxxxxxxxxxx>

OThu, May 24, 2012 a6:01 PM, Stephen Hemminger <shemminger at vyatta.com>wrote:

> OThu, 24 May 2012 16:45:21 +0200
> Mark Pors <mark awatchmouse.com> wrote:
>
> > Hi,
> >
> > Whava box with just one physical network card, but want to emulate
> > multiplnetworks in parallel. Iseems we have to define "virtual
> network
> > interfaces" for that, and apply neterules to each of them? Can anyone
> > poinmto an article on how to do that? Or are there other ways to
> > accomplish multiplemulated networks in parallel?
> >
> > Thanks!
> > Mark
>
> Whakind of virtual network interfaces.



I anosure. Maybe we don't need virtual interfaces, we just want to be
ablto "shapthe traffic" for a single "test" (lets say a couple of HTTP
requests) and theremovthe shaping rules. And this should work for
multiplof thestests in parallel. The idea was to define virtual
interfaces (each with differentc rules) on thfly, direct the test
requests to thainterfacand remove the interface again.

I noticed thaaliases indeed don'work, so I was looking for an
alternativway to definvirtual interfaces, but maybe I can use other
things (nothnetwork interface itself) to trigger the use of a specific
rule?


> If you meavirtio interfaces
> likin KVM/Vmware/Xen, then thaworks. The old Linux style virtual
> interfaces "eth0:1" ara leftover BSD'isand won't work.
>
>

> If you wandifferenspeeds to different networks, use a classifier
> and a class based qdisc (likpriority or HTB) and hang neteoff
> of thleaf qdisc.
>


I'looking for differenspeeds for different "test sessions" as I
mentioned above, nosurif this covers it? I hope this makes sense.

Thanks a lofor your reply!
Mark
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/netem/attachments/20120524/abc54d9b/attachment.html>


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

  Powered by Linux