Re: [LARTC] tcng + esfq

2007-05-17 Thread Corey Hickey
Sam LARTC wrote:
> FYI,
> 
>i've just created a quick patch adding esfq (Enhanced Stochastic
> Fairness queueing discipline) for tcng (Traffic Control Next
> Generation).
>   Patch is located at http://devel.dob.sk/tcng+esfq.
>   Enjoy.

I put a link to your patch page on the ESFQ page. Next time I make a
release I'll put a note in the README as well.

I don't use tcng, but I had a quick look at your patch and noticed a
very minor error:


diff -urN tcng/tcc/q_esfq.c tcng-sam/tcc/q_esfq.c
--- tcng/tcc/q_esfq.c   1970-01-01 01:00:00.0 +0100
+++ tcng-sam/tcc/q_esfq.c   2007-05-06 15:37:32.154594952 +0200
@@ -0,0 +1,78 @@
+/*
+ * q_esfq.c - Enhanced Statistical Fair Queuing qdisc


ESFQ stands for "Enhanced Stochastic Fairness Queueing".

That's all.

-Corey
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] High Latency With Tiered Queues

2007-05-17 Thread ISN Support Staff
Hello,

  I'm trying to setup what I thought would be a fairly basic tiered
shaping system.  I have a 6mbit (768kbps) link coming into my eth1
device, with my LAN IPs on the eth0 device.  I want to limit outgoing
traffic so that certain IPs are limited to 400kbps, with 3 classes under
that 400k so certain machines get prioritized (main servers in 1:21,
other servers in 1:22, workstations in 1:23)

  The problem is that when I turn this on, my packet latency jumps up by
50 to 100 times the normal rate.  I go from 10-20 ms ping times to
500-1600ms!  I've tried putting SFQ qdiscs under the classes, but that
makes no difference.

  I'm sure there is just some tuning parameter I'm not setting
correctly, but can somebody clue me in to what I'm doing wrong?  Or is
HTB just the wrong scheduler to be using here?  I tried CBQ, but I can't
get the tiers to work ( I keep getting RTNETLINK answers: Invalid
argument)  I'm currently using a single tiered CBQ solution, but it
really doesn't fit my needs.

Here's the full script:
---
qdisc add dev eth1 root handle 1: htb default 10
class add dev eth1 parent 1: classid 1:1 htb rate 768kbps
class add dev eth1 parent 1: classid 1:10 htb rate 250kbps ceil 768kbps
burst 6k
class add dev eth1 parent 1: classid 1:20 htb rate 100kbps ceil 400kbps
burst 6k
class add dev eth1 parent 1:20 classid 1:21 htb rate 75kbps ceil 375kbps
burst 6k
filter add dev eth1 parent 1: protocol ip prio 16 u32 match ip src
192.168.1.35 flowid 1:21
filter add dev eth1 parent 1: protocol ip prio 16 u32 match ip src
192.168.1.29 flowid 1:21
filter add dev eth1 parent 1: protocol ip prio 16 u32 match ip src
192.168.1.28 flowid 1:21
filter add dev eth1 parent 1: protocol ip prio 16 u32 match ip src
192.168.1.16 flowid 1:21
class add dev eth1 parent 1:20 classid 1:22 htb rate 15kbps ceil 350kbps
burst 6k
filter add dev eth1 parent 1: protocol ip prio 16 u32 match ip src
192.168.1.30 flowid 1:22
filter add dev eth1 parent 1: protocol ip prio 16 u32 match ip src
192.168.1.31 flowid 1:22
filter add dev eth1 parent 1: protocol ip prio 16 u32 match ip src
192.168.1.32 flowid 1:22
filter add dev eth1 parent 1: protocol ip prio 16 u32 match ip src
192.168.1.36 flowid 1:22
filter add dev eth1 parent 1: protocol ip prio 16 u32 match ip src
192.168.1.39 flowid 1:22
filter add dev eth1 parent 1: protocol ip prio 16 u32 match ip src
192.168.1.40 flowid 1:22
filter add dev eth1 parent 1: protocol ip prio 16 u32 match ip src
192.168.1.47 flowid 1:22
class add dev eth1 parent 1:20 classid 1:23 htb rate 10kbps ceil 200kbps
burst 6k
filter add dev eth1 parent 1: protocol ip prio 16 u32 match ip src
192.168.1.33 flowid 1:23
filter add dev eth1 parent 1: protocol ip prio 16 u32 match ip src
192.168.1.34 flowid 1:23
filter add dev eth1 parent 1: protocol ip prio 16 u32 match ip src
192.168.1.37 flowid 1:23


___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] Newbie: Route some traffic through a pptp tunnel

2007-05-17 Thread VladSun

Mogens Kjaer написа:

I have a centos 4 i386 machine that works like a
router (iptables filter, NAT) with two NIC's.

One NIC is connected to my ISP (100 Mbit FTTH),
I get a DHCP assigned public IP that changes
"sometimes". Most incoming ports are blocked
by my ISP.

In order to get a fixed IP and open ports, I
have to set up a PPTP tunnel to the ISP.

The default gw and the NAT'ing goes to this tunnel.

This is the output of ifconfig:

eth0 Link encap:Ethernet HWaddr 00:80:C8:EA:88:A7
inet addr:86.48.47.147 Bcast:86.48.47.255 Mask:255.255.254.0
inet6 addr: fe80::280:c8ff:feea:88a7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8083596 errors:0 dropped:0 overruns:0 frame:0
TX packets:3408048 errors:22 dropped:0 overruns:22 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1538901914 (1.4 GiB) TX bytes:519514046 (495.4 MiB)
Interrupt:169 Base address:0x4000

eth1 Link encap:Ethernet HWaddr 00:12:79:A0:3D:7E
inet addr:192.168.4.1 Bcast:192.168.4.255 Mask:255.255.255.0
inet6 addr: fe80::212:79ff:fea0:3d7e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:126264 errors:0 dropped:0 overruns:0 frame:0
TX packets:155536 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:23156937 (22.0 MiB) TX bytes:111015780 (105.8 MiB)
Interrupt:177

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:912424 errors:0 dropped:0 overruns:0 frame:0
TX packets:912424 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:103397649 (98.6 MiB) TX bytes:103397649 (98.6 MiB)

ppp0 Link encap:Point-to-Point Protocol
inet addr:86.48.43.19 P-t-P:81.19.236.186 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1000 Metric:1
RX packets:120948 errors:0 dropped:0 overruns:0 frame:0
TX packets:109043 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:80518167 (76.7 MiB) TX bytes:37434930 (35.7 MiB)

This works today, my problem is that the tunneled traffic is slower than
going through eth0 directly.

How can I:

1. Use the tunnel for incoming and outgoing mail and incoming http 
requests.

2. NAT traffic from eth1 to eth0, i.e. not through the tunnel
3. Local traffic from the router should access the internet through
eth0, except for outgoing mails.

Mogens



You may find the ROUTE iptables target useful for this.
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Newbie: Route some traffic through a pptp tunnel

2007-05-17 Thread Mogens Kjaer

I have a centos 4 i386 machine that works like a
router (iptables filter, NAT) with two NIC's.

One NIC is connected to my ISP (100 Mbit FTTH),
I get a DHCP assigned public IP that changes
"sometimes". Most incoming ports are blocked
by my ISP.

In order to get a fixed IP and open ports, I
have to set up a PPTP tunnel to the ISP.

The default gw and the NAT'ing goes to this tunnel.

This is the output of ifconfig:

eth0  Link encap:Ethernet  HWaddr 00:80:C8:EA:88:A7
  inet addr:86.48.47.147  Bcast:86.48.47.255  Mask:255.255.254.0
  inet6 addr: fe80::280:c8ff:feea:88a7/64 Scope:Link
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:8083596 errors:0 dropped:0 overruns:0 frame:0
  TX packets:3408048 errors:22 dropped:0 overruns:22 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:1538901914 (1.4 GiB)  TX bytes:519514046 (495.4 MiB)
  Interrupt:169 Base address:0x4000

eth1  Link encap:Ethernet  HWaddr 00:12:79:A0:3D:7E
  inet addr:192.168.4.1  Bcast:192.168.4.255  Mask:255.255.255.0
  inet6 addr: fe80::212:79ff:fea0:3d7e/64 Scope:Link
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:126264 errors:0 dropped:0 overruns:0 frame:0
  TX packets:155536 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:23156937 (22.0 MiB)  TX bytes:111015780 (105.8 MiB)
  Interrupt:177

loLink encap:Local Loopback
  inet addr:127.0.0.1  Mask:255.0.0.0
  inet6 addr: ::1/128 Scope:Host
  UP LOOPBACK RUNNING  MTU:16436  Metric:1
  RX packets:912424 errors:0 dropped:0 overruns:0 frame:0
  TX packets:912424 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:0
  RX bytes:103397649 (98.6 MiB)  TX bytes:103397649 (98.6 MiB)

ppp0  Link encap:Point-to-Point Protocol
  inet addr:86.48.43.19  P-t-P:81.19.236.186  Mask:255.255.255.255
  UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1000  Metric:1
  RX packets:120948 errors:0 dropped:0 overruns:0 frame:0
  TX packets:109043 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:3
  RX bytes:80518167 (76.7 MiB)  TX bytes:37434930 (35.7 MiB)

This works today, my problem is that the tunneled traffic is slower than
going through eth0 directly.

How can I:

1. Use the tunnel for incoming and outgoing mail and incoming http requests.
2. NAT traffic from eth1 to eth0, i.e. not through the tunnel
3. Local traffic from the router should access the internet through
eth0, except for outgoing mails.

Mogens


--
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: [EMAIL PROTECTED] Homepage: http://www.crc.dk
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] statistics and calc bandwidth traffic using tc -s qdisc show

2007-05-17 Thread Salatiel Filho

I use tc-viewer . It does a great job.
http://snaj.ath.cx/tc-viewer/tc-viewer.html


On 5/16/07, Pablo Fernandes Yahoo <[EMAIL PROTECTED]> wrote:


 Hello,



Is there someone here who knows what does it means?



The Sent part.



[EMAIL PROTECTED] ~]# tc -s qdisc show |grep -A 2 "qdisc sfq 140: dev eth0"

qdisc sfq 140: dev eth0 parent 1:140 limit 128p quantum 1514b perturb
10sec

 Sent 3155024 bytes 23249 pkt (dropped 0, overlimits 0 requeues 0)

 rate 0bit 0pps backlog 0b 0p requeues 0



[EMAIL PROTECTED] ~]# tc -s qdisc show |grep -A 2 "qdisc sfq 140: dev eth1"

qdisc sfq 140: dev eth1 parent 1:140 limit 128p quantum 1514b perturb
10sec

 Sent 41141183 bytes 32560 pkt (dropped 0, overlimits 0 requeues 0)

 rate 0bit 0pps backlog 0b 0p requeues 0





I also would like to know if there is a way to calc the bandwidth traffic
(in kbit for example)of this customer using this informations.



Thank you for any help in advance.



Pablo Fernandes



___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc





--
[]'s
Salatiel

"O maior prazer do inteligente é bancar o  idiota
  diante de um  idiota que banca o inteligente".
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] IPCLASSIFY - patch based on IPMARK

2007-05-17 Thread VladSun

Hello everybody!

Some time ago I've decided that using the MARK property of the Linux IP 
packet structure for the needs of traffic control is not very useful. So 
I wrote an iptables patch called IPCLASSIFY. It is fully based on IPMARK 
but it uses the PRIORITY field instead of MARK.


The relation between IPCLASSIFY<->CLASSIFY is the same as IPMARK<->MARK.
By using IPCLASSIFY not a single TC filter is needed any more! 
Additionally, the MARK field can be used for something else, more useful.


You can find  it here : 
http://openfmi.net/frs/download.php/385/IPCLASSIFY.tar.gz .


Fell free to report any bugs. :)

Have a nice day!

___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] statistics and calc bandwidth traffic using tc -s qdisc show

2007-05-17 Thread e . janz
[EMAIL PROTECTED] wrote on 16/05/2007 21:30:39:

> Hello,
> 
> Is there someone here who knows what does it means?
> 
> The Sent part.
> 
> [EMAIL PROTECTED] ~]# tc -s qdisc show |grep -A 2 "qdisc sfq 140: dev eth0"
> qdisc sfq 140: dev eth0 parent 1:140 limit 128p quantum 1514b perturb 
10sec
>  Sent 3155024 bytes 23249 pkt (dropped 0, overlimits 0 requeues 0)
>  rate 0bit 0pps backlog 0b 0p requeues 0
> 
> [EMAIL PROTECTED] ~]# tc -s qdisc show |grep -A 2 "qdisc sfq 140: dev eth1"
> qdisc sfq 140: dev eth1 parent 1:140 limit 128p quantum 1514b perturb 
10sec
>  Sent 41141183 bytes 32560 pkt (dropped 0, overlimits 0 requeues 0)
>  rate 0bit 0pps backlog 0b 0p requeues 0
> 
> 
> I also would like to know if there is a way to calc the bandwidth 
> traffic (in kbit for example)of this customer using this
> informations.
> 
> Thank you for any help in advance.
> 
> Pablo Fernandes
>  ___
> LARTC mailing list
> LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

Hi,

the "Sent" parameter shows you the amount of data that fall into this 
qdisc. You can obtain the instant bandwith usage that falls into this 
qdisc parsing the "rate" parameter. In your example the rate is 0bit, that 
means 0 bits per second bandwith usage.
I must admit that the output from tc -s is a big pain !!

Best regards,
Eric Janz 

--

ADVERTENCIA LEGAL
El contenido de este correo es confidencial y dirigido unicamente a su 
destinatario. Para acceder a su clausula de privacidad consulte 
http://www.barceloviajes.com/privacy

LEGAL ADVISORY
This message is confidential and intended only for the person or entity to 
which it is addressed. In order to read its privacy policy consult it at 
http://www.barceloviajes.com/privacy
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc