Phương Pháp VLSM - Mau - Phan Nhu Minh

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

BÀI TẬP VỀ CHIA MẠNG CON THEO PHƯƠNG PHÁP VLSM

Gọi:
n là số Bit còn lại phần HOST_ID
m là số bít mượn từ HOST_ID
k là bước nhảy
m+n=Host-id ban đầu
Net_id + Host_id =32 ->vì /24 => Host còn lại ban đầu là 8
2^n-2>=Host(max)->n=?
Subnet = 2^m
K=2^n =? Bước nhảy sang đường mạng kế tiếp
/mới=/cũ+m
Nếu m#0 Chia tiếp
Nếu m=0 Cấp luôn, chia mạng kế tiếp

Bài 1. Network address 172.31.103.0/24. The network has the following requirements:
 Sw1: 27 host IP addresses
 Sw2: 25 host IP addresses
 Sw3: 14 host IP addresses
 Sw4: 8 host IP addresses

a. 172.31.103.0000 0000/24
2^n-2>=Host(max) 27 =>n=5
m=32-24-5=3
=>m=3=> Subnet 8,
k=2^n=32
/mới=/cũ+m=24+3=27
0:172.31.103.0000 0000/27->172.31.103.0/27
1:172.31.103.0010 0000/27->172.31.103.32/27
2:172.31.103.0100 0000/27->172.31.103.64/27
3:172.31.103.0110 0000/27->172.31.103.96/27
4:172.31.103.1000 0000/27->172.31.103.128/27
5:172.31.103.1010 0000/27->172.31.103.160/27
6:172.31.103.1100 0000/27->172.31.103.192/27
7:172.31.103.1110 0000/27->172.31.103.224/27

Lấy 2 Subnet đầu:


0:172.31.103.0000 0000/27->172.31.103.0/27 Cấp 27
1:172.31.103.0010 0000/27->172.31.103.32/27 Chia 25
b. 172.31.103.0010 0000/27->172.31.103.32/27
2^n-2>=25 =>n=5
m=32-27-5=0 do m =0 Cấp tiếp!
172.31.103.0010 0000/27->172.31.103.32/27 Cấp 25
c. Chia cho 14
2:172.31.103.0100 0000/27->172.31.103.64/27
2^n-2>=14 =>n=4
=>m=32-27-4=1
=>m=1=>Subnet 2,
k=2^n=16
/mới=/cũ+m=27+1=28
172.31.103.0100 0000/28->172.31.103.64/28 Cấp 14
172.31.103.0101 0000/28->172.31.103.80/28 Cấp 8
0:172.31.103.0000 0000/27->172.31.103.0/27 Cấp 27
0:172.31.103.0010 0000/27->172.31.103.32/27 Cấp 25
0.1:172.31.103.0100 0000/28->172.31.103.64/28 Cấp 14
0.2:172.31.103.0101 0000/28->172.31.103.80/28 Cấp 8

Bài 2: Determine the number of subnets needed.


You will subnet the network address 10.11.48.0/24. The network has the following requirements:
 Sw1 LAN will require 14 host IP addresses
 Sw2 LAN will require 30 host IP addresses
 Sw3 LAN will require 6 host IP addresses
 Sw4 LAN will require 60 host IP addresses
 WAN will require 2 host IP addresses

How many subnets are needed in the network topology?


A. Sắp xếp:

Sw4 LAN will require 60 host IP addresses


Sw2 LAN will require 30 host IP addresses
Sw1 LAN will require 14 host IP addresses
Sw3 LAN will require 6 host IP addresses
WAN net will require 2 host IP addresses

A. Chia 60
10.11.48.0000 0000/24
2^n-2>= 60 =>n=6
=>m=32-24-6=>m=2=> Subnet 4,
k=2^n=64
/mới=/cũ+m=24+2=26

10.11.48.0000 0000/26 10.11.48.0/26


10.11.48.0100 0000/26 10.11.48.64/26
10.11.48.1000 0000/26 10.11.48.128/26
10.11.48.1100 0000/26 10.11.48.192/26

Lấy 2 Subnet đầu:


10.11.48.0000 0000/26 10.11.48.0/26 Cấp 60
10.11.48.0100 0000/26 10.11.48.64/26 Chia 30

B. Chia 30

10.11.48.0100 0000/26
2^n-2>= 30 =>n=5
=>m=32-26-5=1=>m=1=> Subnet =2,
k=2^n=32
/mới=/cũ+m=26+1=27

10.11.48.0100 0000/2710.11.48.64/27 Cấp 30


10.11.48.0110 0000/2710.11.48.96/27 Chia 14

C. Chia 14

10.11.48.0110 0000/27

2^n-2>= 14 =>n=4
=>m=32-27-4=1
=>m=1=>Subnet 2,
k=2^n=16
/mới=/cũ+m=27+1=28

10.11.48.0110 0000/28 10.11.48.96/28 Cấp 14


10.11.48.0111 0000/28 10.11.48.112/28 Chia 6

D. Chia 6

10.11.48.0111 0000/28 10.11.48.112/28

2^n-2>= 6 =>n=3
=>m=32-28-3=1
=>m=1=>Subnet 2,
k=2^n=8
/mới=/cũ+m=28+1=29

10.11.48.0111 0000/29 10.11.48.112/29 Cấp 6


10.11.48.0111 1000/29 10.11.48.120/29 Chia 2

E. Chia 2

10.11.48.0111 1000/29 10.11.48.120/29

2^n-2>= 2 =>n=2
=>m=32-29-2=1
=>m=1=>Subnet 2,
k=2^n=4
/mới=/cũ+m=29+1=30

10.11.48.0111 1000/30 10.11.48.120/30 Cấp 2


10.11.48.0111 1100/3010.11.48.124/30 ????? Không dùng

Cấp Subnet:
==============
10.11.48.0/26 Cấp 60
10.11.48.64/27 Cấp 30
10.11.48.96/28 Cấp 14
10.11.48.112/29 Cấp 6
10.11.48.120/30 Cấp 2

Bài 3: Determine the number of subnets needed.


You will subnet the network address 192.168.72.0/24. The network has the following requirements:
 Sw1 LAN will require 7 host IP addresses
 Sw2 LAN will require 15 host IP addresses
 Sw3 LAN will require 29 host IP addresses
 Sw4 LAN will require 58 host IP addresses
How many subnets are needed in the network topology?

You will subnet the network address 192.168.72.0/24. The network has the following requirements:
 Sw4 LAN will require 58 host IP addresses
 Sw3 LAN will require 29 host IP addresses
 Sw2 LAN will require 15 host IP addresses
 Sw1 LAN will require 7 host IP addresses
 WAN NET will require 2 host IP addresses

192.168.72.00000000/24
2^n-2>= 58 =>n=6
=>m=32-24-6=>m=2=> Subnet 4,
k=2^n=64
/mới=/cũ+m=24+2=26

192.168.72.00000000/26 192.168.72.0/26 Cấp 58


192.168.72.01000000/26 192.168.72.64/26 Chia 29
192.168.72.10000000/26 192.168.72.128/26 Chia 7 ???
192.168.72.11000000/26
2. 192.168.72.01000000/26
2^n-2>= 29 =>n=5
=>m=32-26-5=>m=1=> Subnet 2,
k=2^n=32
/mới=/cũ+m=26+1=27
192.168.72.01000000/27 192.168.72.64/27Cấp 29
192.168.72.01100000/27 192.168.72.96/27 Chia 15
3. 192.168.72.01100000/27
2^n-2>= 15 =>n=5
=>m=0 cấp cho 15
192.168.72.01100000/27 192.168.72.96/27 Cấp 15

4. 192.168.72.10000000/26 Chia 7

2^n-2>= 7 =>n=4
=>m=32-26-4=>m=2=> Subnet 4,
k=2^n=16
/mới=/cũ+m=26+2=28
192.168.72.10000000/28 192.168.72.128/28 Cấp 7
192.168.72.10010000/28 192.168.72.144/28 Chia 2

5. 192.168.72.10100000/28 Chia 2
2^n-2>= 2 =>n=2
=>m=32-28-2=>m=2=> Subnet 4,
k=2^n=2
/mới=/cũ+m=28+2=30
192.168.72.10100000/30 192.168.72.144/30 cấp 2
192.168.72.10101000/30
192.168.72.10110000/30
192.168.72.10111000/30

Cấp Subnet:
192.168.72.0/26 Cấp 58
192.168.72.64/27Cấp 29
192.168.72.96/27 Cấp 15
192.168.72.128/28 Cấp 7
192.168.72.144/30 cấp 2

Bài 4: Determine the number of subnets needed.


You will subnet the network address 186.86.192.0/20. The network has the following requirements:

LAN1 110 hosts


LAN2 220 hosts
Loopback3 133 hosts
WAN 2 hosts
LAN 4 240 host
How many subnets are needed in the network topology?

Sắp xếp:
LAN 4 240 host
LAN2 220 hosts
Loopback3 133 hosts
LAN1 110 hosts
WAN 2 hosts

1. 186.86.192.0000 0000/20

2^n-2>= 240 =>n=8


=>m=32-20-8=>m=4=> Subnet 16,
k=2^n=256
/mới=/cũ+m=20+4=24
186.86.11000000.0000 0000/24 186.86.192.0/24 cấp 240
186.86.11000001.0000 0000/24 186.86.193.0/24 chia 220
186.86.11000010.0000 0000/24 186.86.194.0/24 Chia 133
186.86.11000011.0000 0000/24 186.86.195.0/24 Chia 110
----------------------------------------
186.86.11001111.0000 0000/24

2. 186.86.11000001.0000 0000/24
2^n-2>= 220 =>n=8
=>m=32-24-8=>m=0=>
186.86.11000001.0000 0000/24 186.86.193.0/24 Cấp 220

3. 186.86.11000010.0000 0000/24
=>m=32-24-8=>m=0=>
186.86.11000010.0000 0000/24 186.86.194.0/24 Cấp 133

4. 186.86.11000011.0000 0000/24 186.86.195.0/24 Chia 110


2^n-2>= 110 =>n=7
=>m=32-24-7=>m=1=> Subnet 2,
k=2^n=128
/mới=/cũ+m=24+1=25

186.86.11000011.0000 0000/25 186.86.195.0/25 Cấp 110


186.86.11000011.1000 0000/25 186.86.195.128/25 Chia 2

5. 186.86.11000011.1000 0000/25
2^n-2>= 2 =>n=2
=>m=32-25-2=>m=5=> Subnet 32,
k=2^n=4
/mới=/cũ+m=25+5=30
186.86.11000011.1000 0000/30 186.86.195.128/30 Cấp 2
186.86.11000011.1000 0100/30 186.86.195.132/30 Thừa
-----------------------------------------------
186.86.11000011.1111 1100/30 186.86.195.252/30 Thừa

Tóm lại:
186.86.192.0/24 Cấp 240
186.86.193.0/24 Cấp 220
186.86.194.0/24 Cấp 133
186.86.195.0/25 Cấp 110
186.86.195.128/30 Cấp 2

You might also like