What is Host ID in TCP IP

Communication in computer networks

2. Data transmission in the network (3)


addressing

In order for a computer to be addressed in the network, it needs one unique address. Within the transmission protocol TCP / IP identifies the IP address every single machine and distinguishes it from all others in the network.
Each IP address comprises 32 bits, which are divided into 4 octets (8 bits = 1 byte) and are written in decimal as values ​​between 0 and 255 (example: 192.168.1.1). An IP address consists of 4 bytes, i.e. 4 times 8 bits. Each byte can have 256 different values, from 0 (all zeros) to 255 (all ones). A total of 232 = 4,294,967,296 machines are addressed. However, there are still some special features with addressing.

Example:

BinaryDecimal
Network identifier
(Network ID)
Computer-
identifier
(Host ID)
11000000101010000000100100000011192.168.9.3
11000000101010000000100101000011192.168.9.67
11111111111111111111111100000000255.255.255.0

The maximum number of computers that can belong to a network is determined by the Subnet mask set. Your binary representation contains all ones in the front part and all zeros in the rear part. The computers belonging to the same local network may only differ in the bits that contain zeros in the subnet mask. In the example above, the addresses of all computers on the same network must match in the first three bytes. This is how it is determined by the subnet mask:
The first 3 bytes are filled with ones, the last one contains all zeros.

BinaryDecimal
Network ID
110000001010100000001001192.168.9.3
110000001010100000001001192.168.9.67
111111111111111111111111255.255.255.192

Although the computers in this example have the same IP addresses as above, they belong to different networks due to the changed subnet mask, as they differ in the last position in the network ID (bold number). The computers each time have the number 3 (host ID), but in different networks.

A computer has the IP address 192.168.79.5 and the subnet mask 255.255.192.0.
These values ​​can be used to determine the network address (network ID) and the computer address (host ID). All bits in the IP address that are assigned in the subnet mask then count towards the network part, the rest to the host part.

Procedure

  1. IP address and Subnet Mmask write in binary format.
  2. AND-Comparison between IP address and subnet mask.
  3. The result is the Network address.
IP address11000000101010000100111100000101192.168.79.5
Subnet mask11111111111111111100000000000000255.255.192.0
AND comparison11000000101010000100000000000000192.168.64.0

The network ID is: 192.168.64.0,
the host ID is: 3845 (= 15 * 256 + 5)

What is the maximum number of computers in a network?

This question can be answered with the help of the subnet mask.
Example: A network has the subnet mask 255.255.255.0. 8 bits remain for the host ID. So there are initially 28 = 256 possibilities for the host ID. The bits of the host ID must not be all 1 or all 0. This leaves 254 possibilities for the host ID.

Network classes

Depending on the number of possible computers that can belong to a network, a distinction is made between different network classes for which the corresponding IP numbers are reserved.

MAC addresses

Each network card has a 48-bit MAC address (M.edia A.ccess C.ontrol A.dress), which is burned into the network card and is unique worldwide. The addresses are managed centrally and distributed to the manufacturers.

In order to transfer data in a network from computer A to computer B, the MAC addresses of the computers are required. The ARP protocol (A.ddress R.esolution P.rotocol) has the task of resolving the IP address of a computer into its MAC address.

Example of the establishment of a transmission connection

A look into the future

One big problem is the rapid growth of the Internet. The number of IP addresses to be assigned is almost exhausted. This is why IP version 6 (IPv6) is being tested. This version is based on a 128-bit wide address space (16 bytes). In a book about TCP / IP you can read: "This means that you can theoretically assign an IP address to every coffee machine and washing machine."
Is that so absurd?
In 1999 a worldwide experiment with IPv6 was started. IPv6 is already being used in China.

Exercises (all commands are to be entered in the MS-DOS prompt):

  1. Find the IP address of your own computer and the Subnet mask of the network with the command ipconfig
  2. Also check the accessibility of some neighboring computers ping
  3. What is the maximum number of clients that can be on the network at the school? See the subnet mask for this.
  4. How many clients can there be in a network with the subnet mask 255.255.255.128?
  5. How many IP addresses are possible with a 128-bit address space (IPv6)?
  6. Find out the MAC address of your computer with the help of the command ipconfig / ALL or. winipcfg.
  7. Open a DOS window. Test with the pingCommand to connect to other computers. With the command arp -a you can then display the computer's ARP cache.

annotation: If the MS-DOS prompt is disabled, it can take place ipconfig alternatively the program Winipcfg.exe (usually in the Windows directory; not available with Windows NT and Windows 2000).
The Windows program TJPing (Freeware) replaces the ping command in this case. It also shows its own IP address.

 
 

[Index] [data transmission in network 2]


Author:Jürgen Dehmer based on a presentation by K. Baulig and G. Liebrich
Last change: