.. Welcome ..



.. Welcome to 'Komunitas Cisco' site ..



Senin, 06 Mei 2013

Subnetting

Belajar Subnetting

subnetting: membagi sebuah jaringan/network menjadi beberapa sub-jaringan/subnet yg lebih kecil
caranya: meminjam host bit utk dijadikan network bit

rumus: 2^N - 2 >= subnet yg dibutuhkan
    N = subnet bit (host bit yg dipinjam)

Contoh soal:
jaringan 172.16.0.0/16 dibagi menjadi minimal 5 subnet

langkah 1: mencari jumlah subnet bit (N)
2^N - 2 >= 5
2^N >=  5 + 2
N = 3 subnet bit

langkah 2: menghitung subnet mask utk setiap subnet yg baru
subnet mask = NW bit yg ada + N = /16 + 3 = /19    --> /8./8./3./0
                              255.255.224.0
/0 = 0000 0000 = 0
/1 = 1000 0000 = 128
/2 = 1100 0000 = 192
/3 = 1110 0000 = 224
/4 = 1111 0000 = 240
/5 = 1111 1000 = 248
/6 = 1111 1100 = 252
/7 = 1111 1110 = 254
/8 = 1111 1111 = 255


langkah 3: menghitung interval antar subnet
question --> di octet ke berapa, NW bit terakhir? octet ke-3

interval = 256 - 224 = 32 (octet 3)
interval = 2^hostBit di octet tsb = 2^(8-3) = 2^5 = 32

langkah 4:
NW address         BC address                     host address
172.16.0.0/19      172.16.31.255/19       172.16.0.1-172.16.31.254/19

172.16.32.0/19    172.16.63.255/19       172.16.32.1-172.16.63.254/19

172.16.64.0/19    172.16.95.255/19       172.16.64.1-172.16.95.254/19

172.16.96.0/19    172.16.127.255/19      172.16.96.1-172.16.127.254/19

172.16.128.0/19    172.16.159.255/19     172.16.128.1-172.16.159.254/19

172.16.160.0/19    172.16.191.255/19     172.16.160.1-172.16.191.254/19

172.16.192.0/19    172.16.223.255/19     172.16.192.1-172.16.223.254/19

172.16.224.0/19    172.16.255.255/19     172.16.224.1-172.16.255.254/19
_______________
172.17.0.0

BC address = next subnet - 1

jumlah subnet yg valid = 2^N - 2 = 2^3 - 2 = 6 subnet valid
dikurangi 2 karena ada subnet zeroes & ones

khusus subnetting, ada 2 invalid subnet, yaitu:
1. subnet zeroes --> subnet paling pertama 
2. subnet ones    --> subnet paling terakhir

jumlah host bit di subnet /19 ==> 32 bit - 19 NW bit = 13 host bit
pada subnet /19, jumlah host per subnet = 2^13 - 2 = 8190 host per subnet /19

subnetting = FLSM (fixed-length subnet mask)
kekurangan subnetting: alokasi ip kurang efisien (boros)

-------------------------
VLSM (variable-length subnet mask)
menghitung pembagian subnet berdasarkan kebutuhan host per subnet


contoh: carilah network address dari tiap host dalam topology diatas

rumus: 2^H - 2 >= host yg dibutuhkan
H = host bit yg digunakan

note: mulai dari subnet dengan kebutuhan host terbanyak
--------
2 subnet @ min 100 host
    2^H - 2 >= 100 ; H = 7 host bit
    subnet mask = total bit IPv4 address - H
            = 32 - 7 = /25 --> /8./8./8./1
                    255.255.255.128
    interval = 256 - 128 = 128 (octet 4)
    interval = 2^7 = 128 (octet 4)

jumlah host per subnet /25 = 2^7 - 2 = 126 host per network

LAN JKT:
172.16.0.0/25    BC=172.16.0.127/25
172.16.0.128/25    BC=172.16.0.255/25

172.16.1.0
----------
3 subnet @ min 50 host
    2^H - 2 >= 50     H = 6 host bit
    subnet mask = 32 - 6 = /26 --> /8./8./8./2
                    255.255.255.192
    interval = 256 - 192 = 64 (octet 4)
    interval = 2^6 = 64 (octet 4)

jumlah host per subnet /26 = 2^6 - 2 = 62 host per network

LAN SBY:
172.16.1.0/26    BC=172.16.1.63/26
172.16.1.64/26    BC=172.16.1.127/26
172.16.1.128/26    BC=172.16.1.191/26

172.16.1.192
-----------
1 subnet @ min 25 host
    2^H - 2 >= 25         H = 5 host bit
    subnet mask = 32 - 5 = /27 --> /8./8./8./3
                    255.255.255.224
    interval = 256 - 224 = 32 (octet 4)
    interval = 2^5 = 32 (octet 4)

