Alterna · учебный материал
IP addresses: Network language
Chapter 5.1 - IP addresses: structure IPv4, address classes, private and public addresses, NAT, introduction to IPv6.
Что в этом материале
- What an IP address is
- IP Addresses
- Private and public addresses.
- IPv6: why 128 bits
- Researcher of IP addresses
- Battered I: How the mask works
Содержание и основные понятия
Back to the table of contents
Alterna · Chapter 5 · page 5.1
IP addresses: Network language
Each device on the network, from phone to Google, has a number address. It's sorted out as IPv4, why classes and private addresses are needed, and why the world is moving to IPv6.
IP address
It's a unique number identifier for a device on the network, and without it, the data sets wouldn't know where to go.
In chapter 4, you learned that DNS converts domain names to IP addresses.
How IP addresses are designed
- from the binary record to the classes and the masks.
GEF · Basic
PLF · Infred
OGE No. 7, 8
EEG No. 13
01
What an IP address is
32 bits, 4 octates, the point between them is the anatomy of IPv4 address.
GEF
OGE No. 7
IPv4: Record format
IPv4
Internet Protocol version 4 is the fourth version of the Internet protocol.
32 bits
divided by
4 octates
8 bits. Each octat is recorded in decimal form and can take the value of
0
up to
255
.
Example:
192.168.1.15
192 ♪ first octate (11000000 in binary)
168 × second octate (10101000)
1rd octate (000000001)
15 ♪ Fourth octate (0000111)
192
11000000
.
168
10101000
.
1
00000001
.
15
00001111
octate 1
octate 2
octate 3
octate 4
8 bits
8 bits
8 bits
8 bits
32 bits = 4 x 8 bits
Figure 1.
IPv4 address structure: 4 octates of 8 bits, decimal place through point
Duplicate and decimal systems
Each octat is eight bits. The two steps are 128, 64, 32, 16, 8, 4, 2, 1.
1
.
Example:
11000000
= 128 + 64 =
192
Example:
10101000
= 128 + 32 + 8 =
168
Remember.
Maximum octane value:
11111111
= 128+64+32+16+8+4+2+1 =
255
Therefore, there are no more than 255 octates in IPv4.
Address and port
IP address identifies device, a
port
- a specific program on this device.
192.168.1.15:8080
— IP
192.168.1.15
port
8080
.
Standard ports: HTTP - 80, HTTPS - 443, FTP - 21, SSH - 22.
02
IP Addresses
A, B, C, D, E — how the first bits determine the size of the network
PIF
EEG No. 13
Classic targeting
The IP addresses were originally divided into
5 grades
The class determined how many bits are assigned to the first octate.
Network
(network) and how much
knot
(host).
Grade
First Bits
Range 1 Oct.
The mask is silent.
Networks
Network sites
A
0xxx
1 – 126
/8 (255.0.0.0)
126
16 777 214
B
10xx
128 – 191
/16 (255.255.0.0)
16 384
65 534
C
110x
192 – 223
/24 (255.255.255.0)
2 097 152
254
D
1110
224 – 239
—
Multicast
E
1111
240 – 255
—
Reserved
Important
Classic targeting is an outdated approach.
CIDR
(unclassed address) where you can choose the mask randomly, but the classes still meet in examination tasks.
Special addresses
Address / range
Appointment
0.0.0.0
"This host" is used for downloading (DHCP)
127.0.0.0/8
Loopback (loopback)
127.0.0.1
= "the computer itself"
255.255.255.255
Broadcast (broadcast) all on local network
169.254.x.x
Link-local — When DHCP did not reply (APIPA)
03
Private and public addresses.
Why does your laptop have "192.168.x.x" and how it goes online?
GEF
OGE No. 7
Private (private) addresses
Not all IP addresses are routed on the Internet. Three ranges reserved for
Local area networks
- they don't go beyond your network:
Range
Grade
Mask
Size
10.0.0.0 – 10.255.255.255
A
/8
16.7 million addresses
172.16.0.0 – 172.31.255.255
B
/12
1 million addresses
192.168.0.0 – 192.168.255.255
C
/16
65,000 addresses
NAT - Network Addresses
NAT
(Network Address Translation) allows dozens of devices with private addresses to go online.
1 public IP
Rowter replaces the sender ' s address in outgoing packages and memorizes who gets the answer back.
🏠
Home network
analogy: one apartment, one mailbox
All devices behind the router have addresses.
192.168.1.x
Router sends their queries to the Internet via NAT from its public IP.
🏢
Corporate network
analogy: office centre, reception
Thousands of computers with addresses
10.x.x.x
The NAT sluice is running a correspondence table.
Relationship to Chapter 4
In chapter 4, you learned that DNS converts domains to IP. Now you see: DNS returns
public
The IP server, and your computer's going through the NAT router.
04
IPv6: why 128 bits
IPv4 Ended — The World Moves to IPv6
PIF
EEG No. 13
IPv4 problem
IPv4 gives 232 E
4.3 billion
By 2010, it was over. NAT postponed the crisis, but did not solve the problem completely.
IPv6: format
IPv6 —
128 bits
is recorded in eight groups of four sixteen digits, using colons:
2001:0db8:85a3:0000:0000:8a2e:0370:7334
Zero groups can be reduced:
::
For
:0000:0000:
The leading zeros in the group can be deleted:
0db8
→
db8
Abbreviated:
2001:db8:85a3::8a2e:370:7334
Scale
IPv6 gives 2,128 E 3.4 x 1,038 addresses -- that's about
6,7 × 10²³
Addresses per square metre of Earth's surface.
Comparison IPv4 and IPv6
Parameter
IPv4
IPv6
Length
32 bits
128 bits
Recording
Decimal across point
Sixteen in colon
Number of addresses
≈ 4,3 × 10⁹
≈ 3,4 × 10³⁸
Heading
20 - 60 byte
40 bytes (fixed)
NAT
Often needed
No need (all addresses)
Security
IPsec
IPsec - integrated
🔍
Researcher of IP addresses
Enter IP · class · binary · address type
Interactor
Enter the IPv4 address and learn its binary representation, class, type and other information.
IPv4 address:
⚡
Battered I: How the mask works
IPv4 · mask · network address
Interactor
Network address = AND mask address. Press Next Octette to see how beaten and defines the network part.