All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] tcng ingress examples
@ 2003-11-26  9:14 Alex Ongena
  2003-11-29 19:50 ` Jacob Teplitsky
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Ongena @ 2003-11-26  9:14 UTC (permalink / raw)
  To: lartc

Hi,

I'am looking for tcng examples where ingress is used.
Please post me some (working) examples, no need for explanation.

Thank you
Alex

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LARTC] tcng ingress examples
  2003-11-26  9:14 [LARTC] tcng ingress examples Alex Ongena
@ 2003-11-29 19:50 ` Jacob Teplitsky
  0 siblings, 0 replies; 2+ messages in thread
From: Jacob Teplitsky @ 2003-11-29 19:50 UTC (permalink / raw)
  To: lartc

> Hi,

> I'am looking for tcng examples where ingress is used.
> Please post me some (working) examples, no need for explanation.

> Thank you
> Alex

Here is an example of ingress policing.
I haven't tested this script under Linux.
- Jacob

dev "s0e0" {
    ingress {
	$from_c1_net = ip_src:24 = 10.10.1.0;
	$c1_ssh_cir = 20Mbps;
	$c1_ssh_pir = 30Mbps;
	$c1_http_cir = 120Mbps;
	$c1_http_pir = 200Mbps;
	$c1_other_cir = 60Mbps;
	$c1_other_pir = 100Mbps;

	$from_c1_ssh = $from_c1_net && tcp_sport = PORT_SSH;
	$c1_ssh_pol = DLB(cir $c1_ssh_cir,cbs 20kB,pir $c1_ssh_pir,pbs 5kB);

	class (<>)
	    if $from_c1_ssh && DLB_ok($c1_ssh_pol);
	drop if $from_c1_ssh;

	$from_c1_http = $from_c1_net && tcp_sport = PORT_HTTP;
	$c1_http_pol = DLB(cir $c1_http_cir,cbs 50kB,pir $c1_http_pir,pbs 20kB);

	class (<>)
	    if $from_c1_http && DLB_ok($c1_http_pol);
	drop if $from_c1_http;

	$from_c1_other = $from_c1_net;
	$c1_other_pol 	  DLB(cir $c1_other_cir,cbs 30kB,pir $c1_other_pir,pbs 20kB);

	class (<>)
	    if $from_c1_other && DLB_ok($c1_other_pol);
	drop if $from_c1_other;

	/*
	 * Second customer, etc.
	 */

	class (<>) if 1;
    }
}
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-29 19:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-26  9:14 [LARTC] tcng ingress examples Alex Ongena
2003-11-29 19:50 ` Jacob Teplitsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.