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