当前位置:网站首页>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
边栏推荐
- An easy problem
- [Suanli network] problems and challenges faced by the development of Suanli network
- Go quiz: considerations for function naming return value from the go interview question (more than 80% of people answered wrong)
- Ping command – test network connectivity between hosts
- Folding mobile phones are expected to explode, or help Samsung compete with apple and Chinese mobile phones
- Laravel8 fill data
- Location object
- [data visualization application] draw spatial map (with R language code)
- Use generator-easy-ui5 to quickly create the engineering structure of SAP ui5 applications
- SAP Fiori tools and corresponding cli (command line interface)
猜你喜欢
MySQL transaction learning notes (I) first encounter
SAP ui5 application development tutorial XXIX - Introduction to routing and navigation functions of SAP ui5 trial version
Various errors and solutions encountered when deploying SAP ui5 application to ABAP server with SAP Fiori tools
Wind farm visualization: wind farm data
Use generator-easy-ui5 to quickly create the engineering structure of SAP ui5 applications
Soft exam information system project manager_ Information system security management - Senior Information System Project Manager of soft test 026
SAP ui5 beginner tutorial No. 28 - Introduction to the integration test tool OPA for SAP ui5 applications
Mongodb basic concept learning - Documentation
Rhcsa--- day 6 operation
SAP ui5 beginner tutorial 25 - using proxy server to solve the cross domain problem of SAP ui5 application accessing remote OData service trial version
随机推荐
Highway
You can't specify target table for update in from clause error in MySQL
Handling skills of SQL optimization (2)
No one reads the series. Source code analysis of copyonwritearraylist
[interview with a large factory] meituan had two meetings. Was there a surprise in the end?
Lesson 9: workspace introduction
MySQL tuning --01--- optimization steps and system performance parameters
Vscode voice notes to enrich information (medium)
Pre knowledge of asynchronous operation
Investment opportunities and operational risk assessment report of China's engineering consulting industry during the 14th Five Year Plan period 2022-2028
MV command – move or rename files
Echo command – output a string or extract the value of a shell variable
What elements are indispensable for the development of the character? What are the stages
Ping command – test network connectivity between hosts
Tail command – view the contents at the end of the file
Day21 performance test process
Laravel8 fill data
Curl command – file transfer tool
50 days countdown! Are you ready for the Landbridge cup provincial tournament?
Aiot project that is an introduction to the basics of the Internet of things and can be implemented in practice