TCP/IP Addressing

TCP/IP uses 32 bits or 4 numbers between 0 and 255 to address computers.

IP address

Each computer must have an IP address in order to connect to the Internet.

Each IP packet must have an address in order to be sent to another computer.

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

An IP address contains 4 numbers:

This is your IP address:60.1.209.177

TCP/IP uses 4 numbers to address computers. Each computer must have a unique 4-digit address.

Numbers are between 0 and 255 and are separated by dots, like this: 192.168.1.60

TCP uses a fixed connection

TCP is used for communication between applications.

When an application wants to communicate with another application via TCP, it sends a communication request. This request must be sent to a specific address. After both parties 'shake hands', TCP will establish a full-duplex communication between the two applications.

This full-duplex communication will occupy the communication line between two computers until it is closed by one or both parties.

UDP and TCP are very similar, but simpler and less reliable than TCP.

32 bits = 4 bytes

TCP/IP uses 32 bits for addressing. A computer byte is 8 bits. Therefore, TCP/IP uses 4 bytes.

A computer byte can contain 256 different values:

00000000, 00000001, 00000010, 00000011, 00000100, 00000101, 00000110, 00000111, 00001000 ... up to 11111111.

Now you know why TCP/IP addresses are between 0 and 255.

Domain Name

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

The names used for TCP/IP addresses are called domain names. codew3c.com is a domain name.

When you enter a domain name like http://www.codew3c.com, it will be 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 also for updating each other's systems with new domain name information.

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