Why are our IPs 192.168.XX?

Why are our IPs 192.168.XX?

Because with the development and popularization of the Internet, more and more people use the Internet, and IPV4 addresses are about to be exhausted. Although people have created new types of IPV6 addresses for this purpose, and can perfectly solve this problem, there is always Problems left over from history, many network devices are still based on IPV4, and NAT (Network Address Translation) technology is applied in this transitional stage to solve the problem of the scarcity of IPV4 addresses. Everyone will find a problem in daily life. The IP on our computer and mobile phone are basically 192.168.xx, but the IP of Baidu's local machine is not this IP, which makes us very puzzled and puzzled. , And this is what we call NAT technology, 192.168.xx type ip address is the internal network address (private network address) , and the local address on Baidu is the public network address, and NAT is the maintenance of the two exist.

IP address

IP addresses are divided into five types of ABCDE . Among them, DE is used for special purposes such as scientific research and other high-level behaviors. The most commonly used type is ABC. The number of IP addresses in each type is different. One IP segment of each class IP is deducted as the intranet IP, and another IP address segment is used as the loopback address: 127.xxx, which is the address of the local machine, for testing use (the specific content can be Baidu), and the other ABC classes are used as the public network IP.

What is the intranet IP? What is the public IP?

Intranet IP
The IP address used by the intranet is used for communication within the LAN , that is, I communicate with my dad at home, without going out to the Internet. Xiao Ming and his dad also communicate at home, but there is no connection between the two, even though my dad The IP address is the same as Xiaoming’s father, but the data I sent to Dad will not be received by Xiao Ming’s father, so there is no need to be afraid of IP address conflicts .
Insert picture description here

Class C: 192.168.0.0-192.168.255.255 (commonly used in the intranet)
Class B: 172.16.0.0-172.31.255.255
Class A: 10.0.0.0-10.255.255.255

Insert picture description here

Public IP

The public network IP is assigned to us by the operator and cannot be repeated, because once repeated, the address of Xiao Ming’s home is the same as my home address. Once a guest visits, I don’t know which one my home and Xiao Ming’s home are, and an IP address conflict occurs.
Insert picture description here

Class A 0.0.0.0-127.255.255.255 Class
B 128.0.0.0-191.255.255.255 Class
C 192.0.0.0-223.255.255.255

Insert picture description here

What is network address translation (Network address translation)
Essence : Convert the IP address of the internal network to the IP address of the public network.
Due to the scarcity of IPV4 addresses, operators (telecommunications, China Mobile, China Unicom) assign us only one address, the public network address, and our equipment (computers, mobile phones, The IP addresses used by smart TVs are basically intranet addresses, and the internal IP addresses used by each household or office (LAN) are 192.168.xx, and this intranet IP can only be used within the range of the LAN Communication, once out of the range of the local area network, there is no way to communicate, but there is only one way to communicate with the outside world, network address translation NAT, whenever we want to communicate with the outside world, NAT technology will help us convert the internal network address to public Internet address, to communicate with the outside world, which is equivalent to multiple intranet users sharing a public network address ,

Examples in life

For example, on weekends, you and your father, mother, younger brother, and sister happily play mobile phones at home together with a WIFI, that is , surf the Internet on the same intranet (wireless local area network) , you click on the wifi you are connected to You will find that your IP is 192.168.XX, and your family are all intranet users. You share the same public IP address, which is the address from your Baidu "local IP". NAT is deployed on the gateway. (Router) , it’s on your home router. Your home router assigns an intranet IP (192.168.xx) to each of you through WIFI, and then when you access the Internet (check Douyin, Baidu, see Look at the circle of friends), NAT will convert your 192.168.xx to a public network address on the router, and then access the Internet. When the content is returned to the router, NAT will convert the public network IP to your intranet IP , The content is returned to your phone via WIFI.

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_43495262/article/details/106507357
Recommended