From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jacob Teplitsky Date: Sat, 29 Nov 2003 19:50:55 +0000 Subject: Re: [LARTC] tcng ingress examples Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org > 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/