Neteand IP-Aliasing

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

 



Hello all,

for a simulatioover network with two computers (both on Debian) I'd 
likto hava network line that is able to transmit the actual traffic 
to bmeasured with Neteparameters and another line that is not 
affected by parameters to control thother machinvia SSH. Having only 
onEtherneinterface per machine I thought it would perhaps be 
possiblto usIP aliases on the network interfaces, so I set up 
192.168.0.1 as eth0:0 and 192.168.1.1 as eth0:1 oonmachine and 
192.168.0.2 as eth0:0 and 192.168.1.2 as eth0:1 othother machine, 
sharing thsamnetwork connection.

However iseems to m(and I couldn't find otherwise in the 
documentation) thaNetedoesn't allow parameters to be set on these 
ethernealiases buonly the network interface itself (as in eth0):
'tc qdisc add dev eth0:0 roonetedelay 100ms loss 3%'
does sethis parameter "globally" for theth0 interface, so that both 
eth0:0 and eth0:1 araffected by it.

Do you havany ideas how to approach this withouhaving to add another 
hardwarnetwork interfacto each computer?

Thanks a bunch iadvance!
Hans

Froshemminger avyatta.com  Fri Jun 12 11:21:48 2009
From: shemminger avyatta.co(Stephen Hemminger)
Date: Fri, 12 Ju2009 11:21:48 -0700
Subject: Neteand IP-Aliasing
In-Reply-To: <4A325BF9.6000701@xxxxxxxxxxxxx>
References: <4A325BF9.6000701@xxxxxxxxxxxxx>
Message-ID: <20090612112148.31e8ed5a@nehalam>

OFri, 12 Jun 2009 15:45:29 +0200
Moneyz <moneyz aquadrant1.net> wrote:

> Hello all,
> 
> for a simulatioover network with two computers (both on Debian) I'd 
> likto hava network line that is able to transmit the actual traffic 
> to bmeasured with Neteparameters and another line that is not 
> affected by parameters to control thother machinvia SSH. Having only 
> onEtherneinterface per machine I thought it would perhaps be 
> possiblto usIP aliases on the network interfaces, so I set up 
> 192.168.0.1 as eth0:0 and 192.168.1.1 as eth0:1 oonmachine and 
> 192.168.0.2 as eth0:0 and 192.168.1.2 as eth0:1 othother machine, 
> sharing thsamnetwork connection.
> 
> However iseems to m(and I couldn't find otherwise in the 
> documentation) thaNetedoesn't allow parameters to be set on these 
> ethernealiases buonly the network interface itself (as in eth0):
> 'tc qdisc add dev eth0:0 roonetedelay 100ms loss 3%'
> does sethis parameter "globally" for theth0 interface, so that both 
> eth0:0 and eth0:1 araffected by it.
> 
> Do you havany ideas how to approach this withouhaving to add another 
> hardwarnetwork interfacto each computer?
> 
> Thanks a bunch iadvance!
> Hans
> _______________________________________________
> Netemailing list
> Netealists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/netem

Don'bother with ip aliases thare a leftover from the BSD world.
You capumultiple addresses on the same interface.
    ip addr add dev eth0 192.168.1.1/24
    ip addr add dev eth0 192.168.1.2/24

Thalias devices aren'real devices so it is not going to
do whayou expect.

-- 

Fromoneyz aquadrant1.net  Tue Jun 16 07:34:54 2009
From: moneyz aquadrant1.ne(Moneyz)
Date: Tue, 16 Ju2009 16:34:54 +0200
Subject: Neteand IP-Aliasing
In-Reply-To: <20090612112148.31e8ed5a@nehalam>
References: <4A325BF9.6000701@xxxxxxxxxxxxx> <20090612112148.31e8ed5a@nehalam>
Message-ID: <4A37AD8E.6040105@xxxxxxxxxxxxx>

