How IP addresses work

Any device connected to a network such as a computer, tablet, camera, etc., will need a unique identifier for other devices to know how to access it. In the TCP / IP protocol, that identifier is called an Internet protocol address or IP (Internet Protocol - IP) address.

Any device connected to a network such as a computer, tablet, camera, etc., will need a unique identifier for other devices to know how to access it. In the TCP / IP protocol, that identifier is called an Internet protocol address or IP (Internet Protocol - IP) address.

If you are familiar with the computer, you probably won't be strangely familiar with the IP address, the numbers are in the form of 192.168.0.15. Typically, users do not need to directly address this address, because devices and networks will be responsible for managing them. When you need to use an IP address, users only follow the instructions to fill it in the appropriate location. However, if you want to learn more about the meaning and activities of these numbers, read this article.

Many people will wonder why IP addresses need attention. Understanding how an IP address works is important when trying to troubleshoot a network or a specific device that cannot be connected or requires advanced settings such as hosting a game server or media server to Friends can connect via the network. In such cases, you need to know about the IP address.

  1. Fix network problems in Windows 7 with the command line

Note: This article only covers the basics of IP addresses without mentioning some more complex, more intensive content, concepts, such as IP classes, non-class routing and division. subnet etc .

What is an IP address?

A unique IP address for a device on the network. You may have seen these addresses before, they look like 192.168.1.34. An IP address is a set of four numbers as above. Each number can range from 0 to 255. Therefore, the full IP address range goes from 0.0.0.0 to 255.255.255.255.

The reason each number can only reach 255 is because they are actually a number of eight binary digits (sometimes called an octet). In an octet, zero will be 00000000, while number 255 is 11111111, this is the maximum number that octets can achieve. The IP address we mentioned earlier (192.168.1.34) in binary will look like this: 11000000.10101000.00000001.00100010.

Picture 1 of How IP addresses work

Computers work with binary formats, but we humans find it easier to work with decimal format. However, knowing the IP address is really a binary number will help users understand how it works.

Two parts of an IP address

Picture 2 of How IP addresses work

The device's IP address actually consists of two separate parts:

  1. Network ID: is part of the IP address starting from the left, specifying the specific network to which the device is located. For example, on a home network, a device with IP address 192.168.1.34, part 192.168.1 of the address will be Network ID. You can add zeros to the missing end, so we can say that the Network ID of this device is 192.168.1.0.
  2. Host ID: Host ID is part of an IP address that is not taken by Network ID. It identifies a specific device on that network. Continuing the above example of IP address 192.168.1.34, host ID will be the unique ID of the server on the network 192.168.1.0.

On the home network, you may see some devices with IP addresses like 192.168.1.1, 192.168.1.2, 192.168.1 30 and 192.168.1.34. All of these addresses are unique devices (with host IDs 1, 2, 30 and 34 in this case) on the same network (with network ID 192.168.1.0).

Picture 3 of How IP addresses work

In order for you to visualize all of this, we will take a similar example. The IP address is quite similar to a street address, such as number 2013, Paradise road. The street name is the same as the network ID and house number as the host ID. In a city, there are no two named streets, similarly there are no two network IDs on the same named network. On a particular street, the house number is a unique number, just like all host IDs in a particular network ID are unique.

Subnet Mask

So, how does the device determine which part of the IP address is the network ID and the host ID? For that reason, they use the second number that you will always see assigned to the IP address. That number is called a subnet mask.

On most simple networks (like networks in homes or small businesses), you'll see subnet masks like 255.255.255.0, where all four numbers are 255 or 0. Location varies from 255 to 0 shows the division between network ID and host ID.

Picture 4 of How IP addresses work

Note: The basic subnet mask we are describing here is called the default subnet mask. People often use their own subnet masks (positions between zeros and numbers that change in an octet) to create multiple subnets on the same network.

Default gateway address

In addition to the corresponding IP address and subnet mask, you will also see a default gateway address listed with IP address information. Depending on the platform in use, this address may be called with different names such as "router", "router address", "default route" "or just" gateway ". This is the default IP address that a device sends network data to when it targets another network (a network with a different network ID) than the device is on.

For example, if there are multiple devices in the home network, you may have a router connected to the Internet via a modem. The router may be a separate device, or it may be part of a device that combines a modem and router, provided by your Internet service provider. Routers are between computers and devices on the network and other public devices on the Internet that transmit (or route) traffic back and forth.

  1. The best wifi transmitter, wifi modem, worth buying for you

Picture 5 of How IP addresses work

Suppose you start the browser and go to www.quantrimang.com. The computer will send a request to the website's IP address. Since these servers are on the Internet and not on the home network, that traffic is sent from the computer to the router (port), and the router forwards the request to the site's server. The server sends the correct information to the router, then sends the information about the requested device and you see the website pop up in the browser.

Typically, routers are configured by default so that the private IP address (address on the local network) is the first host ID. For example, on a home network using 192.168.1.0 as a network ID, the normal router is 192.168.1.1. Of course, you can configure it differently if you want.

