Skip to content

Addressing in networks

The Internet consists of billions of participants that communicate with each other simultaneously. If a LAN is connected to the Internet, it also becomes part of the Internet.

In order for all LANs to be able to exchange data with each other, they must be distinguishable from each other.

The IP protocol was introduced in 1981. Every system on the Internet has a 32-bit address that is unique worldwide.

InterNIC (Inter Network Information Center) is the central international registry, whose German counterpart is DENIC.

There are different address classes for different numbers of IP addresses.

IP addresses

Every source or destination of IP packets must have an IP address. IP addresses have a length of 32 bits (4 bytes with 8 bits each).

IP addresses cannot be chosen arbitrarily. They consist of 4 three-digit decimal numbers, each separated by a dot (dotted decimal notation).

Example: 192.168.1.19

The first part (192.168.1) indicates the network to which the computer belongs (network ID). The trailing part (.19) identifies the computer (Host-ID).

The subnet mask is used to differentiate between the network ID and host ID.

Example: 255.255.255.0

The above example of a subnet mask shows that the first three bytes of the IP address belong to the network ID and the last to the host ID. This is used to categorize the IP address into three classes (A, B and C), which are explained in the next section.

IP address classes

The network ID and the host ID can be of different lengths. Neither the network ID nor the host ID may only contain zeros or only ones.

In classes A - C, the lowest and highest host IDs have a special meaning:

  • The lowest host ID 0 is not permitted (all bits of the host ID are 0).
  • The highest available host ID is the so-called broadcast address with which all hosts can be reached. This may not be assigned as an address either.

Class A (subnet mask: 255.0.0.0)

Figure: IP address class A

24 bits remain for the host ID. This means that 16,777,214 host addresses are possible.

Class B (subnet mask 255.255.0.0)

Figure: IP address class B

16 bits remain for the host ID. This means that 65,534 host addresses are possible.

Class C (subnet mask 255.255.255.0)

Figure: IP address class C

8 bits remain for the host ID. This means that 254 host addresses are possible.

Ports

Computers in a network can be addressed with the help of IP addresses. But how does the computer know which program the data is intended for? As you know, it is no problem to surf the Internet and at the same time retrieve your emails. Therefore, as a logical consequence, there must be an assignment of which data packets belong to which software. This is realized with the so-called ports.

But what does that mean?

Example: letterbox

Figure: Example: Computer

In this case the IP or computer name corresponds to the postal address. The port is the corresponding apartment.

Important (well-known) ports

The ports in the range 0 to 1023 are reserved for special applications and services (Well-Known Ports). In the range 1024 to 49151 are the ports registered for applications.

A server service requires a fixed and known port so that the client application can address it. Conversely, the client application only requires any port that is assigned to it from the free range 49152 to 65535 on request for a limited time (dynamic port).

The following applies to dynamic ports:

The application and the server negotiate a port to be used for further communication, which in turn allows to start and use the same application multiple times. The user is usually unaware of the process, as the process described above takes place in the background in the protocols.

Well-known ports and ports you should have at least heard of:

  • 20/21 FTP (file transfer, 20 data channel, 21 control channel)
  • 23 Telnet (remote administration)
  • 25 SMTP (email)
  • 80 HTTP (World Wide Web)
  • 443 HTTPS (encrypted WWW)
  • 161/162 SNMP (network management)