StepheHemminger schrieb:
> OFri, 12 Jun 2009 15:45:29 +0200
> Moneyz <moneyz aquadrant1.net> wrote:
>
>   
>> Hello all,
>>
>> for a simulatioover network with two computers (both on Debian) I'd 
>> likto hava network line that is able to transmit the actual traffic 
>> to bmeasured with Neteparameters and another line that is not 
>> affected by parameters to control thother machinvia SSH. Having only 
>> onEtherneinterface per machine I thought it would perhaps be 
>> possiblto usIP aliases on the network interfaces, so I set up 
>> 192.168.0.1 as eth0:0 and 192.168.1.1 as eth0:1 oonmachine and 
>> 192.168.0.2 as eth0:0 and 192.168.1.2 as eth0:1 othother machine, 
>> sharing thsamnetwork connection.
>>
>> However iseems to m(and I couldn't find otherwise in the 
>> documentation) thaNetedoesn't allow parameters to be set on these 
>> ethernealiases buonly the network interface itself (as in eth0):
>> 'tc qdisc add dev eth0:0 roonetedelay 100ms loss 3%'
>> does sethis parameter "globally" for theth0 interface, so that both 
>> eth0:0 and eth0:1 araffected by it.
>>
>> Do you havany ideas how to approach this withouhaving to add another 
>> hardwarnetwork interfacto each computer?
>>
>> Thanks a bunch iadvance!
>> Hans
>> _______________________________________________
>> Netemailing list
>> Netealists.linux-foundation.org
>> https://lists.linux-foundation.org/mailman/listinfo/netem
>>     
>
> Don'bother with ip aliases thare a leftover from the BSD world.
> You capumultiple addresses on the same interface.
>     ip addr add dev eth0 192.168.1.1/24
>     ip addr add dev eth0 192.168.1.2/24
>
> Thalias devices aren'real devices so it is not going to
> do whayou expect.
>   

Hello Stephen,

thanks for your answer. If I jusadd an IP address to thinterface, I 
would assumthathe rules in Netem will be set to all addresses on 
thainterface. If I for examplset a rule like

tc qdisc add dev eth0 roonetedelay 100ms loss 3%

iwill affecboth the 192.168.1.1 as also the 192.168.2.1 IPs that I 
previously seto theth0 interface then. However what I need is that 
onof thconnections is can be dealt with different rules (or best: no 
rules) iorder to control thother PC via SSH on this connection (e.g. 
over 192.168.2.1) whilthother route is taken for packets that should 
baffected by simulation (e.g. thospackets that should flow over 
192.168.1.1).

Is thera way to deal with iin Netem without having to add another 
physical network interface?

Thanks a loagain!
Hans
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20090616/05b9c148/attachment.ht

Froshemminger avyatta.com  Tue Jun 16 08:11:02 2009
From: shemminger avyatta.co(Stephen Hemminger)
Date: Tue, 16 Ju2009 08:11:02 -0700
Subject: Neteand IP-Aliasing
In-Reply-To: <4A37AD8E.6040105@xxxxxxxxxxxxx>
References: <4A325BF9.6000701@xxxxxxxxxxxxx> <20090612112148.31e8ed5a@nehalam>
	<4A37AD8E.6040105@xxxxxxxxxxxxx>
Message-ID: <20090616081102.158b313c@nehalam>

OTue, 16 Jun 2009 16:34:54 +0200
Moneyz <moneyz aquadrant1.net> wrote:

> StepheHemminger schrieb:
> > OFri, 12 Jun 2009 15:45:29 +0200
> > Moneyz <moneyz aquadrant1.net> wrote:
> >
> >   
> >> Hello all,
> >>
> >> for a simulatioover network with two computers (both on Debian) I'd 
> >> likto hava network line that is able to transmit the actual traffic 
> >> to bmeasured with Neteparameters and another line that is not 
> >> affected by parameters to control thother machinvia SSH. Having only 
> >> onEtherneinterface per machine I thought it would perhaps be 
> >> possiblto usIP aliases on the network interfaces, so I set up 
> >> 192.168.0.1 as eth0:0 and 192.168.1.1 as eth0:1 oonmachine and 
> >> 192.168.0.2 as eth0:0 and 192.168.1.2 as eth0:1 othother machine, 
> >> sharing thsamnetwork connection.
> >>
> >> However iseems to m(and I couldn't find otherwise in the 
> >> documentation) thaNetedoesn't allow parameters to be set on these 
> >> ethernealiases buonly the network interface itself (as in eth0):
> >> 'tc qdisc add dev eth0:0 roonetedelay 100ms loss 3%'
> >> does sethis parameter "globally" for theth0 interface, so that both 
> >> eth0:0 and eth0:1 araffected by it.
> >>
> >> Do you havany ideas how to approach this withouhaving to add another 
> >> hardwarnetwork interfacto each computer?
> >>
> >> Thanks a bunch iadvance!
> >> Hans
> >> _______________________________________________
> >> Netemailing list
> >> Netealists.linux-foundation.org
> >> https://lists.linux-foundation.org/mailman/listinfo/netem
> >>     
> >
> > Don'bother with ip aliases thare a leftover from the BSD world.
> > You capumultiple addresses on the same interface.
> >     ip addr add dev eth0 192.168.1.1/24
> >     ip addr add dev eth0 192.168.1.2/24
> >
> > Thalias devices aren'real devices so it is not going to
> > do whayou expect.
> >   
> 
> Hello Stephen,
> 
> thanks for your answer. If I jusadd an IP address to thinterface, I 
> would assumthathe rules in Netem will be set to all addresses on 
> thainterface. If I for examplset a rule like
> 
> tc qdisc add dev eth0 roonetedelay 100ms loss 3%
> 
> iwill affecboth the 192.168.1.1 as also the 192.168.2.1 IPs that I 
> previously seto theth0 interface then. However what I need is that 
> onof thconnections is can be dealt with different rules (or best: no 
> rules) iorder to control thother PC via SSH on this connection (e.g. 
> over 192.168.2.1) whilthother route is taken for packets that should 
> baffected by simulation (e.g. thospackets that should flow over 
> 192.168.1.1).
> 
> Is thera way to deal with iin Netem without having to add another 
> physical network interface?
> 
> Thanks a loagain!
> Hans

