UNIT-2
Network Protocols and Routing
Strategies
1) Components of a Network
1) Hosts (End Devices):
• End devices are the source or destination of network communication.
• These include:
• Computers (desktops/laptops)
• Mobile phones
• Tablets
• Servers (provide services like websites, emails)
• Printers, IP Cameras, Smart TVs, etc.
Functions:
• Send or receive data via the network.
• Run applications (e.g., browsers, email clients) that use the network.
• Can act as clients or servers in the communication model.
2) Network Interface Cards (NICs):
• A hardware component that allows a device to connect to a network.
• It provides a physical interface (Ethernet port, Wi-Fi radio) and unique MAC
address.
Functions:
• Converts data into electrical or radio signals.
• Provides a MAC address for device identification.
• Handles framing, error detection, and flow control at the data link layer.
Types:
Type Description
Wired NIC Uses RJ-45 connectors and Ethernet cables
Wireless NIC Uses Wi-Fi antennas to connect wirelessly
USB NIC Portable adapters used via USB port
3) Switches:
• A switch is a networking device used to connect multiple devices within a LAN
(Local Area Network).
• It forwards data based on MAC addresses.
How It Works:
• Receives a frame → Reads the MAC address → Forwards it only to the correct
port.
• Reduces unnecessary traffic and increases efficiency.
Types of Switches:
Type Description
Unmanaged Plug-and-play, no configuration
Managed Configurable via software, used in enterprise settings
Layer 2 Operates at Data Link Layer
Layer 3 Includes routing capabilities (Network Layer)
4) Routers:
• A router connects different networks and routes data between them.
• Commonly used to connect a home or office network to the Internet.
Functions:
• Routes packets based on IP addresses.
• Maintains a routing table.
• Supports NAT (Network Address Translation) and DHCP (Dynamic Host
Configuration Protocol).
• Provides firewall and security features.
Example:
• A Wi-Fi router at home connects your devices to each other and to the ISP
(Internet Service Provider).
5) Protocols:
• Set of rules and conventions for communication between network devices.
• Define how data is formatted, transmitted, and received.
Roles:
• Addressing and routing
• Flow control and error checking
• Data segmentation and reassembly
• Session initiation and termination
ExamplesOSIbyLayer
Layer: Protocols Description
Application HTTP, FTP, SMTP User-level data handling
Transport TCP, UDP Reliable/unreliable transport
Network IP Routing and addressing
Data Link Ethernet Node-to-node communication
IEEE 802.3 (Ethernet), 802.11 (Wi-
Physical Transmission of raw bits
Fi)
2) Network Protocols and Standards
1) Network Protocols:
• Network protocols are formal rules and conventions that determine
how devices communicate across networks. These rules define how data
is formatted, transmitted, received, and processed.
Importance of Network Protocols:
• Devices from different manufacturers can communicate.
• Data is transmitted reliably and accurately.
• Errors are detected and handled.
• Communication is synchronized and organized.
Types of Network Protocols:
1. Communication Protocols:
• These manage the data transmission between devices.
Protocol Description
TCP (Transmission Control Protocol) Ensures reliable, ordered delivery of data.
UDP (User Datagram Protocol) Faster, connectionless; suitable for streaming.
IP (Internet Protocol) Handles addressing and routing of packets.
HTTP/HTTPS (Hyper Text Transfer Protocol) Used for web communication. HTTPS is secure.
FTP (File Transfer Protocol) Transfers files between systems.
SMTP, IMAP, POP3 Protocols for email communication.
2. Routing Protocols:
• These are used by routers to determine the best path for data.
Protocol Description
RIP (Routing Information Protocol) Distance-vector, uses hop count.
OSPF (Open Shortest Path First) Link-state, faster and more scalable.
BGP (Border Gateway Protocol) Used to route between ISPs on the internet.
3. Security Protocols:
• It will ensure confidentiality, integrity, and authentication.
Protocol Description
SSL/TLS (Secure Socket Layer / Transport Layer
Encrypts web traffic.
Security)
IPSec (Internet Protocol Security) Secures IP communication.
HTTPS HTTP over SSL/TLS for secure websites.
4. Network Management Protocols:
• These are used to monitor and control networks.
Protocol Description
SNMP (Simple Network Management Protocol) Collects and organizes network data.
ICMP (Internet Control Message Protocol) Error and control messages (e.g., ping).
5. Link Layer Protocols:
• Operate at the Data Link Layer, managing MAC addressing and error
detection.
Protocol Description
Ethernet LAN communication protocol.
Wi-Fi (IEEE 802.11) Wireless communication.
PPP (Point-to-Point Protocol) Used over direct connections like dial-up.
ARP (Address Resolution Protocol) Maps IP addresses to MAC addresses.
2) Network Standards:
• Network standards are agreed-upon guidelines or specifications for hardware,
software, protocols, and communication that ensure interoperability between different
devices and systems in a network. They are essential for:
• Compatibility between devices from different manufacturers.
• Reliable communication across heterogeneous systems.
• Scalability and integration of new technologies.
Types of Network Standards:
a. De Facto Standards:
Definition: Widely adopted by practice rather than formal approval.
Example: Ethernet was a de facto standard before being standardized by IEEE.
b. De Jure Standards:
Definition: Legally approved and published by an official standards body.
Example: OSI Model by ISO.
Importance of Standards in Networking:
• Interoperability – Ensures different devices work together seamlessly.
• Global Communication – Facilitates standardized data exchange across the world.
• Innovation – Developers can build new technologies without worrying about compatibility.
• Cost Efficiency – Reduces proprietary systems and encourages open systems.
• Security & Reliability – Provides frameworks for implementing secure and dependable
networks.
Standards Organizations:
• Several international organizations develop and maintain networkDescription
Organization standards:
Developed the OSI model, a foundational reference
ISO (International Organization for Standardization)
for networking.
IEEE (Institute of Electrical and Electronics Defines physical and data link layer standards like
Engineers) Ethernet (IEEE 802.3) and Wi-Fi (IEEE 802.11).
Develops Internet standards like TCP/IP, IP
IETF (Internet Engineering Task Force)
addressing, DNS, etc.
ITU-T (International Telecommunication Union – Sets global standards for telecommunication systems
Telecommunication Standardization Sector) including PSTN and 5G.
3) Network and Protocol Architecture
1) Network Architecture:
• Network architecture is the design framework that defines how computers and
devices are connected and how data is transmitted. It includes:
• Physical topology (layout of hardware)
• Logical topology (data flow paths)
• Communication protocols
• Network models (OSI, TCP/IP)
Key Features:
• Scalability – Ability to grow.
• Reliability – Fault tolerance.
• Security – Data protection.
• Efficiency – Optimal use of resources.
2) Protocol Architecture:
• Protocol architecture defines the structure and functions of network
protocols used to govern communication between network devices.
Protocols specify:
• How data is formatted
• How it's transmitted
• Error checking
• Data compression and encryption
• Addressing and routing
4) Reference Model ISO-OSI
• The ISO-OSI (Open Systems Interconnection) Reference Model is a conceptual framework that
standardizes the functions of a telecommunication or computing system into seven distinct layers.
• It was developed by the International Organization for Standardization (ISO) in 1984 to
promote interoperability between diverse systems and protocols.
Layers in ISO-OSI Model:
Layer Layer Name Function
7 Application Interface for end-user processes
6 Presentation Data translation, encryption, compression
5 Session Establishes, manages, and terminates sessions
4 Transport Reliable data transfer, flow control, error correction
3 Network Path determination and logical addressing (IP)
2 Data Link Physical addressing (MAC), error detection
1 Physical Transmission of raw bit stream over the physical medium
Layer 1: Physical Layer
Function:
• Transmits raw bits (0s and 1s) over a physical medium.
• Defines hardware specifications (voltage levels, pin layouts, cable specifications).
• No interpretation of the data; just transmission.
Responsibilities:
• Bit-by-bit delivery
• Data encoding (e.g., NRZ, Manchester)
• Modulation (analog/digital)
• Transmission medium (copper, fiber, wireless)
• Physical topology (star, bus, ring)
Examples:
• Ethernet cables, fiber optics, Wi-Fi signals
• Hubs, repeaters
• Standards: IEEE 802.3 (Ethernet), RS-232
Function:
Layer 2: Data Link Layer
• Ensures reliable node-to-node communication.
• Frames the data received from the network layer.
• Provides error detection and correction.
Responsibilities:
• MAC addressing
• Framing and deframing
• Flow control
• Error detection (CRC, parity) and correction
• Access control to the shared medium
Sub-layers:
• MAC (Media Access Control): Controls how devices on the network gain access to data.
• LLC (Logical Link Control): Identifies and encapsulates network layer protocols.
Examples:
• Devices: Switches, NICs
• Protocols: Ethernet, PPP, ARP, HDLC
• MAC Address (e.g., 00:1A:2B:3C:4D:5E)
Layer 3: Network Layer
Function:
• Handles logical addressing and routing of data.
• Decides the best path for data to travel.
Responsibilities:
• IP addressing (IPv4/IPv6)
• Routing (static/dynamic)
• Packet forwarding
• Fragmentation and reassembly
Examples:
• Device: Routers
• Protocols: IP, ICMP, IGMP, OSPF, RIP, BGP
• IP Address: 192.168.1.1
Layer 4: Transport Layer
Function:
• Provides reliable data transfer between end systems.
• Ensures error-free, in-sequence data delivery.
Responsibilities:
• Segmentation and reassembly
• Flow control (sliding window)
• Error control (checksums)
• Connection control (establish/terminate connections)
Protocols:
• TCP (Transmission Control Protocol): Reliable, connection-oriented.
• UDP (User Datagram Protocol): Unreliable, connectionless.
Examples:
• Port numbers: HTTP (80), HTTPS (443), FTP (21)
• TCP/UDP headers in data packets
Layer 5: Session Layer
Function:
• Manages sessions (connections) between applications.
• Initiates, maintains, and terminates connections.
Responsibilities:
• Session establishment, maintenance, and termination
• Dialog control (half-duplex/full-duplex)
• Synchronization (checkpoints for recovery)
Examples:
• APIs that manage sessions: RPC (Remote Procedure Call), NetBIOS
• Used in video conferencing, remote desktop
Layer 6: Presentation Layer
Function:
• Translates data into a format the application layer can understand.
• Handles encryption, decryption, compression.
Responsibilities:
• Data translation (e.g., EBCDIC to ASCII)
• Data compression (e.g., ZIP, JPEG)
• Data encryption/decryption (e.g., SSL/TLS)
Examples:
• File formats: JPEG, PNG, MP3, PDF
• Protocols: TLS/SSL for secure communication
Layer 7: Application Layer
Function:
• Provides network services directly to end users or applications.
• Interfaces directly with software applications.
Responsibilities:
• Resource sharing and remote file access
• Email, file transfers, database access
• Web browsing, DNS lookups
Examples:
• Protocols: HTTP, FTP, SMTP, POP3, DNS, Telnet, SNMP
• Applications: Web browsers, email clients
5) TCP/IP Reference Model – Overview
• The TCP/IP model (Transmission Control Protocol/Internet Protocol) is a 4-layer conceptual
framework used to describe how data is transmitted across networks.
• It was developed by the U.S. Department of Defense (DoD) and is the basis of the Internet
architecture.
Layers in TCP/IP Model:
TCP/IP Layer Corresponding OSI Layers Main Functions
4. Application 7 (App) + 6 (Pres) + 5 (Sess) User-level services and applications
3. Transport 4 (Transport) End-to-end communication, reliability
2. Internet 3 (Network) Logical addressing and routing
1. Network Access 2 (Data Link) + 1 (Phy) Physical transmission and data framing
Layer-1: Network Access Layer (Link Layer)
• Combines OSI Layers 1 & 2
• Handles physical transmission and hardware addressing (MAC).
• Device-to-device data transfer within the same network.
Functions:
• Framing
• Error detection (not correction)
• Access to transmission medium
Protocols/Technologies:
• Ethernet, Wi-Fi, Token Ring, ARP, PPP
• Devices: Network Interface Cards (NIC), switches
Layer 2: Internet Layer
• Corresponds to OSI Layer 3 (Network Layer)
• Provides logical addressing (IP) and routing
• Transports data between independent networks
Functions:
• IP addressing and packet delivery
• Routing (via routers)
• Fragmentation and reassembly
Protocols:
• IP (IPv4, IPv6): Core addressing protocol
• ICMP: Error reporting and diagnostics (e.g., ping)
• ARP: Resolves IP to MAC addresses
• IGMP: Manages multicast group memberships
Device: Routers
Layer -3: Transport Layer
• Equivalent to OSI Layer 4.
• Manages end-to-end communication between hosts.
Functions:
• Reliable delivery (TCP) or fast, connectionless delivery (UDP)
• Error detection, flow control, retransmission
Protocols:
• TCP: Reliable, ordered, connection-oriented
• UDP: Unreliable, unordered, connectionless
• Ports: Used to identify specific applications (e.g., HTTP: 80, FTP: 21)
Layer-4: Application Layer
• Merges OSI Layers 5 (Session), 6 (Presentation), and 7 (Application)
• Provides interfaces for software applications
Functions:
• Application services (e.g., email, web browsing)
• Data formatting, encryption, compression
• Establishing sessions
Protocols:
• HTTP/HTTPS: Web communication
• FTP: File transfer
• SMTP/POP3/IMAP: Email
• DNS: Domain name resolution
• Telnet/SSH: Remote login
5) Topology
• In computer networking, topology refers to the arrangement of nodes and
connections (links) in a network.
• It defines how devices (such as computers, switches, routers) are physically or
logically connected and communicate with each other.
There are two main types of topology:
1. Physical Topology
• Refers to the actual layout of cables and devices.
• How the devices are physically connected in a network.
2. Logical Topology
• Refers to the way data flows within the network, regardless of its physical design.
Types of Network Topologies
1. Bus Topology
• All devices are connected to a single central cable (the bus).
• Data travels in both directions to all devices.
➤ Advantages:
• Easy to install.
• Requires less cable.
➤ Disadvantages:
• Entire network goes down if the main cable fails.
• Difficult to troubleshoot.
• Limited cable length and number of nodes.
2. Star Topology
• All devices are connected to a central hub or switch.
➤ Advantages:
• Easy to add or remove devices.
• Centralized management.
• Failure of one device does not affect others.
➤ Disadvantages:
• If the central hub fails, the whole network fails.
• Requires more cable than bus.
3. Ring Topology
• Each device has two connections — one to each neighboring device, forming a ring.
• Data travels in one direction or sometimes both.
➤ Advantages:
• Data is transmitted at high speed.
• No data collisions in unidirectional rings.
➤ Disadvantages:
• A failure in any device can disrupt the entire network.
• Troubleshooting is difficult.
4. Mesh Topology
• Every device is connected to every other device.
• Two types:
• Full Mesh: All nodes are interconnected.
• Partial Mesh: Some nodes are interconnected.
➤ Advantages:
• High fault tolerance.
• Reliable and secure.
➤ Disadvantages:
• Expensive due to many cables and ports.
• Complex to set up and maintain.
5. Tree Topology
• Combination of star and bus topologies.
• Hierarchical structure of nodes.
➤ Advantages:
• Scalable and easy to expand.
• Supports future hardware changes.
➤ Disadvantages:
• Heavily dependent on the main bus cable.
• Complex to configure and maintain.
6. Hybrid Topology
• Combines two or more topologies (e.g., star-bus, star-ring).
• Used in large organizations and enterprise networks.
➤ Advantages:
• Flexible and scalable.
• Efficient for large networks.
➤ Disadvantages:
• Costly and complex.
• Requires skilled management.
Transmission modes
• Transmission modes refer to the way data is transmitted between two devices (sender
and receiver).
• These modes define the direction of data flow between devices.
• There are three main transmission modes:
1. Simplex Mode:
Definition: Data flows in one direction only.
• Sender → Receiver, no return path.
Example:
• Keyboard to computer.
• TV broadcast (you receive but can't send back).
Key Points:
• Unidirectional.
• The receiver cannot send data back.
• Low cost but limited use.
2. Half Duplex Mode:
Definition: Data flows in both directions, but one direction at a time.
• Devices take turns sending and receiving data.
Example:
• Walkie-talkies.
• CB(Citizens Band) radios.
Key Points:
• Bidirectional but not simultaneous.
• Only one device can transmit at a time.
• Requires control mechanism to manage turn-taking.
3. Full Duplex Mode:
Definition: Data flows in both directions simultaneously.
Example:
• Telephone communication.
• Modern computer networks (e.g., Ethernet with full-duplex NICs).
Key Points:
• Simultaneous bidirectional communication.
• Doubles the capacity of the channel.
• Requires separate paths (or technologies like echo cancellation).
Routing in mobile environments:
Proactive, Reactive, Hybrid protocols
Routing in mobile environments (like Mobile Ad Hoc Networks –
MANETs) is challenging because:
• Network topology changes frequently.
• Nodes are mobile.
• Limited battery, bandwidth, and processing power.
• To address this, routing protocols are categorized into three main types:
1. Proactive Routing Protocols (Table-driven)
2. Reactive Routing Protocols (On-demand)
3. Hybrid Routing Protocols
1. Proactive Routing Protocols (Table-driven)
Definition:
• Maintain up-to-date routing tables to all nodes in the network.
• Routes are available even before they are needed.
Features:
• Periodic updates.
• Higher overhead (control messages), even if no data is sent.
• Faster route establishment.
Examples:
• DSDV (Destination-Sequenced Distance Vector)
• OLSR (Optimized Link State Routing)
• WRP (Wireless Routing Protocol)
Pros:
• Immediate route availability.
• Suitable for small, stable networks.
Cons:
• Wastes resources in highly dynamic environments.
• Control overhead increases with mobility.
2. Reactive Routing Protocols (On-demand)
Definition:
• Create routes only when needed.
• No periodic updates; routes are discovered when communication is initiated.
Features:
• Reduces overhead.
• Initial communication delay due to route discovery.
Examples:
• AODV (Ad hoc On-demand Distance Vector)
• DSR (Dynamic Source Routing)
• TORA (Temporally Ordered Routing Algorithm)
Pros:
• Saves bandwidth.
• Efficient for dynamic or large networks.
Cons:
• Latency during route discovery.
• Route may break due to mobility.
3. Hybrid Routing Protocols
Definition:
• Combine proactive and reactive approaches.
• Maintain proactive routes in local regions and use reactive methods for distant nodes.
Features:
• Reduces delay and overhead.
• Efficient for large, complex networks.
Examples:
• ZRP (Zone Routing Protocol)
• SHARP (Sharp Hybrid Adaptive Routing Protocol)
Pros:
• Balanced performance.
• Scalable and adaptable.
Cons:
• More complex to implement.
• Parameter tuning (zone size, thresholds) is crucial.