Internet Logical Addressing

Saurabh Khule
10 min readMay 17, 2021
Source — Google

Introduction To Logical Address?

Every network device has a physical address called a MAC address , which is assigned to the device at the factory. When you buy a network interface card to install into a computer, the MAC address of that card is fixed and can’t be changed.

But what if you want to use some other addressing scheme to refer to the computers and other devices on your network? This is where the concept of logical addressing comes in; a logical address lets you access a network device by using an address that you assign.

Logical addresses are created and used by Network layer protocols such as IP or IPX. The Network layer protocol translates logical addresses to MAC addresses.

For example, if you use IP as the Network layer protocol, devices on the network are assigned IP addresses such as 207.120.67.30. Because the IP protocol must use a Data Link layer protocol to actually send packets to devices, IP must know how to translate the IP address of a device to the device’s MAC addresses.

Functions Of Logical Address

Multiple networks may exist in any business. A single website may have many VLANs linked with it, each of which would be connected to a distinct network. Likewise, there might be many websites, each connected to a separate network or many networks, depending on the requirements. There will be hosts connected to the networks and each of these hosts is associated with NIC and the physical addresses are referred to as the MAC addresses burned into the NIC’s.

The data frames from one host to another host on the same network are delivered using the physical addresses which is used by the second layer. The third layer consists of logical addresses and they are assigned to the third layer through DHCP. The third layer addresses will be used by the host of one network to communicate with the hosts of other networks. If a host of one network is trying to communicate with the host of other network, it will check for the third layer address of the destination host and compare it with the third layer address of its own. If the addresses are found to be on the same network, then the host will try to spot the second layer address of the destination network and send the data frame directly to the second layer of the destination host. And if the destination host is found on a different network, then host configures a gateway to send the data frame to the second layer of the destination host in a different network. The gateway finds a path destination host on a different network by using third layer address and the packet is forwarded to the destination network through this gateway.

The physical addresses do not survive when the data frames are moved across different networks. The frame headers hold the physical addresses and the logical address is used to remove the physical address from the header and discards it thereby making way for logical addresses to forward the data frames to the destination network.

Different Methods Of Declaring Logical Addresses

The internet is used to communicate between computers. Before reaching the target computer, data transported from one computer must transit through numerous local area networks (LAN) and wide area networks (WAN). For such communications to take place between the computers, we need a scheme of addressing called global addressing scheme which is also called logical addressing or logical address. The logical addresses in any network of the TCP or IP layer is referred using internet protocol (IP) address.

What is an IP Address?

An IP (Internet Protocol) address is a numerical label assigned to the devices connected to a computer network that uses the IP for communication.

IP address act as an identifier for a specific machine on a particular network. It also helps you to develop a virtual connection between a destination and a source. The IP address is also called IP number or internet address. It helps you to specify the technical format of the addressing and packets scheme. Most networks combine TCP with IP.

IP Addresses — Format

IP addresses (Source — Google)

IP Address Classes

Class A Network

This IP address class is used when there are a large number of hosts. In a Class A type of network, the first 8 bits (also called the first octet) identify the network, and the remaining have 24 bits for the host into that network.

An example of a Class A address is 102.168.212.226. Here, “102” helps you identify the network and 168.212.226 identify the host.

Class A addresses 127.0.0.0 to 127.255.255.255 cannot be used and is reserved for loopback and diagnostic functions.

Class B Network

In a B class IP address, the binary addresses start with 10. In this IP address, the class decimal number that can be between 128 to 191. The number 127 is reserved for loopback, which is used for internal testing on the local machine. The first 16 bits (known as two octets) help you identify the network. The other remaining 16 bits indicate the host within the network.

An example of Class B IP address is 168.212.226.204, where *168 212* identifies the network and *226.204* helps you identify the Hut network host.

Class C Network

Class C is a type of IP address that is used for the small network. In this class, three octets are used to indent the network. This IP ranges between 192 to 223.

In this type of network addressing method, the first two bits are set to be 1, and the third bit is set to 0, which makes the first 24 bits of the address them and the remaining bit as the host address. Mostly local area network used Class C IP address to connect with the network.

Example for a Class C IP address:

192.168.178.1

Class D Network

Class D addresses are only used for multicasting applications. Class D is never used for regular networking operations. This class addresses the first three bits set to “1” and their fourth bit set to use for “0”. Class D addresses are 32-bit network addresses. All the values within the range are used to identify multicast groups uniquely.

Therefore, there is no requirement to extract the host address from the IP address, so Class D does not have any subnet mask.

Example for a Class D IP address:

227.21.6.173

Class E Network

Class E IP address is defined by including the starting four network address bits as 1, which allows you two to incorporate addresses from 240.0.0.0 to 255.255.255.255. However, E class is reserved, and its usage is never defined. Therefore, many network implementations discard these addresses as undefined or illegal.

Example for a Class E IP address:

243.164.89.28

There are two versions of IP that currently coexist in the global Internet: IP version 4 (IPv4) and IP version 6 (IPv6). IP addresses are made up of binary values and drive the routing of all data over the Internet. IPv4 addresses are 32 bits long, and IPv6 addresses 128 bits long.

IPV4 addresses

Source — Google

An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device (for example, a computer or a router) to the Internet. They are unique so that each address defines only one connection to the Internet. Two devices on the Internet can never have the same IPV4 address at the same time.

On the other hand, if a device operating at the network layer has m connections to the Internet, it needs to have m addresses, for example, a router.

The IPv4 addresses are universal in the sense that the addressing system must be accepted by any host that wants to be connected to the Internet. That means global addressing.

Address Space

IPv4 has a certain address space. An address space is the total number of addresses used by the protocol. If a protocol uses N bits to define an address, the address space is 2^N

IPv4 uses 32-bit address format, which means that the address space is 232 or 4,294,967,296

Notations

There are two notations to show an IPv4 address:

  1. Binary notation
  2. Dotted decimal notation

1) Binary Notation

In binary notation, the IPv4 address is displayed as 32 bits. Each octet is often referred to as a byte. So it is common to hear an IPv4 address referred to a 4-byte address. The following is an example of an IPv4 address in binary notation: 01110111 10010101 00000001 00000011

2) Dotted-Decimal Notation

IPV4 addresses are usually written in decimal form with a decimal point (dot) separating the bytes since it’s more compatible. The following is an example: 119.149.1.3 (above one and this one is same just different notation)

IPV6 addresses

Source — Google

To create a much larger address space and relieve a projected future shortage of IP addresses, IPv6 was created. IPv6 addresses consist of 128 bits, instead of 32 bits, and include a scope field that identifies the type of application suitable for the address. IPv6 does not support broadcast addresses, but instead uses multicast addresses for broadcast. In addition, IPv6 defines a new type of address called anycast.

IPv6 Address Representation

IPv6 addresses consist of 8 groups of 16-bit hexadecimal values separated by colons (:). IPv6 addresses have the following format:

aaaa:aaaa:aaaa:aaaa:aaaa:aaaa:aaaa:aaaa

Each aaaa is a 16-bit hexadecimal value, and each a is a 4-bit hexadecimal value. Following is a sample IPv6 address:

3FFE:0000:0000:0001:0200:F8FF:FE75:50DF

You can omit the leading zeros of each 16-bit group, as follows:

3FFE:0:0:1:200:F8FF:FE75:50DF

You can compress 16-bit groups of zeros to double colons (::) as shown in the following example, but only once per address:

3FFE::1:200:F8FF:FE75:50DF

IPv6 Address Types

IPv6 has three types of addresses:

  • Unicast — For a single interface.
  • Multicast — For a set of interfaces on the same physical medium. A packet is sent to all interfaces associated with the address.
  • Anycast — For a set of interfaces on different physical media. A packet is sent to only one of the interfaces associated with this address, not to all the interfaces.

IPv6 Address Space

Unicast and multicast IPv6 addresses support address scoping, which identifies the application suitable for the address.

Unicast addresses support global address scope and two types of local address scope:

  • Link-local unicast addresses — Used only on a single network link. The first 10 bits of the prefix identify the address as a link-local address. Link-local addresses cannot be used outside the link.
  • Site-local unicast addresses — Used only within a site or intranet. A site consists of multiple network links. Site-local addresses identify nodes inside the intranet and cannot be used outside the site.

Multicast addresses support 16 different types of address scope, including node, link, site, organization, and global scope. A 4-bit field in the prefix identifies the address scope.

Difference between IPV4 and IPV6

• IPv4 is 32-Bit IP address whereas IPv6 is a 128-Bit IP address.

• IPv4 is a numeric addressing method whereas IPv6 is an alphanumeric addressing method.

• IPv4 binary bits are separated by a dot(.) whereas IPv6 binary bits are separated by a colon(:).

• IPv4 offers 12 header fields whereas IPv6 offers 8 header fields.

• IPv4 supports broadcast whereas IPv6 doesn’t support broadcast.

Difference between ipv4 and ipv6 (Source — Google)

Subnetting and Supernetting

Subnetting

Subnetting is a technique of partitioning an individual physical network into several small-sized logical sub-networks. These subnetworks are known as subnets. An IP address is made up of the combination of the network segment and a host segment. A subnet is constructed by accepting the bits from the IP address host portion which are then used to assign a number of small-sized sub-networks in the original network.

The Subnetting basically converts the host bits into the network bits. The subnetting strategy was initially devised for slowing down the depletion of IP addresses.

The subnetting permits the administrator to partition a single class A, class B, class C network into smaller parts. VLSM (Variable Length Subnet Mask) is a technique that partitions IP address space into subnets of different sizes and prevents memory wastage. Furthermore, when the number of hosts is the same in subnets, that is known as FLSM (Fixed Length Subnet Mask).

Supernetting

Supernetting is the inverse process of subnetting, in which several networks are merged into a single network. While performing supernetting, the mask bits are moved toward the left of the default mask. The supernetting is also known as router summarization and aggregation. It results in the creation of more host addresses at the expense of network addresses, where basically the network bits are converted into host bits.

The supernetting is performed by internet service providers rather than normal users, to achieve the most efficient IP address allocation. CIDR (Classless Inter-Domain Routing) is a scheme used to route the network traffic across the internet. CIDR is a supernetting technique where several subnets are combined together for the network routing. In simpler words, CIDR allows the IP addresses to be organized in the subnetworks independent of the value of the addresses.

Concluding Remarks

MAC address is the basis on which communication occurs. However, we need the IP address to be able to create a routing table, which enables faster communication. Lots of communication algorithms takes use of IP addresses (Network address +Subnet masks) to be able to route packages faster.

IPv6 overcomes many of the limitations of IPv4 while introducing new features and functionality to make the job of the network administrator easier. Where IPv6 is significantly different from IPv4, the changes are meant to enhance the administration experience.

I Hope you found this blog helpful to understand how the logical addressing happens.

If you have any doubts/suggestions, I would love to hear that.

Authors — SY-B-33

Saurabh Khule, Maulik Khandelwal, Ritu Khandelwal, Yash Lahoti, Rohit Kulkarni.

References —

--

--

Saurabh Khule

Student at Vishwakarma Institute Of Technology Pune.