Minggu, 16 Agustus 2015
IP ADDRESS
Yaitu : IP address dan subnet mask kita ubah dulu ke bilangan biner. lalu jika telah selesai di AND kan.. Materi AND silahkan Anda lihat di posting blog saya yang lain :)
bit IP : 0-7. 8-15 . 16-23 . 24-31
net prefix: 8 . 16 . 24 . 32
Classful IP Address:
class A : 1.0.0.0 s/d 126.255.255.255
class B : 128.0.0.0 s/d 191.255.255.255
class C : 192.0.0.0 s/d 223.255.255.255
Netmask default:
class A : /8(netprefix) atau 255.0.0.0
class B : /16(netprefix) atau 255.255.0.0
class C : /24(netprefix) atau 255.255.255.0
Rumusan:
IP = oct1 . oct2 . oct3 . oct4
Netmask = mask_oct1 . mask_oct2 . mask_oct3. mask_oct4
Wildcard = 255.255.255.255 - Netmask
net1 = int(oct1:(256-mask_oct1)x(256-mask_oct1)
net2 = int(oct2:(256-mask_oct2)x(256-mask_oct2)
net3 = int(oct3:(256-mask_oct3)x(256-mask_oct3)
net4 = int(oct4:(256-mask_oct4)x(256-mask_oct4)
Network = net1.net2.net3.net4
Broadcast = Network + Wildcard
Host min = Network + 0.0.0.1
Host max = Broadcast - 0.0.0.1
Host/net = (2^(32-netprefix))-2
Catatan:
Network: nilai oct4 harus genap
Host min: nilai oct4 harus ganjil
Host max: nilai oct4 harus genap
Broadcast: nilai oct4 harus ganjil
Contoh:
1) Nilai netprefix berada dalam range: /24 < netprefix < /32
a) IP = 118.98.176.214/30
32-30=2 -> 2^2=4 -> 256-4=252
Netmask: 255.255.255.252
Wildcard = 255.255.255.255 - 255.255.255.252 = 0.0.0.3
Network:
net1 = int(118:(256-255))x(256-255) = 118
net2 = int(98:(256-255))x(256-255) = 98
net3 = int(176:(256-255))x(256-255) = 176
net4 = int(214:(256-252))x(256-252) = 212
=> = 118.98.176.212
Broadcast: 118.98.176.212 + 0.0.0.3 = 118.98.176.215
Host min: 118.98.176.212 + 0.0.0.1Â Â = 118.98.176.213
Host max: 118.98.176.215 - 0.0.0.1Â Â = 118.98.176.214
Hosts/net: (2^(32-30))-2 = 2
b) 118.98.176.214/29
32-29=3 -> 2^3=8 -> 256-8=248
Netmask: 255.255.255.248
Wildcard = 255.255.255.255 - 255.255.255.248 = 0.0.0.7
Network:
net1 = int(118:(256-255))x(256-255)Â Â = 118
net2 = int(98:(256-255))x(256-255)Â Â Â Â = Â 98
net3 = int(176:(256-255))x(256-255)Â Â = 176
net4 = int(214:(256-248))x(256-248)Â Â = 208
=> = 118.98.176.208
Broadcast: 118.98.176.208 + 0.0.0.7 = 118.98.176.215
Host min: 118.98.176.208 + 0.0.0.1 = 118.98.176.209
Host max: 118.98.176.215 - 0.0.0.1 = 118.98.176.214
Hosts/net: (2^(32-29))-2
2) Nilai netprefix berada dalam range: /16 < netprefix < /24
a) 118.98.176.214/22
24-22=2 -> 2^2=4 -> 256-4=252
Netmask: 255.255.252.0
Wildcard = 255.255.255.255 - 255.255.252.0 = 0.0.3.255
Network:
net1 = int(118:(256-255))x(256-255) = 118
net2 = int(98:(256-255))x(256-255) = 98
net3 = int(176:(256-252))x(256-252) = 176
net4 = int(214:(256-0))x(256-0) = 118.98.176.0
Broadcast: 118.98.176.0 + 0.0.3.255 = 118.98.179.255
Host min: 118.98.176.0 + 0.0.0.1 = 118.98.176.1
Host max: 118.98.179.255 - 0.0.0.1= 118.98.179.254
Hosts/net: (2^(32-22))-2 = 1022
b) 118.98.176.214/21
24-21=3 -> 2^3=8 -> 256-8=248
Netmask: 255.255.248.0
Wildcard = 255.255.255.255 - 255.255.248.0 = 0.0.7.255
Network:
net1 = int(118:(256-255))x(256-255)Â Â = 118
net2 = int(98:(256-255))x(256-255)Â Â Â Â =Â Â 98
net3 = int(176:(256-248))x(256-248)Â Â = 176
net4 = int(176:(256-0))x(256-0) = 0
=> = 118.98.176.0
Broadcast: 118.98.176.0 + 0.0.7.255 = 118.98.183.255
Host min: 118.98.176.0 + 0.0.0.1 = 118.98.176.1
Host max: 118.98.183.255 - 0.0.0.1 = 118.98.183.254
Hosts/net: (2^(32-21))-2= 2046
3) Nilai netprefix berada dalam range: /8 < netprefix < /16
a) 118.98.176.214/14
16-14=2 -> 2^2=4 -> 256-4=252
Netmask: 255.252.0.0
Wildcard = 255.255.255.255 - 255.252.0.0 = 0.3.255.255
Network:
net1 = int(118:(256-255))x(256-255) = 118
net2 = int(98:(256-252))x(256-252) = 96
net3 = int(176:(256-0))x(256-0) = 0
net4 = int(214:(256-0))x(256-0) = 0
=>= 118.96.0.0
Broadcast: 118.96.0.0 + 0.3.255.255 = 118.99.255.255
Host min: 118.96.0.0 + 0.0.0.1 = 118.96.0.1
Host max: 118.99.255.255 - 0.0.0.1 = 118.99.255.254
Hosts/net: (2^(32-14))-2 = 262142
b) 118.98.176.214/13
16-13=3 -> 2^3=8 -> 256-8=248
Netmask: 255.248.0.0
Wildcard = 255.255.255.255 - 255.248.0.0 = 0.7.255.255
Network:
net1 = int(118:(256-255))x(256-255) = 118
net2 = int(98:(256-248))x(256-248) = 96
net3 = int(176:(256-0))x(256-0) = 0
net4 = int(214:(256-0))x(256-0) = 0
=> = 118.96.0.0
Broadcast: 118.96.0.0 + 0.7.255.255 = 118.103.255.255
Host min: 118.96.0.0 + 0.0.0.1 = 118.96.0.1
Host max: 118.103.255.255 - 0.0.0.1 = 118.103.255.254
Hosts/net: (2^(32-13))-2 = 524286
Tidak ada komentar:
Posting Komentar