jumlah host per subnet /27 = 2^5 - 2 = 30 host per subnet

LAN MDN:
172.16.1.192/27       BC=172.16.1.223/27

172.16.1.224
------------
2 subnet @ min 2 host
    2^H - 2 >= 2        H = 2
    subnet mask = 32 - 2 = /30 --> /8./8./8./6
                    255.255.255.252
    interval = 256 - 252 = 4 (octet 4)   
    interval = 2^2 = 4 (octet 4)

jumlah host per subnet /30 = 2^2 - 2 = 2 host per subnet

Antar router (Link Serial):
172.16.1.224/30        BC=172.16.1.227/30
172.16.1.228/30        BC=172.16.1.231/30
=================================

manajemen IP: subnetting, VLSM, summarization

summarization: meringkas jaringan-jaringan/subnet-subnet menjadi 1 subnet (bisa juga lebih)

tujuan:
1. meringkas isi routing table
2. meringkas routing update ke router neighbor

contoh 1:
A punya 4 subnet:
10.1.1.0/26       =  00001010.00000001.00000001.00000000
10.1.1.64/26      =  00001010.00000001.00000001.01000000
10.1.1.128/26     =  00001010.00000001.00000001.10000000
10.1.1.192/26     =  00001010.00000001.00000001.11000000
                                   -------------------------------------
                         00001010.00000001.00000001.00000000

summary: 10.1.1.0/24  (10.1.1.0 s.d. 10.1.1.255)


contoh 2:
A punya 2 subnet:
10.1.1.0/26     =  00001010.00000001.00000001.00000000
10.1.1.64/26    =  00001010.00000001.00000001.01000000
                                 -------------------------------------
                        00001010.00000001.00000001.00000000

summary 10.1.1.0/25  (10.1.1.0 s.d. 10.1.1.127)



C punya 2 subnet:
10.1.1.128/26    = 00001010.00000001.00000001.10000000
10.1.1.192/26    = 00001010.00000001.00000001.11000000
                                  -------------------------------------
                       00001010.00000001.00000001.10000000

summary: 10.1.1.128/25  (10.1.1.128 s.d. 10.1.1.255)


10.1.1.64/26    =   00001010.00000001.00000001.01000000
10.1.1.128/26    =  00001010.00000001.00000001.10000000
                                 -------------------------------------
                        00001010.00000001.00000001.00000000

summary: 10.1.1.0/24 (not true)


cara cepat:
1. apakah kelipatan 2^n
2. ip terakhir - ip pertama = wildcard mask
3. 255.255.255.255 - wildcard mask = subnet mask
4. hasil summary = ip pertama & subnet mask (dari langkah 3)

contoh 3:

/24 => /8./8./8./0 = 255.255.255.0
interval = 256 - 255 = 1
       2^0 = 1

langkah 1:
172.16.0.0/24
172.16.1.0/24
172.16.2.0/24
172.16.3.0/24


langkah 2: 172.16.3.255 - 172.16.0.0 = 0.0.3.255 (wildcard mask)
ip terakhir = BC address nya subnet terakhir

langkah 3: 255.255.255.255 - 0.0.3.255 = 255.255.252.0
                     /8./8./6./0 = /22

langkah 4: summary: 172.16.0.0/22 = 172.16.0.0 255.255.252.0

===============================================================
172.16.4.0/24
172.16.5.0/24

langkah 2: 172.16.5.255 - 172.16.4.0 = 0.0.1.255
langkah 3: 255.255.255.255 - 0.0.1.255 = 255.255.254.0
                     /8./8./7./0 = /23


langkah 4: summary = 172.16.4.0/23

contoh 4:
192.168.160.0/24
192.168.161.0/24
192.168.162.0/24
192.168.163.0/24
192.168.164.0/24
192.168.165.0/24
192.168.166.0/24
192.168.167.0/24
------------------------> summary: 192.168.160.0/21

192.168.168.0/24

contoh 5:

202.10.4.0/24 
202.10.5.0/24
202.10.6.0/24
202.10.7.0/24 ==> 202.10.4.0/22

202.10.8.0/24


contoh 6:
10.1.0.0/25
10.1.0.128/25
10.1.1.0/26
10.1.1.64/26
10.1.1.128/26
10.1.1.192/26
==============> 10.1.0.0/23

langkah 2: 10.1.1.255 - 10.1.0.0 = 0.0.1.255
langkah 3: 255.255.255.255 - 0.0.1.255 = 255.255.254.0
                     /23

contoh 7:
10.2.0.0/24
10.2.1.0/25
10.2.1.128/25

langkah 2: 10.2.1.255 - 10.2.0.0 = 0.0.1.255
langkah 3: 255.255.255.255 - 0.0.1.255 = 255.255.254.0
                     /23
langkah 4: summary 10.2.0.0/23





Tidak ada komentar:

Posting Komentar