Addressing – Addressing is a method to assign an address to a device or host. It is a unique identification of the host in a network to communicate with other devices.
Addressing has 2 types-
- Hardware Addressing
- Logical Addressing
Hardware Addressing- Hardware addressing means MAC address of devices. MAC address is a unique identification number which represents the device in LAN (Local Area Network). MAC address coded into NIC (Network Interface card). This is used to communicate at data-link layer of the network segment.
MAC address is assigned by NIC manufacturer, if there are multiple NIC then each NIC has MAC address.
MAC address is written in Hexadecimal Format and it is a 48 Bits address. It is separated by Colon (:) or Hyphen (-). For example-
10-09-B1-50-85-3E or 10-09-B1-50-85-3E
It divides into 6 Octet, one Octet means 1 byte. Each octet has 8 bits (0 or1).
Right side Octet is the least significant and Left Octet is the Most Significant octet.
As per diagram, Starting 3 Octet (24 Bits) represent the OUI (Organizationally Unique Identifier), that is a Unique identification or NIC manufacturer. OUI managed by the IEEE. Last 3 Octet (24bits) represent the NIC identifier which assigned by the NIC manufacturer.
Master data for MAC address Managed by IEEE- http://standards-oui.ieee.org/oui.txt
Local Administered Address and Universal Administered Address-
Local administered address is assigned by Network Admin, for this is done by using First Octet or 2nd least bits of 1st Byte. In below diagram, B2 is a Universal or Local Bit. If B2 is 0 means Universal Unique if B2 is 1 means Locally Administered.
B1 bit represents if the value is 0 then sending frame is Unicast or it’s 1 then frame is Multicast.
MAC address is used by below technologies:
- 11 WiFi
- ATM network
- Token Ring
Logical addressing is an IP addressing or identifier of a host in a network which used to communicate. This is a Unique address in a network, it can be changed.
IP Addressing is assigned by the IANA (Internet Assigned Number Authority) or RIR(Regional Internet Registry)
IP Addressing is 32 bits address which divides into 4 octets. It represents by Dot(.). Logical Addressing is done by IP Protocol which is work on Network Layer (Layer 3) for communication.
In Decimal- 192.168.50.5
In Binary- 11000000.10101000.110010.00000101
Binary numbers are very difficult to remember so it’s used in Decimal format.
Convert Binary to Decimal-
Take the first octet and put this octet according to below table-
After adding all One bits the output would be like 192.
Convert Decimal to Binary-
Range of IP Address-
IP Address can be assigned in between 0 to 255. Why? Let’s understand-
IP addressing is dividing into 4 portions (4 octets). One Octet has 8 bits, if we are converting one octet into bits it comes like (Minimum all bits can be 0 or maximum all bits can be 1)
It means the range of IP address is between 0 to 255.
IP addressing is divided into 2 parts-
Difference between IPv4 and IPv6
|Introduced in 1980’s||Introduced in 1999|
|32 Bit address||128 Bit address|
|4.3 Billion Addresses||2^128 Addresses|
|Address format – Dotted Decimal (.)||Hexadecimal Notation (:)|
|Header included Checksum||Does not|
|Broadcast address is used to send traffic||Use multicast address to send traffic|
|Can be configured manually or DHCP||Not required to configure or DHCP|
IPv4 IP address has only 4.3 Billion addresses, to overcome the shortage of IP address, IPv6 introduced in 1999. IPv6 is already tested addressing.
Suppose if we have 500 pc or internet users in an organization then we need 500 IP address to go to the internet. Because of this, we are getting short of IP addresses. To overcome this, a new solution introduced NAT (Network Address Translation). Using NAT, more than 60,000 users in an organization can communicate to the internet with a single IP Address. We can say that still, we are able to use IPv4 because of NAT only.
IP Address classification-
IP Address divided into 5 classes, each class has range –
|Class||Range||Used In||Total Network||Host per network|
|Class A||1-127||LAN & WAN||2^7-2 = 126||2^24-2= 16,777,214|
|Class B||128- 191||LAN & WAN||2^14-2= 16,382||2^16-2=65,534|
|Class C||192-223||LAN & WAN||2^21-2= 2,097,150||2^8-2=254|
|Class D||224-239||Reserved for Multicasting|
|Class E||240-255||Reserved for R&D|
127.0.0.0 to 127.255.255.255 is used for Loopback address.
169.254.0.0 to 169.254.255.255 is an APIPA IP address range. This IP is assigned when DHCP server not reachable.
We should know the class of IP address. Let’s identify the class for below IP address-
To identify, we check the first octet or portion of IP address. In this example, 192 is coming in between Class C range. So this IP address belongs to C class. (remaining 3 portions can be anything in between 0-255)
Types of Communication-
There are 3 type of communication happens when IPv4 packet sends or received-
- Unicast– It means one to one communication. For example, in a LAN connection when host A sends a packet to B only then it’s a Unicast Communication, it can be a server client or a specific destination IP address.
Example: Browsing a Web site (Server is sender and Computer is a receiver), File Download from FTP server.
- Broadcast– Broadcast means One to All. It means packet send from one source to the all connected host or devices.
Example– Switches do broadcast first time, it sends the packet to all connected port.
- Multicast- It means one to many. It sends the packet only the multicast group devices/host. Example- Live TV, LIVE cricket matches, WebEx, Online Training, Video Conferencing Application.
How we identify the Multicast traffic(Example)- For multicast, we have a specific IP Range -22.214.171.124 to 126.96.36.199 (Class D IP Addresses). In multicast, sender won’t send to all users, it will send only to the requested user or group of users. For example- In Video Conferencing, when we click on the link it sends a request to the host and we get a reply and same time group of users only can join who has requested.