当前位置:网站首页>What is the IP address
What is the IP address
2022-06-25 06:17:00 【Programmer community】
In use TCP/IP When communication , use IP Address identification hosts and routers . In order to ensure normal communication , It's necessary to configure each device with the right IP Address , Otherwise, normal communication cannot be realized at all
IPv4
IPv4 Address by 32 Bit composition , common 4 Bytes , People are more used to decimal system , So we convert every byte to decimal , The middle is separated by dots , such as 192.168.1.1

IPv4 How many addresses can be assigned ?2^32 = 4 294 967 296, almost 43 One hundred million , That is to say, at most 43 Hundreds of millions of devices are connected to the network at the same time , And in the 2019 year IPv4 The address is officially exhausted

IP The address is not configured according to the host , In other words, a host can not only have one IP Address , But according to the network card settings IP Address , however , The network card can also set multiple IP, You can also not configure IP Address . It's like a router , There are usually two network cards
Then your computer's IP How is the address assigned ? Is it distributed at will ? There are so many devices in the global network ,IP The address is the unique identification of the device , It's impossible to configure it at will , What should I do if I repeat
IP The address is identified by the network ( network address ) And host identification ( The host address ) form
The network identifier is the unique identifier for each segment of the data link , let me put it another way , The network ID is the only network address of a LAN , Every LAN has its own network segment
The host ID is the unique ID of the host in the same LAN , A host in the same LAN cannot have the same host address
thus :
A mainframe's IP The address is made up of a unique network address + A unique host address makes up a unique IP Address , To ensure the IP The uniqueness of address in global network
How to divide network address and host address ? There are two ways
- 192.168.1.1/24, The network address has 24 A bit

192.168.1 It's the Internet address ,1 It's the host address
- 192.168.1.1,Netmask 255.255.255.0, Use subnet mask netmask Express

The subnet mask is IP All the network address bits of the address are set to 1, The host address bits are all set to 0, Then each 8 A group of bits , In decimal
IPv4 There are four types of addresses :

- A Class address
The first is 0, front 8 Bit is the network address , The network address range is 0000 0000 - 0111 1111, Distributable A Class segment is 0.0.0.0 - 127.0.0.0
- B Class address
The first two are 0, front 16 Bit is the network address , Distributable B Class segment is 128.0.0.1 - 191.255.0.0
- C Class address
The first three are 110, front 24 Bit is the network address , Distributable C Class segment is 192.168.0.0 - 239.255.255.0
- D Class address
The top four are 1110, All 32 Bits are all network addresses , Distributable D Class segment is 224.0.0.0 - 239.255.255.255,D Class address has no host address , Suitable for multicast address ( Why? ?)
If you want to configure your host network card IPv4 Address , The host address can't be repeated , It can't be all 0 Or all of them 1, Because it's all 0 Only in IP Use when the address is unknown , And the whole 1 Indicates the broadcast address
although IPv4 The addresses are classified , But it can't be so rigid in practice , It needs to be set flexibly according to the number of hosts in the LAN
such as C The number of hosts with class addresses is 255, And I want to build a LAN within the host only 50 individual , Then I use C Class addresses waste resources , What shall I do? ? Network address and host address can be flexibly divided , To meet the actual use . By what ? Subnet mask
For example, there are at most 50 Console host , use C Class address waste , The host address bit can be shortened appropriately , from C Class 8 individual bit Shorten to 6 individual ,2^6 = 63, At most configurable 63 Host computer , The corresponding network address bit is 26 position

The subnet mask is 255.255.255.192
IPv6
In order to solve IPv4 The problem of address exhaustion ,IPv6 emerge as the times require
IPv6 yes IPv4 Of 4 times , from 128 It's made up of two bits , common 16 Bytes , and IPv4 use 10 Hexadecimal means different ,IPv6 per 16 Bit is a group. , use 16 Hexadecimal said , The middle is separated by a colon , such as :DEAF:2780:3A4E:0189:C3D5:F728:6B23:1011
that IPv6 How many addresses can be assigned ?2^128, It's said that one can be assigned to every grain of sand on the earth IPv6 The address of
IPv6 No, ABCD Class address , There is no subnet mask , Its addressing method is not ARP Addressing , Those who are interested can understand by themselves , I don't know much
边栏推荐
- PHP output (print) log to TXT text
- Understanding of process, thread, task queue, event loop, macro task, micro task, execution stack and other concepts in JS
- Fdisk command – disk partition
- Add the author watermark plugin v1.4 update to the posts of elegant grass discuz plugin - some forums post errors and bugs have been fixed
- [golang] leetcode intermediate - Search rotation sort array & search two-dimensional matrix II
- Guess the size of the number
- Websocket in the promotion of vegetable farmers
- MySQL transaction learning notes (I) first encounter
- Rhcsa day 4
- Huawei machine test question: splicing URL
猜你喜欢
Part 33 of SAP ui5 application development tutorial - trial version of responsiveness of SAP ui5 applications
Use generator-easy-ui5 to quickly create the engineering structure of SAP ui5 applications
![[road of system analyst] collection of wrong questions in the chapters of Applied Mathematics and economic management](/img/62/dab2ac0526795f2040394acd9efdd3.jpg)
[road of system analyst] collection of wrong questions in the chapters of Applied Mathematics and economic management
Trial version of routing history and routing back and history of SAP ui5

Three tier architecture experiment

No one reads the series. Source code analysis of copyonwritearraylist
The e-book "action guide for large organizations to further promote zero code application platform" was officially released!

Soft exam information system project manager_ Information system security management - Senior Information System Project Manager of soft test 026

What happens when redis runs out of memory
Tutorial 35 of SAP ui5 application development - how to deploy locally developed SAP ui5 applications to ABAP server for trial reading
随机推荐
[open source sharing] deeply study KVM, CEPH, fuse features, including open source projects, code cases, articles, videos, architecture brain maps, etc
Monitoring access: how to grant minimum WMI access to the monitoring service account
3-7sql injection website instance step 3: attack type and attack strategy
Noi Mathematics: Dirichlet convolution
Various errors and solutions encountered when deploying SAP ui5 application to ABAP server with SAP Fiori tools
Day21 performance test process
Three tier architecture experiment
What is hybrid web containers for SAP ui5
[golang] leetcode intermediate - Search rotation sort array & search two-dimensional matrix II
Uname command – displays system information
SAP ui5 beginner tutorial No. 27 - unit test tool quNit introduction trial version for SAP ui5 application
Go microservice development toolkit
Methods for obtaining some information of equipment
Technology Review: Interpretation of cloud native architecture trend in 2022
Guess the size of the number
How to open an account online? Is it safe to open an account online?
PHP output (print) log to TXT text
C simple operation mongodb
Vscode voice notes to enrich information (medium)
Highway