Está en la página 1de 11

Hng dn chia a ch mng con theo phng php ti u VLSM

Qua qu trnh ging dy cc sinh vin, c bit mt s bn vn cn b ng vi cch


chia a ch mng con theo VLSM, phng php ny s gip chng ta kim sot c s mng
mi sinh ra, s mng dng, s mng d tha cn li, sau y ti s hng dn cc bn thc
hin vic ny mt cch d dng bng v d minh ha. Trc ht, chng ta phi hiu r cu trc
ca a ch IP v4 v ngha ca mt s khi nim: v d cc lp a ch IP v4, Net_id, host_id,
Subnet
Mask,
gii
a
ch
kh
dng,
a
ch
mng,

chia thnh tho, chng ta cn nm r mt s khi nim v cng thc sau y:


Bit,
byte.
Khi
nim
v
s
nh
phn,
thp
phn.
Php
ton
AND
- Cc bin i t nh phn sang thp phn, t thp phn sang nh phn.
Cu
trc
a
ch
IP,
gii
hn
ca
cc
lp
IP
Khi
nim
v
default
mask,
mask,
subnet,
subneting
....!
Cc
a
ch
ring
Lu
:
- a ch mng (subnet) : tt c cc bit dnh cho phn host bng 0
- a ch broadcast: tt c cc bit dnh cho phn host bng 1.
- a ch u tin hp l: l a ch lin sau a ch mng (subnet)
- a ch cui cng hp l: l a ch lin trc a ch broadcast
=> phi hiu r v phn bit khi nim n v m l g p dng cng thc cho ng
Cng
thc:
+ S subnet c to ra: 2m (m: s bit mn ca phn Host ID) (Ch : ng l
cng thc ny phi l 2m 2 v phi loi tr i 2 mng u tin subnet zero v
mng cui cng subnet broadcast, nhng vi cc dng Router hin nay ca Cisco
h tr lnh Router(config)# ip subnet-zero do ta vn c th s dng 2 mng

m
khng
phi
loi
tr
b
i)
+
S
host
/
subnet:
2n
2 (n: s bit cn li ca phn Host ID sau khi b mn m bit)
+ Subnet Mask mi = Subnet Mask c + m (l s bit va b mn)
+ a ch kh dng l cc a ch IP c th gn cho mi host, thit b
(Lu : c nhiu cch hoc th thut tnh a ch mng con, nhng cch no cng phi da
vo nn tng gc l s thay i cc bit mn sinh ra mng con mi, do tt nht chng
ta
nn
tham
kho
theo
phng
php
VLSM)
V

MU

1:

Cho gii a ch 172.35.0.0/16 , hy Subnet cp cho cc mng con:


A:
320
host
B:
115
host
C:
80
host
D:
30
host
E:
2
host
F:
2
host
G:
2
host
theo
phng
php
VLSM?

Hng
dn
Theo
u
bi
cho
a
=>
i
ra
h
10101100.00100011.00000000.00000000
11111111.11111111.00000000.00000000

ch

ban
nh

gii
u
l
phn

mu:
X:
172.35.0.0/16
ta
c:

(Phn gch chn chnh l phn bit host, vic chia t a ch trn thnh nhiu Subnet chnh l vic
bin i hay gi l mn cc bit phn host_id chuyn thnh cc bit Net_id; Nhn vo s bit 1
ca a ch Subnet Mask ta s phn bit c danh gii: cc bit bn trn bit 1 chnh l Net_id,
cc
bit
bn
trn
bit
0
l
host_id)
- B1: Theo VLSM th ta s phi chia X cho cc mng theo chiu gim dn, tc l chia cho mng
c s host cao nht ri thp nht cui cng-> sp xp li ta c:
+A:
320
+B:115
+C:80
+D:30
+E:2
+F:2
+G:2
- B2: +Thc hin chia X cho mng A u tin, p dng cng thc: 2n
- 2 320 => n=9 (chnh l s bit cn li cha b mn) => s bit mn l m= 32 (l tng s
bit ca 1 a ch IP v4) 16 (s bit thuc phn Net_id ca a ch cho) 9 ( s bit cn li) = 7
=> SM (Subnet Mask mi) = SM (Subnet Mask c) + m = 16 + 7 = 23 ( vit tt l /23) & s
Subnet (mng con) c to ra l: 2m = 27 = 128 vi SM thay i t /16 thnh /23 (cc bit
trong
khong
ny
ca
X

chuyn
sang
Octet
th
3)
nn
ta
c

