본문 바로가기

tech/carrier ethernet

Convert PHB AF to DSCP Decimal

반응형
  • From PHB AF to DSCP Decimal

Decimal from AFxy=(8*x)+(2*y)

So, let’s have some example, let’s calculate decimal value from AF13, AF31 and AF43.

AF13 = (8*1)+(2*3) = DSCP 14

AF31 = (8*3)+(2*1) = DSCP 26

AF43 = (8*4)+(2*3) = DSCP 38

  • From DSCP Decimal to PHB AF

And the formula is tricky to calculate the vise versa, i mean, from DSCP value to PHB AF. The formula is:

AFxy where, x = Floor Value [(DSCP Value)/8], y = [(Remainder)/2]

So, let’s revert back those DSCP values to AF value.

DSCP 14 = AFxy where, x = Floor Value of (14/8) = 1, y = (Remainder)/2 = 6/2 = 3, so AFxy = AF13

DSCP 26 = AFxy where, x = Floor Value of (26/8) = 3, y = (Remainder)/2 = 2/2 = 1, so AFxy = AF31

DSCP 38 = AFxy where, x = Floor value of (38/8) = 4, y = (Remainder)/2 = 6/2 = 3, so AFxy = AF43

출처 : https://dreamforccie.wordpress.com/2010/04/23/convert-phb-af-to-dscp-decimal-and-vise-versa-its-so-easy/

반응형