当前位置:网站首页>IP address
IP address
2022-07-07 07:06:00 【Aegean child】
Point to point communication between computers
Under normal circumstances , You and I both have a computer , But what a computer can do is limited , We may be between two computers in order to do more things , We need data interaction , We can go through U Disk as medium , Data exchange , But this efficiency is too slow , therefore , In order to improve efficiency , Someone came up with a good idea , We plug a data cable between the two computers , Data interaction through data lines
With this data cable , Or network cable , The two computers can interact with each other , however , What if there are more than two computers ? With multiple computers , It's time to pull the cable again ?
You found out , If every machine wants to communicate with other machines , Then you have to establish a connection with that machine , With more and more machines , How complicated the number of network cables will be , This is definitely unacceptable .
Switch
In order to solve the complexity of point-to-point communication between computers , The concept of switch we introduced
With the switch , The switch distributes the data from each machine . At this time, there are new problems , On point-to-point data connections , If two computers want to interact with each other , Just find the data line of the corresponding host from many data lines , But now it's all sent to the switch . How should the switch distribute data ? It's like a package that should not have a clear address , Switches are like express companies , You gave it to the express company , No address , Then the express company doesn't know who to send the package to . As long as the express company has the express address, it knows where to send the package , The same goes for switches , We can assign one to each machine IP Address .
With IP After the address , Just add the corresponding host to the sent packet IP Address , Then the switch can be based on the IP The address sends the data to the corresponding machine .
LAN to WAN
Through the switch , We can let the computer connected to the switch exchange data , If these machines are your school computers , Your school wants to cooperate with the school next door , We need each other's computers to exchange data , It happens that the computer next door also uses the switch for data exchange , So we just connect the switches of the two schools , Then the computers on both sides can access each other .
By connecting two switches , So that computers on both sides can exchange data , If you want to add more LAN later , That's connecting each other's switches
With more and more switches in LAN , Switches are also as complex as point-to-point connections between computers before , So a new switch is put between the switches .
this is it , More and more switches , Know that it covers the whole world , You just need to enter any of these nodes , You can access any design in the world that is also connected to the network , This constitutes the wan .
You can understand it as : Wan is the combination of countless LANs . Obviously , Building these networks must require a lot of money , The companies that build these networks are called ISP Internet service provider , The familiar mobile , Telecom and China Unicom are ISP supplier .
IPV4
Every machine on the Internet needs one IP Address to access each other , Then first we have to talk IP The composition of the address .IP The address is generally IPV4 Of IP Address , It is from 32 A composition , that IP The combination of addresses that can be used is 2 Of 32 Power , Greater than or equal to 42.28 Billion .
To facilitate memory and input , Will each 8 A binary is divided into a group , common 4 Group , In the transformation of 10 Base number
meanwhile , Will also be right IP Address classification , Some addresses for special purposes
The last really available address may not yet 42 One hundred million . It is known that there are 70 More than 100 million people , Even if not everyone will access the Internet , But many people don't have more than one device , One person may have multiple mobile phones , Computer, etc. , If you want to assign one to each device IP, What about this 36 Billions of IP Is the address enough ? It's not enough .
NAT Network address translation
In order to solve IP We used a new technology ,NAT Network address translation . Suppose there are five computers , their IP The address is 192.168.0.1----192.168.0.5, They connected to the same switch , Or router , The wide area network of the switch they are connected to IP yes 6.6.6.6
If these five machines are going to one 8.8.8.8 Send data to your server , that NAT Will take the original of these computers IP convert to 6.6.6.6 Of ip towards 8.8.8.8 send data , Realization 5 One for each device IP The effect of . If 8.8.8.8 Many devices are also mounted under the switch , The five servers are based on 8.8.8.8 Sent by this machine , How do you send it to 8.8.8.8 What about the specific equipment attached below ?
Port mapping
To solve the above problems , We introduced a new concept , Port mapping . We can do it in IP Add a port after the address , Pictured
such as 192.168.0.1 and 6.6.6.6 Of 1000 Port binding , The other side 192.168.0.1 and 8.8.8.8 Of 500 Port binding , such , If 6.6.6.6 The next mounted machine wants to access 8.8.8.8 Remove the mounted machine , Just add the corresponding port .
Public network IP And private IP
If you open cmd, Input ipconfig see IP Address
You'll see ip The address is 192.168 At the beginning , Why? , Just mentioned ,ip The address is not enough , But in order for most machines to access the Internet , We usually share a public network with multiple machines ip, You go to Baidu search ip Inquire about .
You can see the public network attached to your current device ip 了 . Now I know why many ip All are 192.168 It's the beginning ? Because it is attached to a small transfer device C Class private ip, This private class IP The public network that depends on the converter IP surf the internet .
Give me an example , Public network IP Is the name of your community , The private network IP It's the floor unit where you live , Assuming that the names of communities across the country are not repeated , According to the name of the community , You can find your approximate location , This is equivalent to according to the public network IP Locate your specific lan , But to know where you are , You also need to know the number of the unit in the community , The number of several units in the community is equivalent to the private network IP, So the private network of many machines IP It's all repetitive .
边栏推荐
- 华为机试题素数伴侣
- Maze games based on JS
- MySQL的主从复制原理
- Four goals for the construction of intelligent safety risk management and control platform for hazardous chemical enterprises in Chemical Industry Park
- Multidisciplinary integration
- ESXI挂载移动(机械)硬盘详细教程
- Composition API 前提
- Lvs+kept (DR mode) learning notes
- Esxi attaching mobile (Mechanical) hard disk detailed tutorial
- 企业如何进行数据治理?分享数据治理4个方面的经验总结
猜你喜欢
Anr principle and Practice
企业如何进行数据治理?分享数据治理4个方面的经验总结
2018 Jiangsu Vocational College skills competition vocational group "information security management and evaluation" competition assignment
mysql查看bin log 并恢复数据
一文带你了解静态路由的特点、目的及配置基本功能示例
7天零基础能考证HCIA吗?华为认证系统学习路线分享
After the promotion, sales volume and flow are both. Is it really easy to relax?
. Net 5 fluentftp connection FTP failure problem: this operation is only allowed using a successfully authenticated context
MATLAB小技巧(30)非线性拟合 lsqcurefit
Basic introduction of JWT
随机推荐
联合索引ABC的几种索引利用情况
Answer to the first stage of the assignment of "information security management and evaluation" of the higher vocational group of the 2018 Jiangsu Vocational College skills competition
2018 Jiangsu Vocational College skills competition vocational group "information security management and evaluation" competition assignment
SolidWorks的GB库(钢型材库,包括铝型材、铝管等结构)安装及使用教程(生成铝型材为例)
MySql用户权限
算法---比特位计数(Kotlin)
From zero to one, I will teach you to build the "clip search by text" search service (2): 5 minutes to realize the prototype
Sword finger offer high quality code
How Oracle backs up indexes
libcurl返回curlcode说明
2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书第二阶段答案
How can brand e-commerce grow against the trend? See the future here!
[noi simulation] regional division (conclusion, structure)
Learning records on July 4, 2022
Tool class: object to map hump to underline underline hump
Kotlin之 Databinding 异常
场馆怎么做体育培训?
Networkx绘图和常用库函数坐标绘图
MOS管参数μCox得到的一种方法
impdp的transform参数的测试