DNS server

The last piece of information you see is assigned with the IP address, subnet mask, and device address of the device that is the address of one or two default DNS servers (Domain Name Systems). People we often find easier to remember than numbers. Typing www.quantrimang.com into the address bar of a browser is much easier than remembering and typing the website's IP address.

DNS works like a phone book, looking for things that people can read like website names and converting them to IP addresses. DNS does this by storing all the information on a system of DNS servers linked on the Internet. The device needs to know the address of the DNS server to send the query.

On a small network or a typical home network, the IP address of the DNS server is usually the same as the default gateway address. Devices send DNS queries to the router, then forward requests to any DNS server that the router is configured to use. By default, these are usually the DNS servers provided by your Internet service provider, but you can change those servers to use different DNS servers if you want. Occasionally, users may use DNS servers provided by third parties, such as Google or OpenDNS.

  1. The best top 10 Public DNS Server you should know now
  2. 3 "legitimate" reasons to change DNS Server

What is the difference between IPv4 and IPv6?

Picture 6 of How IP addresses work

Many people may also notice that there is a type of IP address, called an IPv6 address. The types of IP addresses we have talked about so far are addresses used by IP version 4 (IPv4) - a protocol developed in the late 1970s. They use 32 bit binary ( in four octets) to provide a total of 4.29 billion unique addresses. Although the number seems to be high, all public addresses have long been assigned to businesses. Many of them are not used, but they are specified and cannot be used for other general purposes.

In the mid-90s, worried about the lack of IP addresses, IETF designed IPv6. IPv6 uses a 128-bit address instead of the IPv4 32-bit address, so the total number of unique addresses is measured by the number of undecillions, this is a large enough number that never runs out.

Unlike the decimal notation used in IPv4, IPv6 addresses are expressed in eight-digit groups, divided by colons. Each group has four hexadecimal digits representing 16 binary digits (so it is called hextet). A typical IPv6 address will look like this:

2601: 7c1: 100: ef69: b5ed: ed57: dbc0: 2c1e

The problem is, the lack of IPv4 addresses causes concern about the increase in the use of private IP addresses. More and more people create their own networks, using private IP addresses that are not publicly disclosed. Therefore, although IPv6 still plays an important role and the transition process still takes place, it has not happened as expected.

  1. How to change DNS Google IPv4 and IPv6 on Windows 10 Fall Creators

How the device receives the IP address

Picture 7 of How IP addresses work

Now that you know the basics of how IP addresses work, let's talk about how devices receive IP addresses. There are two types of IP address assignment: dynamic IP and static IP.

Dynamic IP addresses are automatically assigned when a device connects to the network. Most networks today (including home networks) use Dynamic Host Configuration Protocol (DHCP) to do this, DHCP is integrated in the router. When a device connects to the network, it sends a message requesting an IP address. DHCP blocks this message, and then assigns an IP address to the device from a set of available IP addresses.

There are a number of private IP addresses that routers will use for this purpose, it is used depending on the router manufacturer or the established user settings. These private IP ranges include:

  1. 10.0.0.0 - 10.255.255.255: If you are a Comcast / Xfinity customer, the router provided by your Internet service provider will assign the address within this range. Some other Internet service providers also use these addresses on their routers as Apple uses on AirPort routers.
  2. 192.168.0.0 - 192.168.255.255: Most commercial routers are set up to assign IP addresses in this range. For example, Linksys routers use 192.168.1.0, while D-Link and Netgear use the 198.168.0.0 range.
  3. 172.16.0.0 - 172.16.255.255: This range is rarely used by commercial grade houses.
  4. 169.254.0.0 - 169.254.255.255: This is a special scope used by a protocol called Automatic Private IP Addressing. If the computer (or other device) is set up to get the IP address automatically, but cannot find a DHCP server, it will automatically assign an address in this range. If you see one of these addresses, the user knows that the device cannot access the DHCP server during the IP address retrieval, and you may experience network problems or problems with the router.

Dynamic IP addresses may change. The DHCP server hires IP addresses for the devices, and when the time expires, the equipment must renew the lease. Sometimes, the device will receive another IP address from the address space that the server can specify. This is not a big problem, and everything still works normally. However, sometimes users want to use the IP address unchanged. For example, in case you need to access the device manually and many people find the IP address easier to remember than the name or there are certain applications that can only connect to the network device used their IP address.

In these cases, you can assign a static IP address to those devices. There are several ways to do this. You can manually configure the device using a static IP address. Another solution is to configure the router to assign static IP addresses to certain devices that are dynamically assigned by the DHCP server. In this way, the IP address never changes, but does not interrupt the DHCP process.

  1. How to assign static IP addresses in Windows 7, 8, 10, XP or Vista

See more:

  1. Instructions on how to determine the IP address on the computer
  2. Ways to find IP Router address on Windows 10
  3. Instructions on how to check and install the IP address for the printer
Update 26 May 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile