当前位置:网站首页>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
边栏推荐
- C switch nested syntax
- Analysis report on production and sales demand and sales prospect of global and Chinese phosphating solution Market 2022-2028
- Find command – find and search for files
- Monitoring access: how to grant minimum WMI access to the monitoring service account
- Getting started with mongodb
- Huawei machine test question: splicing URL
- Part 34 of SAP ui5 application development tutorial - device adaptation of SAP ui5 application based on device type
- [road of system analyst] collection of wrong questions in the chapters of Applied Mathematics and economic management
- Wind farm visualization: wind farm data
- Ping command – test network connectivity between hosts
猜你喜欢

Pre knowledge of asynchronous operation

MySQL tuning -- 02 -- slow query log
Use generator-easy-ui5 to quickly create the engineering structure of SAP ui5 applications
Part 33 of SAP ui5 application development tutorial - trial version of responsiveness of SAP ui5 applications

Day21 JMeter usage basis

The elephant turns around and starts the whole body. Ali pushes Maoxiang not only to Jingdong
![[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

Mongodb basic concept learning - Documentation
SAP ui5 application development tutorial 32 - how to create a custom SAP ui5 control
Do you know what a three-tier architecture is?
随机推荐
Vegetables sklearn - xgboost (2)
SAP ui5 beginner tutorial No. 28 - Introduction to the integration test tool OPA for SAP ui5 applications
Day21 JMeter usage basis
Click to send text messages without response is a common problem for many users in building the elegant grass Dragonfly Q system - solve the problem of clicking to send text messages without response
Leetcode topic [array] -36- effective Sudoku
The elephant turns around and starts the whole body. Ali pushes Maoxiang not only to Jingdong
Es11 new methods: dynamic import(), bigint, globalthis, optional chain, and null value merging operator
Rational investment and internationalism
[interview with a large factory] meituan had two meetings. Was there a surprise in the end?
SAP ui5 date type sap ui. model. type. Analysis of date parsing format
What are the reasons why most webmasters choose Hong Kong site group servers?
What is hybrid web containers for SAP ui5
RM command – remove file or directory
MV command – move or rename files
Research Report on investment share and application prospect of 1,3-propanediol (PDO) industry in the world and China 2022
[Suanli network] technological innovation of Suanli Network -- Key Technologies of green and security
Wireless industrial Internet of things data monitoring terminal
Aiot project that is an introduction to the basics of the Internet of things and can be implemented in practice
Interviewer: what is an iterator? What is the relationship between async await and iterators?
Folding mobile phones are expected to explode, or help Samsung compete with apple and Chinese mobile phones