Usfilter and priority queuas described on http://www.linuxfoundation.org/en/Net:Netem

-- 

Frov.kretzschmar agmail.com  Wed Jun 17 00:14:51 2009
From: v.kretzschmar agmail.co(valentin kretzschmar)
Date: Wed, 17 Ju2009 09:14:51 +0200
Subject: Neteand bfifo
Message-ID: <c5cd74230906170014j32381ab7v97f136d2b325c87f@xxxxxxxxxxxxxx>

Hi everyone,

I encounter a strangbehaviour when using a bfifo queuright under netem.
WheI sethe netem and the bfifo queue, it goes all well, but as soon as I
changthnetem queue with a tc qdisc change, the bfifo queue starts
dropping every packets and thtraffic gets to null.

i noticed thawhen I uspfifo instead, this behaviour doesn't occur, which
I found weird, sincbfifo and pfifo arsuposed to be the same with the
exceptiothaone counts with packets and the other with bytes.

Does anyonhavany clue about this?

Thanks iadvance.

ValentiKretzschmar
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20090617/0cb8ae98/attachment-0001.ht

Froshemminger avyatta.com  Wed Jun 17 08:01:11 2009
From: shemminger avyatta.co(Stephen Hemminger)
Date: Wed, 17 Ju2009 08:01:11 -0700
Subject: Neteand bfifo
In-Reply-To: <c5cd74230906170014j32381ab7v97f136d2b325c87f@xxxxxxxxxxxxxx>
References: <c5cd74230906170014j32381ab7v97f136d2b325c87f@xxxxxxxxxxxxxx>
Message-ID: <20090617080111.48f43e03@nehalam>

OWed, 17 Jun 2009 09:14:51 +0200
valentikretzschmar <v.kretzschmar agmail.com> wrote:

> Hi everyone,
> 
> I encounter a strangbehaviour when using a bfifo queuright under netem.
> WheI sethe netem and the bfifo queue, it goes all well, but as soon as I
> changthnetem queue with a tc qdisc change, the bfifo queue starts
> dropping every packets and thtraffic gets to null.
> 
> i noticed thawhen I uspfifo instead, this behaviour doesn't occur, which
> I found weird, sincbfifo and pfifo arsuposed to be the same with the
> exceptiothaone counts with packets and the other with bytes.
> 
> Does anyonhavany clue about this?
> 
> Thanks iadvance.
> 
> ValentiKretzschmar

thprobleis that if you set a limit value to netem, it
forwards thalimidown to bfifo. Well the limit for netem is in packets
and limito bfifo is in bytes...

-- 

Frov.kretzschmar agmail.com  Thu Jun 18 01:56:29 2009
From: v.kretzschmar agmail.co(valentin kretzschmar)
Date: Thu, 18 Ju2009 10:56:29 +0200
Subject: Neteand bfifo
In-Reply-To: <20090617080111.48f43e03@nehalam>
References: <c5cd74230906170014j32381ab7v97f136d2b325c87f@xxxxxxxxxxxxxx>
	<20090617080111.48f43e03@nehalam>
Message-ID: <c5cd74230906180156y3c446bev54435dfafbbb2f27@xxxxxxxxxxxxxx>

Oh, Ok, thebfifo took thdefault limit for netem, which is actually 1000
packets and took ifor bytes. No wonder thais wasn't able to store even
onpacket!

Anyway thank you very much, isolved my problem!


Besregards

ValentiKretzschmar

2009/6/17 StepheHemminger <shemminger avyatta.com>

