Convert TOS to DSCP

Cara mudah untuk mengubah nilai TOS (type of Service) ke DSCP (Differentiated Services Code Point)/ Differentiated Services Field adalah dengan cara mengubah nilai tersebut ke dalam nilai binary terlebih dahulu lalu menghilangkan 2 bit dibelakang.
CONVERT TOS to DSCP
Contoh I :
tos 0×30 = 110000 , hilangkan 2 bit dibelakang menjadi 1100 = 12
jadi, tos 0×30 = dscp 12 (dec)
Contoh II :
tos 0×20 = 100000 , hilangkan 2 bit dibelakang menjadi 1000 = 8
jadi, tos 0×20 = dscp 8 (dec)
CONVERT DSCP to TOS
Untuk DSCP to TOS kebalikannya, yaitu setelah diubah ke binary lalu tambahkan 2 bit terakhir dengan nilai 0
Contoh :
dscp 16 (dec) = 10000 , tambahkan 2 bit terakhir dg 0 menjadi 1000000 = 0×40
jadi, dscp 16 (dec) = tos 0×40 (hex)
TOS fills the byte as:
P2 P1 P0 T3 T2 T1 T0 U
where P2-P0 IP precedence bits , T3-T0 are ToS, and U is unused.
DSCP fills the byte as:
D5 D4 D3 D2 D1 D0 U U
where D5-D0 are DSCP and U is unused.
sebagai referensi :
http://www.ciscopress.com/articles/article.asp?p=28688&seqNum=3
December 1st, 2008 at 2:49 pm
thanks a lot for your guide.