[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Clarify
Hi, Nithya!
I am not an expert at TC, but I'll try to figure out how this is
working.
>
> To measure the results we are doing a FTP from Machine C to Machine B
> and Machine A. But the results which we are getting are random.
Can you tell me how yo do this? I think you need a *really large* file
so the tests lasts enough to compare results.
> Sometimes
> the traffic from Machine C to Machine A gets more priority which ideally
> should not happen. Could anyone let me know why is this happening.
From what I see in the scripts, you are allocating the same bandwidth
to the different flows (5 Mbit each), and you are just allocating
different priorities.
Furthermore, I see another problem: the traffic is priorised on the
eth0 interface (your scheme is copied below), that is, the link between
the router and manchines A&B. However, you have *not* prioritised the
link between the router and machine C.
|----------|
| Machine A|--------
|(10.5.2.7)| |
|----------| |
|10.5.0.37 |--------|192.168.224.1
|----------------|
|----------| ROUTER |-----------------| Machine
C |
| eth0 |--------| eth1 |
(192.168.224.2)|
|-----------| |
|----------------|
| Machine B | |
| (10.5.2.1)|-------
|-----------|
As I see it, priorities only come into play when there is a congestion
problem: the outgoing interface can't send all incoming packets as soon
as they come. Then the higher-priority packets (ie: the ones with the
lowest "priority" value) are sent before the lower priority ones.
(PLEASE ANYONE CORRECT ME IF I'VE MADE A STUPID REMARK :)).
In this scenario you don't experience congestion. Boths interfaces run
at 10 Mbps (I presume), so all incoming packets are routed to the same
outgoing interface.
I am currently trying to simulate congestion by using different link
speeds. For example, the link between machine C and the Router could run
at 100 Mbps and the link between A, B and the router at 10 Mbps.
This way, when the router becomes "flooded" with incoming packets, it
should have to apply priorities to outgoing packets. Then
(theoretically), traffic to machine A should get prioritised.
As I've said, I am currently experimenting with this scheme, so I have
no results to show at the moment.
Regards,
Mariano Korman
>
> Also could you clarify the following:
>
> 1) Do we have to install the DiffServ Patches in all machines if we
> have to change the DS code point.
>
> 2) Where can i get more information about the TC commands. We are
> referring the following site :
>
> http://snafu.freedom.org/linux2.2/iproute-notes.html
>
> But after referring this site i'm not able to get a clear picture.
>
> Thanks in advance.
>
> Regards,
> Nithya
>
> Following is the script which we are running in the router
>
> ------------------------- START OF
> SCRIPT----------------------------------
>
> # Attaching Qdisc to eth0
>
> tc qdisc add dev eth0 root handle 1: cbq bandwidth 10Mbit cell 8 avpkt
> 1000 mpu 64
>
> # Attaching class to the queue
> tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate
> 10Mbit allot 1514 cell 8 weight 1Mbit prio 8 maxburst 20 avpkt 1000
>
> # Traffic to 10.5.2.1
> tc class add dev eth0 parent 1:1 classid 1:2 cbq bandwidth 10Mbit rate
> 5Mbit allot 1514 cell 8 weight 500Kbit prio 1 maxburst 20 avpkt 1000
>
> #traffic to 10.5.2.7
> tc class add dev eth0 parent 1:1 classid 1:3 cbq bandwidth 10Mbit rate
> 5Mbit allot 1514 cell 8 weight 500Kbit prio 7 maxburst 20 avpkt 1000
>
> #Adding the filter
> tc filter add dev eth0 parent 1:0 protocol ip prio 4 handle 1: u32
> divisor 1
>
> #Traffic to 10.5.2.1
> tc filter add dev eth0 parent 1:0 prio 4 u32 match ip src 192.168.224.2
> match ip dst 10.5.2.1 flowid 1:2
>
> #traffic to 10.5.2.7
>
> tc filter add dev eth0 parent 1:0 prio 4 u32 match ip src 192.169.224.2
> match ip dst 10.5.2.7 flowid 1:3
>
> --------------------------------END OF
> SCRIPT--------------------------------