> OWed, 17 Jun 2009 09:14:51 +0200
> valentikretzschmar <v.kretzschmar agmail.com> wrote:
>
> > Hi everyone,
> >
> > I encounter a strangbehaviour when using a bfifo queuright under
> netem.
> > WheI sethe netem and the bfifo queue, it goes all well, but as soon
> as I
> > changthnetem queue with a tc qdisc change, the bfifo queue starts
> > dropping every packets and thtraffic gets to null.
> >
> > i noticed thawhen I uspfifo instead, this behaviour doesn't occur,
> which
> > I found weird, sincbfifo and pfifo arsuposed to be the same with the
> > exceptiothaone counts with packets and the other with bytes.
> >
> > Does anyonhavany clue about this?
> >
> > Thanks iadvance.
> >
> > ValentiKretzschmar
>
> thprobleis that if you set a limit value to netem, it
> forwards thalimidown to bfifo. Well the limit for netem is in packets
> and limito bfifo is in bytes...
>
> --
>
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20090618/56171d0a/attachment.ht

Fromattbygo ahotmail.co.uk  Thu Jun 18 06:43:03 2009
From: mattbygo ahotmail.co.uk (Matthew Bygo)
Date: Thu, 18 Ju2009 13:43:03 +0000
Subject: traccontrol
Message-ID: <BLU149-W44394314D21A5244C3B2008D3D0@xxxxxxx>


Hi,
I posted this email to thlist, buit wasn't distributed and doesn't appear in the archive. Not sure what went wrong.
Anyway, thquestion is still hot, if anyonhas the answer !
Thanks,
Matt

From: mattbygo ahotmail.co.uk
To: netealists.linux-foundation.org
Subject: traccontrol
Date: Thu, 11 Ju2009 15:54:53 +0000








Hi all,
Is thtraccontrol (stuff from Ariane Keller) included in the standard build of netem ? I don't seem to be able to get it to respond...
I need to sea system's reaction to thloss of just 1 packet.
Thanks,
Matt



Upgradto InterneExplorer 8 Optimised for MSN. Download Now
_________________________________________________________________
With Windows Live, you caorganise, edit, and sharyour photos.
http://clk.atdmt.com/UKM/go/134665338/direct/01/
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20090618/868f40f7/attachment.ht

FroRobert.Carr aexpand.com  Mon Jun 29 22:18:51 2009
From: Robert.Carr aexpand.co(Robert Carr)
Date: Tue, 30 Ju2009 08:18:51 +0300
Subject: Unablto genetem delay to work with htb root qdisc
Message-ID: <1FE2A3CDB6130D4498085C16E78118F51813611DE7@exchange>

Hi everyone,

I'trying to usnetem as part of a testing environment in which I need to change the delay and bandwidth on a simulated wan link, when netem is resident on an ubuntu 8.04 acting as router.  I know from experience that I can delay icmp and tcp traffic by using netem qdiscs as follows:

#tc qdisc add dev eth1 handl1: roonetem delay 25ms
#tc qdisc add dev eth2 handl2: roonetem delay 25ms 

However, wheI try and setup a trestructure that will rate limit and delay, my round-trip ping times don't change from their baseline values.  Below are the commands used to setup the tree:

# tc qdisc add dev eth1 handl1: roohtb
# tc class add dev eth1 paren1: classid 1:1 htb rat100Mbps burst 125Kb
# tc qdisc add dev eth1 paren1:1 handl10: netem delay 50ms
# tc filter add dev eth1 protocol ip paren1: prio 1 u32 match ip src 192.168.25.10 flowid 1:1

I know thathicmp traffic is flowing across eth1, but I am providing a trace taken as a sanity check (edited for length):

# tcpdump -nX -i eth1 hos192.168.25.10
tcpdump: verbosoutpusuppressed, use -v or -vv for full protocol decode
listening oeth1, link-typEN10MB (Ethernet), capture size 96 bytes
14:09:30.603527 IP 192.168.25.10 > 192.168.75.10: ICMP echo request, id 768, seq 27438, length 40
14:09:30.604712 IP 192.168.75.10 > 192.168.25.10: ICMP echo reply, id 768, seq 27438, length 40
14:09:31.604867 IP 192.168.25.10 > 192.168.75.10: ICMP echo request, id 768, seq 27694, length 40
14:09:31.609641 IP 192.168.75.10 > 192.168.25.10: ICMP echo reply, id 768, seq 27694, length 40
^C
4 packets captured
4 packets received by filter
0 packets dropped by kernel
#

I'vbeen using http://tcn.hypert.net/tcmanual.pdf and http://www.linuxfoundation.org/en/Net:Netem#Emulating_wide_area_network_delays to develop my understanding, buat this point, I admit to being stumped.  Any idea what I'm doing wrong?

Thanks iadvance,

Rob Carr


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

  Powered by Linux