Buffl

Day 7 - 8 IPv4 addressing

as
by abdullah S.

๐Ÿ“š MAIN CONCEPTS


Layer 3 Overview

Layer 3 (Network Layer) provides connectivity between end hosts on DIFFERENT networks, not just within a local area network. Unlike Layer 2 which uses physical MAC addresses assigned at manufacture, Layer 3 uses logical IP addresses that are configured by network administrators. Routers operate at Layer 3 and are responsible for path selection, determining the best route for data to travel from source to destination across complex networks like the Internet.


IPv4 Address Structure

An IPv4 address is a 32-bit number divided into four 8-bit sections called octets, written in dotted decimal notation for human readability. Each octet can range from 0 to 255 (since 2^8 = 256 possible values). The address is split into two portions: the network portion (which identifies the network) and the host portion (which identifies specific devices on that network).


Binary Number System

Binary is base-2, meaning each digit position represents a power of 2, doubling as you move left. The 8-bit positions represent: 128, 64, 32, 16, 8, 4, 2, 1. To convert binary to decimal, add the values of positions containing a 1. To convert decimal to binary, subtract the largest possible value starting from 128, writing 1 if you can subtract, 0 if you cannot.


IPv4 Address Classes

IPv4 addresses are divided into five classes (A, B, C, D, E) based on the first octet. Classes A, B, and C are used for host addressing with different network/host bit distributions. Class D is reserved for multicast, and Class E is reserved for experimental purposes. The class determines the default prefix length and number of available networks versus hosts per network.


Special Addresses

The network address has all 0s in the host portion and identifies the network itselfโ€”it cannot be assigned to any device. The broadcast address has all 1s in the host portion and is used to send packets to all hosts on the networkโ€”it also cannot be assigned to a device. These two addresses reduce the usable host addresses in any network by 2.

Author

abdullah S.

Information

Last changed