Decimal – Binair -Hexidecimaal
_______________________________
Decimaal -> In 10 tallligstelsel
Decimaal -> 0 1 2 3 4 5 6 7 8 9
Hexidecimaal -> In 16 talligstelsel
Hexidecimaal -> 0 1 2 3 4 5 6 7 8 9 A=11 B=12 C=13 D=14 E=15 F=16
Binair -> In 2 talligstelsel
Binair -> 0 1
Binair -> Binair naar decimal -> binair per positie tot de macht 2 daarna optellen
Omrekenen binair – hexidecimaal – decimaal
___________________________________________
Binair -> Hexidecimaal -> decimaal
0001 -> 1 -> 1
0010 -> 2 -> 2
0011 -> 3 -> 3
0100 -> 4 -> 4
0101 -> 5 -> 5
0110 -> 6 -> 6
0111 -> 7 -> 7
1000 -> 8 -> 8
1001 -> 9 -> 9
1010 -> A -> 10
1011 -> B -> 11
1100 -> C -> 12
1101 -> D -> 13
1110 -> E -> 14
1111 -> F -> 15
SUBDEC tabel Geldige Subnet masks bereken (de decimaal op tellen met de opvolgende 128 + 64 = 192)
__________________________________________________________________________________________________
Mask 128 | 192 | 224 | 240 | 248 | 252 | 254 |255
Decimaal 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1
Aantal subnets 2 | 4 | 8 | 16 | 32 | 64 | 128 |255
Note: SUBDEC tabel = is een niet bestaande naam maar de naam die ik zelf aan de tabel gegeven heb.
Subnet mask binair (zie bovestaande rij decimaal):
Subnet uit 8 bits
128 -> 10000000 -> 128 – 128 = 0
192 -> 11000000 -> 192 – 128 – 64 = 0
224 -> 11100000 -> 224 – 128 – 64 – 32 = 0
240 -> 11110000 -> 240 – 128 – 64 – 32 – 16 = 0
248 -> 11111000 -> 248 – 128 – 64 – 32 – 16 – 8 = 0
252 -> 11111100 -> 252 – 128 – 64 – 32 – 16 – 8 – 4 = 0
254 -> 11111110 -> 254 – 128 – 64 – 32 – 16 – 8 – 4 – 2 = 0
255 -> 11111111 -> 254 – 128 – 64 – 32 – 16 – 8 – 4 – 2 – 1
Voorbeeld Magisch getal subnet berekeningen (per 8 bits 256 gebruiken)
___________________________________________
IP -> 192.168.18.0
MAsk -> 255.255.255.224
256 – (Laatse octet subnet mask) = magisch getal
256 – 224 = 32
Subnets zijn dan :
192.168.18.0 Network 0 first ip 1 last ip 30 broadcast 31
192.168.18.32 Network 32 first ip 33 last ip 62 broadcast 63
192.168.18.64 Network 64 first ip 65 last ip 94 broadcast 95
192.168.18.96 Network 96 first ip 97 last ip 126 broadcast 127
192.168.18.128
192.168.18.160
192.168.18.192
192.168.18.224 tot 256)
Zie voor magisch getal de SUBDEC tabel
Mask Subnet
——————————
256 – 128 = 128
256 – 192 = 64
256 – 224 = 32
256 – 240 = 16
256 – 248 = 8
256 – 252 = 4
256 – 254 = 2
256 – 255 = 1
Aantal subnets berekenen
______________________________
Zie subdec tabel
256 : (door aantal bits gebruikt door sub netmask geteld vanaf links) = Aantal subnetten wat beschikbaar is (bij 8 bits subnet mask)
256 : 128 (1 bit) = 2
256 : 64 (2 bits) = 4
256 : 32 (3 bits) = 8
256 : 16 (4 bits) = 16
256 : 8 (5 bits) = 32
256 : 4 (6 bits) = 64
256 : 2 (7 bits) = 128
Hier na is er nog maar 1 bit over in de host
Bij 16 bits subnet mask wordt 256 + 256 = 512 (1 bit wordt 128 + 128 = 256)
Subnet
_______________________________
/ berekening = het aantal bits voor de /
xxxxxxxx xxxxxxxx xxxxxxxx | xxxxxxxx /24 (bits)
xxxxxxxx xxxxxxxx xxxxxxxx xxx|xxxxx /27 (bits)
xxxxxxxx xxxxxxxx xxxxxxxx xxxxxx|xx /30 (bits)