xref: /titanic_50/usr/src/cmd/cmd-inet/etc/ipqosconf.1.sample (revision c77a61a72b5ecdc507d6cf104142edd371a16c84)
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 version identifier
28fmt_version 1.0
29
30# This configuration marks video traffic for EF PHB, i.e. Expedited Forwarding.
31# Mail traffic is marked for AF11, anonymous user FTP traffic for AF12 and news
32# traffic for AF13 PHBs, i.e. Assured Forwarding class 1 with drop precedences
33# low medium and high respectively.
34# For information on AF and EF PHBs refer to the IPQoS Administration Guide or
35# the RFCs 2597 and 2598 respectively.
36#
37# Before this configuration file can be applied the sport parameter of the
38# filter videoout needs to be given a valid port number/service name of a
39# service whose traffic you wish to apply EF to and the uid parameter of the
40# filter ftpout needs to be given the uid of the user ftp. The ftp user account
41# is the one used by the ftp server for anonymous logins, thus filtering on
42# this enables us to capture anonymous ftp user traffic.
43
44action {
45	module ipgpc
46	# Name must be ipgpc.classify for ipgpc action.
47	name ipgpc.classify
48
49	class {
50		name video
51		next_action markEF
52	}
53	class {
54		name mail
55		next_action markAF11
56	}
57	class {
58		name ftp
59		next_action markAF12
60	}
61	class {
62		name news
63		next_action markAF13
64	}
65
66	filter {
67		name videoout
68		# Source port of video traffic, given by __videoport__.
69		sport __videoport__
70		# Locally generated outbound traffic.
71		direction LOCAL_OUT
72		class video
73	}
74	filter {
75		name mailout
76		sport smtp
77		direction LOCAL_OUT
78		class mail
79	}
80	# This filter catches anonymous ftp user outgoing traffic.
81	filter {
82		name ftpout
83		direction LOCAL_OUT
84		# Traffic generated by ftp user, given by __ftp-uid__.
85		uid __ftp-uid__
86		class ftp
87	}
88	filter {
89		name newsout
90		sport nntp
91		direction LOCAL_OUT
92		class news
93	}
94}
95
96# Mark the DSCP with code point EF, 101110 = 46.
97action {
98	module dscpmk
99	name markEF
100	params {
101		# Set all 64 entries of dscp_map to 46 decimal.
102		dscp_map {0-63:46}
103		next_action continue
104	}
105}
106
107# Mark the DSCP with code point AF11, 001010 = 10.
108action {
109	module dscpmk
110	name markAF11
111	params {
112		dscp_map {0-63:10}
113		next_action continue
114	}
115}
116
117# Mark the DSCP with code point AF12, 001100 = 12.
118action {
119	module dscpmk
120	name markAF12
121	params {
122		dscp_map {0-63:12}
123		next_action continue
124	}
125}
126
127# Mark the DSCP with code point AF13, 001110 = 14.
128action {
129	module dscpmk
130	name markAF13
131	params {
132		dscp_map {0-63:14}
133		next_action continue
134	}
135}
136