1*0Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 2*0Sstevel@tonic-gate# 3*0Sstevel@tonic-gate# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 4*0Sstevel@tonic-gate# Use is subject to license terms. 5*0Sstevel@tonic-gate# 6*0Sstevel@tonic-gate# CDDL HEADER START 7*0Sstevel@tonic-gate# 8*0Sstevel@tonic-gate# The contents of this file are subject to the terms of the 9*0Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only 10*0Sstevel@tonic-gate# (the "License"). You may not use this file except in compliance 11*0Sstevel@tonic-gate# with the License. 12*0Sstevel@tonic-gate# 13*0Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 14*0Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 15*0Sstevel@tonic-gate# See the License for the specific language governing permissions 16*0Sstevel@tonic-gate# and limitations under the License. 17*0Sstevel@tonic-gate# 18*0Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 19*0Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 20*0Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 21*0Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 22*0Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 23*0Sstevel@tonic-gate# 24*0Sstevel@tonic-gate# CDDL HEADER END 25*0Sstevel@tonic-gate# 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate# Mandatory file version identifier 28*0Sstevel@tonic-gatefmt_version 1.0 29*0Sstevel@tonic-gate 30*0Sstevel@tonic-gate# This configuration marks video traffic for EF PHB, i.e. Expedited Forwarding. 31*0Sstevel@tonic-gate# Mail traffic is marked for AF11, anonymous user FTP traffic for AF12 and news 32*0Sstevel@tonic-gate# traffic for AF13 PHBs, i.e. Assured Forwarding class 1 with drop precedences 33*0Sstevel@tonic-gate# low medium and high respectively. 34*0Sstevel@tonic-gate# For information on AF and EF PHBs refer to the IPQoS Administration Guide or 35*0Sstevel@tonic-gate# the RFCs 2597 and 2598 respectively. 36*0Sstevel@tonic-gate# 37*0Sstevel@tonic-gate# Before this configuration file can be applied the sport parameter of the 38*0Sstevel@tonic-gate# filter videoout needs to be given a valid port number/service name of a 39*0Sstevel@tonic-gate# service whose traffic you wish to apply EF to and the uid parameter of the 40*0Sstevel@tonic-gate# filter ftpout needs to be given the uid of the user ftp. The ftp user account 41*0Sstevel@tonic-gate# is the one used by the ftp server for anonymous logins, thus filtering on 42*0Sstevel@tonic-gate# this enables us to capture anonymous ftp user traffic. 43*0Sstevel@tonic-gate 44*0Sstevel@tonic-gateaction { 45*0Sstevel@tonic-gate module ipgpc 46*0Sstevel@tonic-gate # Name must be ipgpc.classify for ipgpc action. 47*0Sstevel@tonic-gate name ipgpc.classify 48*0Sstevel@tonic-gate 49*0Sstevel@tonic-gate class { 50*0Sstevel@tonic-gate name video 51*0Sstevel@tonic-gate next_action markEF 52*0Sstevel@tonic-gate } 53*0Sstevel@tonic-gate class { 54*0Sstevel@tonic-gate name mail 55*0Sstevel@tonic-gate next_action markAF11 56*0Sstevel@tonic-gate } 57*0Sstevel@tonic-gate class { 58*0Sstevel@tonic-gate name ftp 59*0Sstevel@tonic-gate next_action markAF12 60*0Sstevel@tonic-gate } 61*0Sstevel@tonic-gate class { 62*0Sstevel@tonic-gate name news 63*0Sstevel@tonic-gate next_action markAF13 64*0Sstevel@tonic-gate } 65*0Sstevel@tonic-gate 66*0Sstevel@tonic-gate filter { 67*0Sstevel@tonic-gate name videoout 68*0Sstevel@tonic-gate # Source port of video traffic, given by __videoport__. 69*0Sstevel@tonic-gate sport __videoport__ 70*0Sstevel@tonic-gate # Locally generated outbound traffic. 71*0Sstevel@tonic-gate direction LOCAL_OUT 72*0Sstevel@tonic-gate class video 73*0Sstevel@tonic-gate } 74*0Sstevel@tonic-gate filter { 75*0Sstevel@tonic-gate name mailout 76*0Sstevel@tonic-gate sport smtp 77*0Sstevel@tonic-gate direction LOCAL_OUT 78*0Sstevel@tonic-gate class mail 79*0Sstevel@tonic-gate } 80*0Sstevel@tonic-gate # This filter catches anonymous ftp user outgoing traffic. 81*0Sstevel@tonic-gate filter { 82*0Sstevel@tonic-gate name ftpout 83*0Sstevel@tonic-gate direction LOCAL_OUT 84*0Sstevel@tonic-gate # Traffic generated by ftp user, given by __ftp-uid__. 85*0Sstevel@tonic-gate uid __ftp-uid__ 86*0Sstevel@tonic-gate class ftp 87*0Sstevel@tonic-gate } 88*0Sstevel@tonic-gate filter { 89*0Sstevel@tonic-gate name newsout 90*0Sstevel@tonic-gate sport nntp 91*0Sstevel@tonic-gate direction LOCAL_OUT 92*0Sstevel@tonic-gate class news 93*0Sstevel@tonic-gate } 94*0Sstevel@tonic-gate} 95*0Sstevel@tonic-gate 96*0Sstevel@tonic-gate# Mark the DSCP with code point EF, 101110 = 46. 97*0Sstevel@tonic-gateaction { 98*0Sstevel@tonic-gate module dscpmk 99*0Sstevel@tonic-gate name markEF 100*0Sstevel@tonic-gate params { 101*0Sstevel@tonic-gate # Set all 64 entries of dscp_map to 46 decimal. 102*0Sstevel@tonic-gate dscp_map {0-63:46} 103*0Sstevel@tonic-gate next_action continue 104*0Sstevel@tonic-gate } 105*0Sstevel@tonic-gate} 106*0Sstevel@tonic-gate 107*0Sstevel@tonic-gate# Mark the DSCP with code point AF11, 001010 = 10. 108*0Sstevel@tonic-gateaction { 109*0Sstevel@tonic-gate module dscpmk 110*0Sstevel@tonic-gate name markAF11 111*0Sstevel@tonic-gate params { 112*0Sstevel@tonic-gate dscp_map {0-63:10} 113*0Sstevel@tonic-gate next_action continue 114*0Sstevel@tonic-gate } 115*0Sstevel@tonic-gate} 116*0Sstevel@tonic-gate 117*0Sstevel@tonic-gate# Mark the DSCP with code point AF12, 001100 = 12. 118*0Sstevel@tonic-gateaction { 119*0Sstevel@tonic-gate module dscpmk 120*0Sstevel@tonic-gate name markAF12 121*0Sstevel@tonic-gate params { 122*0Sstevel@tonic-gate dscp_map {0-63:12} 123*0Sstevel@tonic-gate next_action continue 124*0Sstevel@tonic-gate } 125*0Sstevel@tonic-gate} 126*0Sstevel@tonic-gate 127*0Sstevel@tonic-gate# Mark the DSCP with code point AF13, 001110 = 14. 128*0Sstevel@tonic-gateaction { 129*0Sstevel@tonic-gate module dscpmk 130*0Sstevel@tonic-gate name markAF13 131*0Sstevel@tonic-gate params { 132*0Sstevel@tonic-gate dscp_map {0-63:14} 133*0Sstevel@tonic-gate next_action continue 134*0Sstevel@tonic-gate } 135*0Sstevel@tonic-gate} 136