You are on page 1of 4

CCH CHIA SUBNET NHANH

Ta c bi LAB nh sau:
Ta c IP 192.168.1.0 chia 3 mng con theo yu cu ca sp
B1: Xc nh s BIT s mn da vo s mng con mun chia (p dung quy tc bn tay tri)
Cng thc tnh chia bao nhiu mng con ta lm nh sau
2^n >= m (m l s mng con cn chia hay cn gi l s Subnet cn chia, n l con s bit ta s mn)
Suy ra ta c: 2^n >=3 (S 3 l s mng con m sp yu cu)
Suy ra tip n l s 2. (Nhn bn tay tri t th 2 ca ngn t l s 4, 4 d nhin ln hn 3)
B2: Quy tc bn tay phi
y ta s mn 2 bit (S n trn B1). Da theo hnh tay phi n s l s 192.
B3: Tm bc nhy (Bc nhy c ngha l 3 mng con ny s nm t IP bao nhiu ti bao nhiu cho mi bc).
Ly 256 192 ca B2 (256 l 0 255, v vy ta ly 256 -192 = 64)
Ta c cc mng con nh sau:
Mng 1: 192.168.1.0

Netmask: 255.255.255.192

Mng 2: 192.168.1.64

Netmask: 255.255.255.192

Mng 3: 192.168.1.128

Netmask: 255.255.255.192

Mng 4: 192.168.1.192

Netmask: 255.255.255.192

Xong ri, Bn c 4 lp mng nh. By gi bn TEST bng cch dung phn mm Cisco Packet Tracer to
mng o.

TH1: My 1: 192.168.1.70
My 2: 192.168.1.80

Netmask: 255.255.255.192
Netmask: 255.255.255.192

Kt qu: Cho 2 my PING nhau Kt qu Ping OK


TH2: My 1: 192.168.1.70
My 2: 192.168.1.180

Netmask: 255.255.255.192
Netmask: 255.255.255.192

Kt qu: Cho 2 my ping nhau Kt qu Ping Khng c (V 2 IP ny khc mng).


TH3: My 1: 192.168.1.62
My 2: 192.168.1.128

Netmask: 255.255.255.192
Netmask: 255.255.255.192

Kt qu: My 1 khng t c IP v My 2 cng vy.


Ti sao vy? Cho bn kt lun nh.
Xong bi LAB

HNG DN CHI TIT C TH TNH NHANH


Khi tnh ton IP, chia Subnet th chng ta thng p dng cng thc tnh ton.
Cng thc tnh l: 2^n v 2^h 2(2^m - 2)
- tnh tng s Subnet c c sau khi chia ta dng cng thc 2^n, trong n l s bit mn chia Subnet
trong Octet (Mn lm Network ID).
tnh tng s Host/Subnet ta dng cng thc 2^h-2, trong h l tng s bit cn li dng lm Host sau khi
mn. Ta phi tr 2 v cn b a ch Subnet ID v Broadcast.
Ni s s qua cch tnh truyn thng nh vy thi, gi chng ta tm hiu cch nhm nhanh bng cch m lng
tay nh.
PHNG PHP CHIA SUBNET BNG CCH M LNG NGN TAY
u tin cc bn xe bn tay tri ra v m theo hnh

Cc bn bn tay chng ta c tt c 14 lng tay, mi lng tay tng trng cho 1 bit nh.
m 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384
m i m li cho thuc i nh cc bn.
- tnh tng s lng Subnet ID c c sau khi chia, ta m s bit mn lm Subnet ID trong Octet l ra.
Mn 3 bit th m 2, 4, 8 mn 4 bit th m 2, 4, 8, 16 gi tr ca bit m sau cng chnh l tng s Subnet ID
Sau khi c chia ra.
V d: 10.10.0.0/13 mn 5 bit m 2, 4, 8, 16, 32 vy mng ny c 32 Subnet.
- tnh bc nhy trong mi Subnet id. Ta m s bit cn li dng lm Host trong ring Octet . Gi tr ca
bit c m sau cng cng l gi tr ca bc nhy trong Octet .
V d: 172.35.0.0/19. Tc l a ch lp B s mn 3 bit Octet th 3 lm Subnet ID. Dng phng php m ta
c 2, 4, 8 3 bit mn ri, vy tng s Subnet ID l 8. Ta bit trong Octet th 3 sau khi cho mn 3 bit lm Net
ID th cn li 5 bit lm Host, vy ta m 2, 4, 8, 16, 32 5 bit ri, gi tr l 32, v cng chnh l bc nhy ca
Subnet ID
Th xem no:

- 172.35.0.0/19
- 172.35.32.0/19
- 172.35.64.0/19
- 172.35.96.0/19

- 172.35.128.0/19
- 172.35.160.0/19
- 172.35.192.0/19
- 172.35.224.0/19

Ta c tng cng 8 Subnet ID vi bc nhy l 32.


- tnh a ch Broadcast ca mt Subnet ID ta ly Subnet ID k tip gim 1.
V d: tnh Broadcast ca Subnet id 172.35.64.0/19, ta ly Subnet id
K tip l 172.35.96.0/19 gim 1 = 172.35.95.255/19 y chnh l broadcast ca Subnet ID 172.35.64.0
- tnh s Host trong mt Subnet, ta m ton b s bit Host cn li trong Subnet v ly gi tr bit sau cng
tr 2
Lu : l khng phn bit Octet. Nhc li, ta ly gi tr ca bit c m sau cng tr 2 ta c s Host trong
Subnet ID c th xi.
Trong v d Subnet 172.35.64.0/19, ta nhn bit ton b s bit dng lm Host cn li l 13.
Ta m 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 13 bit ri ok S Host trong mng s
l 8192 - 2 = 8190. V sao tr 2, v ta phi tr b a ch Subnet ID v Broadcast.
Hay n gin hn c th nhn thy l s Host c th xi c trong dy:
172.35.64.1/19 172.35.95.254/19 v ng thi n cng lt gia 2 Subnet id v Broadcast.
Lu : Phng php m t 2 khng c dng tnh tng s gi tr ca 1 octet chy t 0 255. Hay ni
cch khc l khng c dng tnh tng gi tr ca 1 dy bit nh 10101101. tnh tng s gi tr ca dy
trn ta phi m t 1, cng cc gi tr c bit 1 vi nhau.

Ngoi ra, yu cu cc bn cn nh v thuc:


1xxxxxxx =128

11111xxx =248

11xxxxxx =192

111111xx =252

111xxxxx =224

1111111x =254

1111xxxx =240

11111111 =255

V
2^0 = 1
2^1 = 2
2^2 = 4
2^3 = 8
2^4 = 16

2^5 = 32
2^6 = 64
2^7 = 128
2^8 = 256

Cc bn cng c th dng bn tay phi ghi nh cc gi tr trn, dng nhm nhanh subnet mask ca mng.

Mn 1 bit: 128

Mn 5 bit: 248

Mn 2 bit: 192

Mn 6 bit: 252

Mn 3 bit: 224

Mn 7 bit: 254

Mn 4 bit: 240

Mn 8 bit: 255

V d:

10.10.0.0 /13 mn 5 bit S/M: 255.248.0.0


155.55.3.32 /28 mn 12 bit = 8 +4 S/M: 255.255.255.240

Nu cc bn nhun nhuyn cch tnh ny, ti tin rng cc bn s tnh ton, chia Subnet rt nhanh!