-
Notifications
You must be signed in to change notification settings - Fork 4
/
diffserv.conf
144 lines (119 loc) · 5.04 KB
/
diffserv.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Diffserv Configuration File
DEBUG_LOG=/dev/null
PRIOIP=
PRIOIPV6=
# IP addresses of the VoIP phones,
# if none, set VOIPIPS=""
VOIPIPS=""
VOIP6IPS=""
NTPIPS=""
ROBUST_STATS=0
# FIXME: Handle Vlans
WIRELESS_DEVS=`ip link | grep wlan | awk '{print $2}' | cut -f1 -d:`
WIRED_DEVS=`ip link | grep eth | awk '{print $2}' | cut -f1 -d:`
# FIXME: Figure out link rate somehow for wired, at least
# X11?
# The really depressing part about trying to do classification
# is the sheer number of ports in use.
# http://www.networksorcery.com/enp/protocol/ip/ports06000.htm
# In looking at that it gave me an idea in that we could just have
# a linear 48k table to map port numbers to dscp
# matches would be --lowest-match (for a single lookup)
# --best-match (for a dual lookup)
# This is the relevant table from the RFC
# |===============+=========+=============+==========================|
# |Network Control| CS6 | 110000 | Network routing |
# |---------------+---------+-------------+--------------------------|
# | Telephony | EF | 101110 | IP Telephony bearer |
# |---------------+---------+-------------+--------------------------|
# | Signaling | CS5 | 101000 | IP Telephony signaling |
# |---------------+---------+-------------+--------------------------|
# | Multimedia |AF41,AF42|100010,100100| H.323/V2 video |
# | Conferencing | AF43 | 100110 | conferencing (adaptive) |
# |---------------+---------+-------------+--------------------------|
# | Real-Time | CS4 | 100000 | Video conferencing and |
# | Interactive | | | Interactive gaming |
# |---------------+---------+-------------+--------------------------|
# | Multimedia |AF31,AF32|011010,011100| Streaming video and |
# | Streaming | AF33 | 011110 | audio on demand |
# |---------------+---------+-------------+--------------------------|
# |Broadcast Video| CS3 | 011000 |Broadcast TV & live events|
# |---------------+---------+-------------+--------------------------|
# | Low-Latency |AF21,AF22|010010,010100|Client/server transactions|
# | Data | AF23 | 010110 | Web-based ordering |
# |---------------+---------+-------------+--------------------------|
# | OAM | CS2 | 010000 | OAM&P |
# |---------------+---------+-------------+--------------------------|
# |High-Throughput|AF11,AF12|001010,001100| Store and forward |
# | Data | AF13 | 001110 | applications |
# |---------------+---------+-------------+--------------------------|
# | Standard | DF (CS0)| 000000 | Undifferentiated |
# | | | | applications |
# |---------------+---------+-------------+--------------------------|
# | Low-Priority | CS1 | 001000 | Any flow that has no BW |
# | Data | | | assurance |
# ------------------------------------------------------------------
# Traffic classes:
# 1:20 Pentultimate Priority (ntp)
# 1:25 Link Local Packets (1 hop)
# 1:30 Interactive (SSH, DNS, Quake)
# 1:35 Multicast packets (X hops)
# 1:40 (ACK)
# 1:50 Low latency (VoIP)
# 1:60 Browsing (HTTP, HTTPs)
# 1:70 Default
# 1:80 Bulk Services (smtp, rsync)
# 1:90 Unclassifiable
# 1:95 Low priority (p2p, pop3, etc)
CLASSES="C_ULT C_LNK C_INT C_MCS C_ACK C_TLK C_BRW C_DEF C_BLK C_UNC C_P2P"
CLASSID=":20 :25 :30 :35 :40 :50 :60 :70 :80 :90 :95"
# Interactive classs: SSH Terminal, DNS and gaming (Quake)
INTERACTIVEPORTS="22,222"
GAMINGPORTS="3389,5900,5688"
# People that use proxies can be shaped better, and 443 is important
# include spdy, too
PROXYPORTS="8123,3128,8118,1080,443,6127"
# rdate?
NTPPORTS=123
RTPPORTS="5004:5005"
# ichat? skype?
# VoIP telephony
SIGNALPORTS="5060:5062"
VOIPPORTS="5062:5100,10000:11000,5000:5059,8000:8016,5004,1720,1731,4569"
VPNPORTS="1194,500,4500"
CHATPORTS="6667,7000,194,5190,5222,5269"
# WWW
BROWSINGPORTS="80,81,8080"
#FIXME: icecast, look at some radio stations. Soma uses:
A_STREAMINGPORTS="8600,8048,9010,8884,8384,8010,9000"
#FIXME: netflix, etc
V_STREAMINGPORTS="554"
ZEBRAPORTS="2600:2608"
MONITORPORTS="161:162,199,5777"
# Routing
ROUTINGPORTS="179,$ZEBRAPORTS"
# Yes, let's track git and cvs
SCMPORTS="371,2401,3690,9418"
MAILPORTS="143,220,993,587,465"
# Rsync, SMTP
BULKPORTS="25,873,20:21,109:110,119,631,4559"
# Traditional filesharing has it's place
FILEPORTS="137:139,369:370,445,2049,7000:7009"
# The lowest priority traffic: eDonkey, Bittorrent, etc.
P2PPORTS="110,143,445,4662:4664,6881:6999,540,1214,4031,6346:6347"
XWINPORTS="177,6000:6010,7100"
DBPORTS="1433:1434,3050,3306,5432:5433,5984"
BACKUPPORTS="9101:9103,10080,13720:13721,13782:13783,2988:2989,10081:10083"
TESTPORTS="5001:5002"
# Classify these
# talk, ntalk 517, 518
# nntps 563
# ldaps 636
# webster 765
# Radius 1812:1813
# l2p
# dict 2628
# Distcc 3632
# Daap 3689
# mdns 5353
# RTP?