Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

TCP/IP addressing

May 27, 2021 TCP/IP

Table of contents

TCP/IP addressing

TCP/IP uses 32 bits or 4 sets of numbers between 0 and 255 to address the computer.

IP address

Each computer must have an IP address to be able to connect to the Internet.

Each IP package must have an address to be sent to another computer.

In the next section of this tutorial, you'll learn more about IP addresses and IP names.

The IP address contains four sets of numbers:

TCP/IP uses 4 sets of numbers to address the computer. Each computer must have a unique address for 4 sets of numbers.

Each set of numbers must be between 0 and 255 and separated by a dot, e.g.

32 bits - 4 bytes

TCP/IP uses 32 bits to address. A computer byte is 8 bits. So TCP/IP uses 4 bytes.

A computer byte can contain 256 different values:

00000000、00000001、00000010、00000011、00000100、00000101、00000110、00000111、00001000 ....... until 1111111.

You should now know why the TCP/IP address is a group of four numbers between 0 and 255.


IPv6, an acronym for Internet Protocol Version 6 and also known as the Next Generation Internet Protocol, is a new IP protocol designed by the Internet Engineering Task Force to replace the current IPv4 protocol.

We know that hosts on the Internet have a unique IP address that represents a host number in a 32-bit binary number, but that the 32-bit address resources are limited enough to meet the needs of users, so the Internet Research Organization released a new host identity method, IPv6.

In RFC1884 (RFC is an abbreviation for Request for Comments document. RFC is actually some of the standards for Internet-related services, and the standard syntax suggests writing 128 bits (16 bytes) of IPv6 addresses as eight 16-bit unsigned integers, each represented by four heteeds, separated by a colon (:), for example:


The colon hen notation allows zero compression, i.e. a string of consecutive 0s can be replaced by a pair of colons, for example:


In order to ensure a clear interpretation of zero compression, it is recommended that zero compression can only be used once in any address. This technique is particularly useful for recommended allocation strategies because there are many addresses that contain consecutive zero strings.

The colon hex notation combines a suffix with a bit of a hex notation. T his combination is particularly useful in the IPv4 to IPv6 change phase. For example, the following string is a legal colon hete sixteen-way notation:


In this notation, although each value separated by a colon is a 16-bit quantity, the value of each point tenth part indicates the value of a byte. Using zero compression, you can get:


Domain name

The 12 Arabic numerals are hard to remember. It's easier to use a name.

The name used for the TCP/IP address is called the domain name. is a domain name.

When you type a domain name, the domain name is translated into numbers by a DNS program.

Around the world, a large number of DNS servers are connected to the Internet. Dns servers are responsible for translating domain names into TCP/IP addresses and for updating each other's systems with new domain name information.

When a new domain name is registered with its TCP/IP address, DNS servers around the world update this information.