Alterna · учебный материал
Subnet masks: network mathematics
Chapter 5.2 - Subset masks: hit and, CIDR-notation, calculation of network address, broadcast address and range of hosts.
Что в этом материале
- Battered I is the foundation of everything.
- CIDRnotation
- Problem algorithm
- Subnetting
- Data transmission rate
- Data transfer calculator
- Tasks on transmission speed
- Subnet calculator
- Training: Find the network address.
Содержание и основные понятия
Back to the table of contents
Alterna · Chapter 5 · page 5.2
Subnet masks: network mathematics
The mask determines which part of the IP address is the network and which part is the "neck." It's the key to the solution to EGE 13.
Suit yourself.
- It's a 32-bit number, where the units represent the network part of the address and the zeros are the host part.
Knowing the IP address and mask, you can tell
Network address
,
Public service address
and
The range of hosts available
This is what is being checked in EGE 13 on Informatics.
GEF · Basic
PLF · Infred
EEG No. 13
01
Battered I is the foundation of everything.
Operation AND: 1 AND 1 = 1, everything else = 0
GEF
EEG No. 13
Logical I (AND)
Operation
AND
It applies to each pair of bits. The result is 1 only if
both
The bat is equal to 1:
A
B
A AND B
0
0
0
0
1
0
1
0
0
1
1
1
Example: Network address
IP:
192.168.1.15
, mask:
255.255.255.0
Apply the AND to each octate:
192 AND 255 =
192
(all bits saved)
168 AND 255 =
168
1 AND 255 =
1
15 AND 0 =
0
(all bats get naked)
Network address:
192.168.1.0
Rule
The mask from the IP address bits, the mask from zeros, it's "fixing" them, the pieces in the mask = network, zeros = host.
02
CIDRnotation
/24, /16, /8 — Short Recording of the Mask
EEG No. 13
From mask to CIDR
CIDR
Classless Inter-Domain Routing is a classless address.
/N
where N is the quantity
units
In a binary mask.
CIDR
Mask (tenth)
Mask (dual)
Hosts
Example of use
/8
255.0.0.0
11111111.00000000.00000000.00000000
16 777 214
Large organizations
/16
255.255.0.0
11111111.11111111.00000000.00000000
65 534
Universities
/24
255.255.255.0
11111111.11111111.11111111.00000000
254
Home network
/26
255.255.255.192
11111111.11111111.11111111.11000000
62
Office segment
/28
255.255.255.240
11111111.11111111.11111111.11110000
14
The server counter
/30
255.255.255.252
11111111.11111111.11111111.11111100
2
Point-to-point channel
Formula: number of hosts
If the mask
/N
and then the host bits:
H = 32 − N
Number of addresses of nodes available:
Hosts = 2
H
− 2
Subtract 2 because
Network address
(all host bits = 0) and
Public service address
(all host bits = 1) cannot be used.
Typical error
Subtract 2 on network 24 (256 addresses) available
254
The host, not 256.
03
Problem algorithm
Step plan: from IP and masks to network address, Broadcast and range of hosts
EEG No. 13
Step 1: Network Address
Сеть = IP AND Маска
(and for each octate)
Step 2: Broadcast address
In the host, we put all the bits in 1.
Broadcast = Сеть OR (NOT Маска)
Step 3: Host range
First host = network address + 1
Last host = Broadcast - 1
Example
IP:
192.168.10.130
, mask:
255.255.255.192
(/26)
Network: 130 AND 192 = 10000010 AND 11000000 = 100 00000 =
128
Network:
192.168.10.128
Host bits: 32 - 26 = 6. Broadcast: 128 + 26 - 1 = 128 + 63 =
191
→
192.168.10.191
Host range:
192.168.10.129
—
192.168.10.190
Number of hosts: 26 - 2 =
62
Lifehak for the EEG
If the Octa mask = 192, the step of the subnets = 256 - 192 =
64
The subnets start with 0, 64, 128, 192. Find out which block the right octate hits and is ready.
04
Subnetting
Like one big network to make a few small
PIF
EEG No. 13
What do you need a subnet for?
One big network = a massive storm, security problems, chaos, breakup on the subnet solves all three problems.
How to Crush
From online
192.168.1.0/24
We need to make four subnets.
It was: (24 x 8 host bits ~ 254 hostess
So it's: 26 x 6 host bits ~ 62 hostess in each of the 4 subnets
Subnet
Network address
First Host
Last Host
Broadcast
0
192.168.1.0
192.168.1.1
192.168.1.62
192.168.1.63
1
192.168.1.64
192.168.1.65
192.168.1.126
192.168.1.127
2
192.168.1.128
192.168.1.129
192.168.1.190
192.168.1.191
3
192.168.1.192
192.168.1.193
192.168.1.254
192.168.1.255
Formula
Borrowing
k
Bit ♪ received
2
k
The hairbeat becomes
32 − N − k
, the hosts in each:
2
32−N−k
− 2
.
05
Data transmission rate
Formula t = V / q and translation of units - Tasks EGE No. 8, 11
GEF
EEG No. 8
EGE No. 11
Basic formula
Transfer Time
= Data acquisition / Channel speed:
t = V / q
Where?
t
- time (seconds),
V
- volume of data (bits),
q
- Canal speed (beat/s).
Three forms of formula
Find
Formula
Example
Time t
V / q
File 8 Mbit at 2 Mbit/s t = 8/2 = 4 s
Group V
q × t
Channel 5 Mbit/s, 10 s V = 50 Mbit
q Speed
V / t
20 Mbits in 4 s q = 5 Mbit/s
Translation of Units — The EGE Trap
Warning
In the tasks of the EGE, the speed of the canal is given in
bats
(beat/s, Kbps, Mbit/s) and file size in
Bytes
Don't forget to multiply by 8!
Unit
= Bat
When used
1 byte
8 bits
Symbol Size
1 Kbyte
8 x 1024 = 8192 bits
Text files
1 Mbit
8 x 10242 = 8 388 608 bits
Photos, documents
1 Kbit/s
1000 bits/s
Slow channels
1 Mbit/s
1,000,000 bits/s
Home Internet
Important for the EGE
B
Speed
canals: 1 Kbit = 1000 bits, 1 Mbit = 1,000 Kbit (ten-year drive).
B
Volumes
Files: 1 Kbyte = 1,024 bytes, 1 Mbytes = 1024 Kbytes (dual drive).
In some tasks, the EGE is simplified: 1 Kbyte = 1,000 bytes. Read the condition carefully!
Example of Decision (EGE)
Objective:
A 10-Mbyte file is being transmitted through the channel at a rate of 2 Mbit/s. How many seconds will the transmission take?
Transfer volume to bits: 10 mbytes = 10 x 8 =
80 Mbit
t = V / q = 80 / 2 =
40 seconds
⚡
Data transfer calculator
V · q · t — Find unknown
Interactor
Enter two values, the calculator will compute the third. Note the units of measurement!
Interpretation (V):
Speed (q):
Time (t):
📐
Tasks on transmission speed
5 random tasks · format of EGE No. 8, 11
Interactor
The answer is the number (maybe the point for the fractions). The units are specified on condition.
🧮
Subnet calculator
IP mask · network · Broadcast · Hosts
Interactor
Enter the IP address and subnet mask — calculator will show the network address, Broadcast, the host range, and the binary representation.
IP address:
Mask (CIDR or decimal):
📝
Training: Find the network address.
5 random tasks · format EGE No. 13
Interactor
Do the tasks: I.P. and the mask, identify the address of the network. Please enter the answer in the format
X.X.X.X
.