Bi vit s dng ti liu ca: hieplh.it07@gmail.com

VLSM: Chia mng con - Subnet mask


Xem: 1705

VLSM:

Variable

length

subnet

mask.

y l mt cch chia mng con ti u hn FLSM, n da trn nhu cu s Host IP ca mi ng


mng (subnet) m ta chia. Do s tit kim ti a c IP tha trn mi subnet. Lu subnet
mask
(phn
/xx)
ca
mi
ng
nh.

Bi vit ny s khng gii thch nhiu v cc khi nim m ch lm mt v d chia subnet da trn
VLSM. Nn c bi FMSL c khi nim k hn. By gi bt u nh!
Mt ngy p tri no , sp thu c mt ng mng 192.168.1.0/24 t mt ISP. "Hy chia ra
4 ng mng con trong mt ng dng 50 PC, ng th 2,3 dng cho 10 PC v ng cn
li dng 2 PC, nh tit kim !" y l li ca sp
. Chia theo FMSL th 3 ng mng c s IP
dng cho Host bng nhau th th qu ph. Vi vic chia nhng subnet m c s Host chnh lch th
ny
th
hy
ngh
ngay
ti
VLSM.
Cng vic u tin l bn xc nh xem trong nhng ng mng cn chia, ng mng no c
s IP
host
l
nhiu
nht.

y
l 50.
Theo cng thc 2^x >= m (vi m l s host cn chia, x l s cn lm Host ID) ta s tm s bit lm
Host ID l 6 do 2^6 >= 50. Subnet mask lc ny l11111111.11111111.11111111.11000000
(255.255.255.192/26). Do ta ch dng 6 bit l Host ID nn tha 2 bit s dng lm ng mng. Vi 2
bit ta s c 4 ng mng, cch tnh ng mng hy xem bi trc nh.
192.168.1.0/26
192.168.1.64/26
192.168.1.128/26
192.168.1.192/26
Vy ta dng ng mng 192.168.1.0/26 cho 50 PC. Nu ta ly ng 192.168.1.64/26 cho 10 PC
th
qu
ph
nn
t
ng
ny
ta
quyt
nh
chia
nh
ra
na.
Cch lm tng t 2^x >= 10 suy ra x = 4. Ta cn 4 bit phn Host ID v d 4 bit lm ng mng
nn c Subnet mask l 11111111.11111111.11111111.11110000 (255.255.255.240/28). Cc ng
mng
thu
c
192.168.1.64/28
192.168.1.80/28
192.168.1.96/28

192.168.1.112/28
- 192.168.1.128/28 do trng vi ng mng ln pha sau 192.168.1.128/26 nn b v dng li.
Vy ta s dng 192.168.1.64/28, 192.168.1.80/28 cho hai ng 10 PC. Ta li cn li 2 ng va
chia khng s dng m nhu cu ca ta ch cn 1 ng mng 2 PC na thui. Chn 1 trong 2 ng
tip

tc

chia

nh,

chn

192.168.1.96/28

Vi 2 PC ta cn 2 bit lm Host ID v d 6 bit lm Network ID. Lc ny Subnet mask


l11111111.11111111.11111111.11111100 (255.255.255.252/30). Thc ra 2 PC ch cn 1 bit
nhng ti thiu Host ID l 2 bit nn chn 2 ( Xem bi trc ). Ta li c cc ng mng sau
192.168.1.96/30
192.168.1.100/30
192.168.1.104/30
192.168.1.108/30 STOP!! V
ng
tip
theo
s
trng.
Ta chn 192.168.1.96/30 cho ng 2 PC vy l xong. Cc ng cn li ct khi no cn li ra
dng
M phng li bng s :

tip.