summaryrefslogtreecommitdiffstats
path: root/share/man/man4/ng_car.4
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2007-12-22 13:31:01 +0000
committermav <mav@FreeBSD.org>2007-12-22 13:31:01 +0000
commit065ee19d9ca4e24a32268d3965c086b4200b129c (patch)
treec0dcbff3a95cd07a6d768de410b2c8806b353845 /share/man/man4/ng_car.4
parentf558a6bfd81c43e3d3dafdf2017d34992da6c6e6 (diff)
downloadFreeBSD-src-065ee19d9ca4e24a32268d3965c086b4200b129c.zip
FreeBSD-src-065ee19d9ca4e24a32268d3965c086b4200b129c.tar.gz
Add usage example:
Limit outgoing data rate over fxp0 Ethernet interface to 20Mbit/s and incoming packet rate to 5000pps.
Diffstat (limited to 'share/man/man4/ng_car.4')
-rw-r--r--share/man/man4/ng_car.411
1 files changed, 11 insertions, 0 deletions
diff --git a/share/man/man4/ng_car.4 b/share/man/man4/ng_car.4
index 41ce258..15efd10 100644
--- a/share/man/man4/ng_car.4
+++ b/share/man/man4/ng_car.4
@@ -183,6 +183,17 @@ Atomically return and clear node statistics.
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message, or when all hooks have been disconnected.
+.Sh EXAMPLES
+Limit outgoing data rate over fxp0 Ethernet interface to 20Mbit/s
+and incoming packet rate to 5000pps.
+.Bd -literal -offset indent
+/usr/sbin/ngctl -f- <<-SEQ
+ mkpeer fxp0: car lower lower
+ name fxp0:lower fxp0_car
+ connect fxp0: fxp0_car: upper upper
+ msg fxp0_car: setconf { downstream={ cir=20000000 cbs=2500000 ebs=2500000 greenAction=1 yellowAction=1 redAction=2 mode=2 } upstream={ cir=5000 cbs=100 ebs=100 greenAction=1 yellowAction=1 redAction=2 mode=2 opt=2 } }
+SEQ
+.Ed
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ngctl 8
OpenPOWER on IntegriCloud