MCSA Windows Server 2016 Certification Guide:Exam 70-741
上QQ阅读APP看书,第一时间看更新

IP address

In order to communicate, TCP/IP ensures that each host on the network has its own logical IP address. There is also a physical, or a Media Access Control (MAC), address that represents physical communication hardware, which is used to send and receive data packets. The host IP address is a 32-bit binary number in a binary notation, known also as dotted decimal notation. Such a number, comprised of 32 "zeros" or "ones", is hard to read and, therefore, is segmented into four parts, called octets. Such a notation is also called the w.x.y.z notation:

Binary numbers use the number two (2) as the base for calculations and use only two characters to form a number—that is, zero (0) and one (1). The low-order bit or the rightmost bit has a decimal value of one (1) and the leftmost or high-order bit has the decimal value of 128. If the value of the bit in an octet is set to zero (0), then the value of the bit is multiplied by zero, and the result is, naturally, zero. If the value of the bit in an octet is set to one (1), then the value of the bit is multiplied by one, and the result of the multiplication is the actual value of the bit. The sum of all multiplied values is the decimal value of the octet.

For example, the 10101000 binary number is calculated as follows:

1×128 + 0×64 + 1×32 + 0×16 + 1×8 + 0×4 + 0×2 + 0×1 = 
= 128 + 0 + 32 + 0 + 8 + 0 + 0 + 0 = 168

The following diagram demonstrates the relationship and conversion from a binary to a decimal notation:

The following example shows an IPv4 number in binary format. As you can see, reading, interpreting, and performing calculations with numbers displayed in this format is very hard:

32-bit number: 11000000101010000000000100001100

To enhance readability, a number is separated into octets, however, even so, calculating values is not easy:

11000000 10101000 00000001 00001100

Each binary octet is then converted to a decimal number:

Each octet or decimal is separated by a period or a dot, and is displayed in dotted decimal notation for better readability: 192.168.1.12. In this way, the hardly-readable binary format that machines use is presented in a form that we can understand better.

IPv4 has three types of addresses, as follows:

  • Broadcast: This type of address is used in "one-to-everyone" communications and is assigned to all network interfaces on a subnet. Packets sent from an interface to a broadcast address receive all the interfaces on that network.
  • Multicast: This type of address is used in "one-to-many" types of communication, where a sender transmits a packet that receives more than one network interface.
  • Unicast: This type of address is used in "one-to-one" communications, where one network interface sends the data packet and only one network interface receives the packet.

Unicast addresses are also defined by a network ID and a host ID. The network ID, network address, or a subnet is a fixed portion of an IPv4 address that groups a set of network interfaces located on the same network segment. Routers separate network segments that must be unique on a TCP/IP network. A host ID or a host address represents a variable part of an IPv4 address and is unique to the network subnet.