All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Teplitsky <jacobt@bivio.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] tcng ingress examples
Date: Sat, 29 Nov 2003 19:50:55 +0000	[thread overview]
Message-ID: <marc-lartc-107013873513676@msgid-missing> (raw)
In-Reply-To: <marc-lartc-106983846924824@msgid-missing>

> 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/

      reply	other threads:[~2003-11-29 19:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-26  9:14 [LARTC] tcng ingress examples Alex Ongena
2003-11-29 19:50 ` Jacob Teplitsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-107013873513676@msgid-missing \
    --to=jacobt@bivio.net \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.