xref: /titanic_52/usr/src/cmd/cmd-inet/etc/ipqosconf.2.sample (revision 4bff34e37def8a90f9194d81bc345c52ba20086a)
1# ident	"%Z%%M%	%I%	%E% SMI"
2#
3# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
4# Use is subject to license terms.
5#
6# CDDL HEADER START
7#
8# The contents of this file are subject to the terms of the
9# Common Development and Distribution License, Version 1.0 only
10# (the "License").  You may not use this file except in compliance
11# with the License.
12#
13# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14# or http://www.opensolaris.org/os/licensing.
15# See the License for the specific language governing permissions
16# and limitations under the License.
17#
18# When distributing Covered Code, include this CDDL HEADER in each
19# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20# If applicable, add the following below this CDDL HEADER, with the
21# fields enclosed by brackets "[]" replaced with your own identifying
22# information: Portions Copyright [yyyy] [name of copyright owner]
23#
24# CDDL HEADER END
25#
26
27# Mandatory file format version identifier.
28fmt_version 1.0
29
30# Meter traffic from application (identified by source port myport) to
31# somehost.somedomain, where somehost.somedomain is a valid hostname/IP address.
32# Mark a packet with AF11 if it does not exceed the committed burst, AF12 if it
33# exceeds committed burst, but not excess burst and AF13 if it exceeds the
34# excess burst.
35# For information on AF PHBs refer to the IPQoS Administration Guide or the
36# RFC 2597.
37#
38# Before this example configuration file can be applied the sport and daddr
39# parameter values in the ipgpc filter myfilter need to be given actual values.
40
41action {
42        module ipgpc
43	# Name must be ipgpc.classify for ipgpc action.
44	name ipgpc.classify
45
46        filter {
47               name myfilter
48               class meter_myapp
49               sport myport
50	       daddr somehost.somedomain
51        }
52        class {
53                name meter_myapp
54                next_action meter5mbps
55                enable_stats true
56        }
57        params {
58                global_stats true
59        }
60}
61
62# meter5mbps invokes action af11 for a packet that does not exceed the
63# committed burst, af12 if it exceeds committed burst, but not excess burst
64# and af13 if it exceeds excess burst.
65action {
66    module tokenmt
67    name meter5mbps
68    params {
69       # Committed rate of 5 Mbps.
70       committed_rate 5000000
71       # Committed burst of 5 Mb.
72       committed_burst 5000000
73       # Excess Burst of 10 Mb.
74       peak_burst 10000000
75       # Action global stats enabled.
76       global_stats true
77       # RED action, mark DSCP with AF13.
78       red_action_name af13
79       # YELLOW action, mark DSCP with AF12.
80       yellow_action_name af12
81       # GREEN action, mark DSCP with AF13.
82       green_action_name af11
83       # Not color aware.
84       color_aware false
85    }
86}
87
88# Mark the DSCP with code point AF13, 001110 = 14.
89action {
90   module dscpmk
91   name af13
92   params {
93      # Enable global stats for action.
94      global_stats true
95      next_action acct_classaf1
96      # Set all 64 entries of dscp_map to 14 decimal.
97      dscp_map {0-63:14}
98   }
99}
100
101# Mark the DSCP with code point AF12, 001100 = 12.
102action {
103   module dscpmk
104   name af12
105   params {
106      global_stats true
107      next_action acct_classaf1
108      dscp_map {0-63:12}
109   }
110}
111
112# Mark the DSCP with code point AF11, 001010 = 10.
113action {
114   module dscpmk
115   name af11
116   params {
117      global_stats true
118      next_action acct_classaf1
119      dscp_map {0-63:10}
120   }
121}
122
123# Account packets for class AF1* (AF11, AF12 and AF13).
124action {
125   module flowacct
126   name acct_classaf1
127   params {
128      global_stats true
129      next_action continue
130      # Timeout flows if packets not seen for at least 60 secs.
131      timeout 60000
132      # Scan the flow table every 15 secs for removing timed out flows.
133      timer   15000
134      # Limit number of flow records in the table to 2K.
135      max_limit 2048
136   }
137}
138