Introduction to Network Engineering Notes
Introduction to Network Engineering
IP Service Model
Internetwork: Refers to an arbitrary collection of networks interconnected to provide a host-to-host packet delivery service.
Purpose of Network Layer:
Solve the problem of host-to-host delivery.
Facilitate routing packets over networks.
Definition: An internetwork is often referred to as a "network of networks" as it comprises multiple smaller networks.
Link Layer vs Network Layer Delivery
Link Layer Delivery: Involves hop-to-hop delivery, focusing on transferring packets between directly connected devices.
Structures include physical and data link layers.
Network Layer Delivery:
Involves end-to-end delivery, concerning the overall journey of packets from the source host to the destination.
Comparison of Layers:
Link Layer: Responsible for data transfer between neighbor devices.
Network Layer: Responsible for the path across different networks.
IP Service Model Characteristics
Unique Addressing Scheme: Provides a method to identify all hosts in the internetwork.
Datagram Approach: Used for data delivery.
Connectionless Service: Does not establish a dedicated connection.
Unreliable Delivery:
If a packet is lost, corrupted, or misdelivered, the network layer takes no corrective action.
Characteristics include:
Best-effort delivery with no guarantees.
No flow control.
No error control.
Internet Protocol Version 4 (IPv4)
Overview: The delivery mechanism employed by TCP/IP protocols.
IPv4 Datagram Format
Structure:
Header: 20-60 bytes
Data: 20-65,536 bytes
Header Fields:
VER: 4 bits (IP version)
HLEN: 4 bits (Header Length)
Service: 8 bits (Type of Service)
Total Length: 16 bits (Total length of the datagram including header)
Identification: 16 bits (Used for fragmentation)
Flags: 3 bits (Indicate fragmentation possibilities)
Fragmentation Offset: 13 bits (Position of fragment in datagram)
Time to Live (TTL): 8 bits (Limits the lifespan of a datagram)
Protocol: 8 bits (Upper-layer protocol encapsulated)
Header Checksum: 16 bits (Error checking)
Source/Destination IP Address: 32 bits each
Options: 32 bits (Optional fields for routing, management, etc.)
Characteristics of the IPv4 Header
Fixed and Optional Parts: The header consists of a fixed part of 20 bytes plus optional fields.
Fields Explanation:
Version: Specifies the version of IP.
Header Length (HLEN): Indicates the length of the header.
Type of Service: Enables differentiated treatment of packets based on application needs.
Total Length: Indicates the entire datagram size.
Identification: Segments related to a datagram are tagged with the same identification number.
Flags:
Denote if fragmentation is allowed.
Indicate fragment position (first, middle, last).
Offset: Shows the relative position of fragments within the datagram.
TTL: The maximum number of hops a datagram is allowed to traverse.
Protocol: Codes for the upper-layer protocol used (e.g., TCP, UDP).
Header Checksum: Helps in the detection of errors.
Source/Destination Address: Identifies where the datagram originated and where it is going.
Options: Fields to manage routing and protocols.
Maximum Transfer Unit (MTU)
Definition: Maximum layer 3 packet size that can be forwarded out of an interface.
Basis: Determined by the data link layer protocol.
Default MTU: Commonly set to 1500 bytes for Ethernet.
Importance of MTU:
If a packet exceeds the MTU size, it must be fragmented to fit within the allowable size.
Fragmentation
Purpose: Required when the MTU of the interface is smaller than the packet size.
Mechanism: Splits the packet into smaller fragments for transmission.
Offset: Shows the position of fragments based on the overall datagram size in units of 8 bytes.
IP Addressing
Definition: Each TCP/IP node has a unique 32-bit logical IP address.
Total Address Space: 2^32 or 4,294,967,296 (with 3,706 million usable).
Structure: An IP address consists of a network number and a host number.
Dotted-Decimal Notation: Format for representing IP addresses.
Classful Addressing
Address Classes:
Class A: First byte starts with 0 (0-127).
Class B: First byte starts with 10 (128-191).
Class C: First byte starts with 110 (192-223).
Class D: First byte starts with 1110 (224-239) (Multicast).
Class E: First byte starts with 1111 (240-255) (Reserved for future use).
Reserved Addresses
Block Ranges:
0.0.0.0 to 0.255.255.255: "This" Network
10.0.0.0 to 10.255.255.255: Private Use Networks
127.0.0.0 to 127.255.255.255: Loopback Address
192.168.x.x: Private Network Used
240.0.0.0 to 255.255.255.255: Reserved for future use.
Network and Broadcast Addresses
Network Number: Represents a network in a 32-bit format, with the host portion zeros.
Broadcast Address: Used to address all hosts in a network, with the host portion composed entirely of ones.
Example: For IP Address 8.1.4.5:
Network address: 8.0.0.0
Broadcast address: 8.255.255.255.
Subnetting and Masking
Subnet Mask: Helps specify the network ID and host ID.
Bitwise Operation: Performing a bitwise AND between the IP address and subnet mask results in the network ID.
Nodes with Multiple Addresses
Definition: A node's internet address indicates its connection to a network, including both network (netid) and host parts (hostid).
Requirement for Routers: Devices such as routers, which connect multiple networks, need to have multiple addresses (one for each connected network).
Private Networks
Definition: Organizations that require IP addresses solely for internal communication without requiring direct internet access may use any network number.
RFC 1918: Defines networks that are reserved and may be used internally (Private Addressing) without valid registered IP addresses.
NAT (Network Address Translation): A method proposed for allowing hosts on private networks to communicate over the internet.
Advantages and Disadvantages of Private Addressing
Advantages: Saves IP address space; provides internal identification without requiring external internet access.
Disadvantages: NAT must map private addresses to registered external addresses to enable internet communication.
NAT Implementation
Example: Shows how NAT translates private addresses to public addresses:
Devices with private addresses (e.g., 172.18.3.x) interact via NAT router connected to the internet.
Dynamic Host Configuration Protocol (DHCP)
Function: DHCP dynamically assigns IP addresses to hosts.
Process:
Host broadcasts a “DHCP discover” message.
DHCP server replies with a “DHCP offer” message.
Host sends a