Advances in Computer Networks
MODULE – 03
Internetworking- II: Network as a Graph, Distance Vector (RIP),
Link State (OSPF), Metrics, The Global Internet, Routing Areas,
Routing among Autonomous systems (BGP), IP Version 6 (IPv6),
Mobility and Mobile IP
🌐 Internetworking-II: Network as a Graph
📌 Concept:
In computer networking, a network can be modeled as a graph where:
Nodes (vertices) represent routers or switches
Edges (links) represent physical or logical connections between them
This abstraction helps in:
Routing
Topology design
Traffic analysis
🔧 Types of Graphs in Networking:
Graph Type Explanation
Undirected Graph Links are bidirectional (e.g., Ethernet LANs)
Directed Graph Links have direction (used in routing protocols)
Weighted Graph Edges have weights (cost, bandwidth, delay, etc.)
📈 Applications in Networking:
Application How Graph is Used
Routing Algorithms Dijkstra’s, Bellman-Ford, etc. for shortest/cost path
Topology Discovery Network management tools map the graph of the network
Fault Tolerance Graph analysis helps find alternate paths
Application How Graph is Used
Traffic Engineering Optimizing paths based on graph weights
📉 Example: Dijkstra’s Algorithm in Routing
Input: Graph with weighted edges
Goal: Find the shortest path from a source to all other nodes
Used in: OSPF (Open Shortest Path First)
🛰️ Distance Vector Routing – RIP (Routing Information
Protocol)
📌 What is RIP?
RIP (Routing Information Protocol) is a distance vector routing protocol used to
determine the best path for data by counting the number of hops to the destination.
Operates at Layer 3 (Network Layer) of the OSI model.
One of the oldest routing protocols.
Uses UDP port 520.
🧠 Key Concepts in Distance Vector (RIP):
Feature Details
Metric Number of hops (routers) to the destination
Maximum Hop Count 15 hops (16 = unreachable)
Routing Updates Sent every 30 seconds
Protocol Type Interior Gateway Protocol (IGP)
Routing Table Stores best-known distances to all destinations
Loop Avoidance Uses techniques like split horizon, hold-down
🔁 How RIP Works:
1. Each router sends its entire routing table to its neighbors.
2. Routers update their own tables based on received info.
3. The route with the lowest hop count is preferred.
🧠 RIP Routing Table Entry Example:
Destination Next Hop Hop Count
192.168.1.0 192.168.0.2 2
10.0.0.0 10.0.0.1 1
🛑 Limitations of RIP:
Slow convergence
Limited to small networks (max 15 hops)
Not efficient for large or dynamic topologies
✅ Improvements in RIP Versions:
Feature RIP v1 RIP v2
Classless? ❌ No (Classful only) ✅ Yes (CIDR supported)
Authentication ❌ Not supported ✅ Supported
Multicasting ❌ Broadcasts updates ✅ Uses multicast (224.0.0.9)
🌐 Link State Routing – OSPF (Open Shortest Path First)
📌 What is OSPF?
OSPF (Open Shortest Path First) is a link-state routing protocol used in large enterprise
networks.
It is a classless Interior Gateway Protocol (IGP) and uses the Dijkstra’s algorithm to
calculate the shortest path.
Operates at Network Layer (Layer 3) of OSI model
Uses IP protocol number 89 (not TCP/UDP)
🧠 Key Concepts of Link State Routing (OSPF):
Feature Details
Metric Cost (based on bandwidth)
Routing Updates Only when there's a change (not periodic)
Convergence Very fast
Topology View Each router maintains a complete map of the network (LSDB)
Path Calculation Uses Dijkstra’s SPF (Shortest Path First) algorithm
🏗️ OSPF Network Structure:
Component Description
Router ID Unique 32-bit identifier for each router
Area Logical grouping of routers (e.g., Area 0 = backbone)
LSA (Link State
Packets containing link state info shared between routers
Advertisements)
LSDB (Link State Database) Map of network topology built from LSAs
Designated Router / Backup DR – reduce broadcast in multi-
DR/BDR
access networks
🔁 OSPF Operation Steps:
1. Neighbor Discovery – Hello packets are exchanged
2. Database Exchange – Routers share LSDBs
3. SPF Calculation – Each router calculates the best path
4. Routing Table Update – Router installs best paths
🛡️ Advantages of OSPF:
Fast convergence
Supports CIDR and VLSM
Uses multicast (224.0.0.5/6) for efficiency
Scales well with hierarchical design
❌ Compared to RIP:
Feature RIP OSPF
Metric Hop count Cost (bandwidth)
Max hops 15 No practical limit
Convergence Slow Fast
Updates Periodic (30s) Triggered by changes
Network size Small Medium to large
📏 Routing Metrics in Networking
📌 What Are Metrics?
In networking, a metric is a value used by routing protocols to determine the best path to a
destination.
Lower metric values typically indicate a more preferred route.
🧠 Common Routing Metrics:
Metric Type Explanation Used By
Number of routers (hops) a packet must pass
Hop Count RIP
through
Bandwidth Link speed (higher = better, lower cost) OSPF, EIGRP
Delay Time it takes to traverse the path EIGRP
Load Amount of traffic on the link EIGRP
Reliability Historical stability or uptime of the link EIGRP
MTU (Max Trans. OSPF (used in tie-
Maximum packet size supported on the path
Unit) breaks)
Administrative metric, usually derived from
Cost OSPF
bandwidth
Combination of several metrics (e.g.,
Composite Metric EIGRP
bandwidth + delay)
📊 Metric Example in RIP vs OSPF:
Routing Protocol Metric Type Best Path Decision
RIP Hop count Route with fewest hops
OSPF Cost (bandwidth) Route with highest bandwidth (lowest cost)
🌍 The Global Internet
📌 Definition:
The Global Internet is a vast, interconnected network of millions of smaller networks
(ISPs, organizations, governments) that use standard protocols (like TCP/IP) to
communicate worldwide.
🧠 Key Components:
Component Description
ISPs (Internet Service
Connect users and businesses to the Internet backbone
Providers)
Routers & Switches Route data between networks and devices
Component Description
High-speed data highways that interconnect large parts of
Backbone Networks
the internet
DNS (Domain Name System) Resolves domain names to IP addresses
Protocols TCP/IP, HTTP, DNS, SMTP, FTP, etc.
Internet Exchange Points
Physical locations where different ISPs exchange traffic
(IXPs)
🌐 How It Works:
1. User Device sends data (like opening a website)
2. Local ISP routes the request through a series of routers
3. Data passes through regional and global ISPs (via fiber optics, satellites)
4. Request reaches destination server, which sends the data bac
🔄 Internet as a Network of Networks:
Decentralized architecture
Governed by protocols and standards, not a single authority
Global collaboration via organizations like:
o ICANN – manages domain names and IPs
o IETF – develops technical standards
o W3C – sets web standards
📍 Routing Areas in Networking
📌 What is a Routing Area?
A Routing Area is a logical subdivision of a larger network used by some routing protocols
(especially OSPF) to:
Simplify routing
Limit the scope of routing updates
Improve network scalability and performance
🧠 Why Use Routing Areas?
Reduces routing table size
Limits the spread of link-state advertisements (LSAs)
Decreases CPU and memory usage on routers
Improves convergence time
🏗️ In OSPF (Open Shortest Path First):
Area Type Description
Backbone Area (Area 0) Central area that connects all other areas together
Regular Area A standard area that exchanges LSAs with Area 0
Stub Area Doesn't receive external routes (less overhead)
Totally Stubby Area No external or inter-area routes allowed (only default route)
NSSA (Not-So-Stubby Area) Allows limited external route injection into stub areas
🔄 How Routing Areas Work:
1. Routers within an area exchange detailed link-state info.
2. ABRs (Area Border Routers) summarize and pass relevant info to/from Area 0.
3. Routing decisions within an area use full topology knowledge, while between areas,
summary info is used.
🧠 Key Terms:
Term Meaning
ABR Area Border Router – connects one or more areas to Area 0
ASBR Autonomous System Border Router – connects to external networks (e.g., BGP)
LSA Link-State Advertisement – shares link information
🌐 Routing Among Autonomous Systems – BGP (Border
Gateway Protocol)
📌 What is an Autonomous System (AS)?
An Autonomous System (AS) is a collection of IP networks and routers under the control
of a single organization that presents a common routing policy to the internet.
Each AS is assigned a unique AS number (ASN) by IANA/RIPE/APNIC.
Example: ISP, large enterprise, cloud providers.
🚦 What is BGP?
BGP (Border Gateway Protocol) is the protocol used to exchange routing information
between Autonomous Systems (ASes) on the Internet.
BGP is a path-vector protocol, not a distance-vector or link-state.
Defined in RFC 4271.
Uses TCP (port 179) for reliability.
🧠 Key BGP Concepts:
Term Meaning
EBGP External BGP – between routers in different ASes
IBGP Internal BGP – between routers within the same AS
AS Path A list of AS numbers a route has passed through (loop prevention)
Prefix A block of IP addresses being advertised (e.g., 192.0.2.0/24)
Route Advertisement Announcement of a path to a network
Policy-based Routing Decisions made based on rules, not just metrics
🔁 How BGP Works:
1. Establish a TCP connection between BGP peers
2. Exchange routes and attributes (AS_PATH, NEXT_HOP, etc.)
3. Apply routing policies
4. Update routing table with best path
📊 BGP Attributes:
Attribute Purpose
AS_PATH Used to prevent loops and select shortest path
NEXT_HOP IP address to reach destination
LOCAL_PREF Indicates preferred path within an AS
MED Suggests preferred route to neighboring AS
🛡️ Advantages of BGP:
Supports policy-based routing
Scales to the entire Internet
Handles routing loops and instability well using AS_PATH
⚠️ Challenges:
Complex configuration
Slow convergence in comparison to IGPs
Needs manual filtering and policies to avoid bad routing behavior
🌐 IP Version 6 (IPv6)
📌 What is IPv6?
IPv6 (Internet Protocol Version 6) is the next-generation Internet Protocol, designed to
replace IPv4 due to address exhaustion.
It offers a vastly larger address space and enhanced features for routing and security.
🆚 IPv4 vs IPv6:
Feature IPv4 IPv6
128 bits (e.g.,
Address size 32 bits (e.g., 192.0.2.1)
2001:0db8:85a3::8a2e:0370:7334)
Total addresses ~4.3 billion ~340 undecillion (3.4×10³⁸)
Header Complex with
Simplified header, no checksum
complexity checksums
Configuration Manual or DHCP Stateless Autoconfiguration + DHCPv6
Security Optional (IPSec) Mandatory (IPSec)
Broadcasting Supported Replaced with multicast
NAT required? Yes (for conservation) No (due to address abundance)
🧠 IPv6 Address Structure:
Format: 8 groups of 4 hexadecimal digits (separated by :)
Example: 2001:0db8:0000:0042:0000:8a2e:0370:7334
Shortening rules:
o Leading zeros can be omitted: 0042 → 42
o A single series of zero groups can be replaced with ::
🔎 Types of IPv6 Addresses:
Type Prefix Use
Unicast varies One-to-one communication
Multicast FF00::/8 One-to-many communication
Type Prefix Use
Anycast varies One-to-nearest (in routing sense)
Link-local FE80::/10 Local network communication
Global unicast 2000::/3 Globally routable public addresses
Loopback ::1 Localhost
🚦 IPv6 Features:
Simplified packet processing
No need for NAT
Built-in support for QoS (Flow Label field)
Enhanced mobility and multicasting
Improved end-to-end connectivity
⚙️ Transition Mechanisms:
Method Purpose
Dual Stack Run IPv4 and IPv6 together
Tunneling Encapsulate IPv6 inside IPv4 for transport
Translation (NAT64) Convert IPv6 packets to IPv4 when needed
📱 Mobility and Mobile IP
📌 What is Mobility in Networking?
Mobility refers to the ability of a device (e.g., smartphone, laptop) to move across different
networks or subnets while maintaining continuous communication with no loss of
connection or change in IP address visible to the applications.
🌍 What is Mobile IP?
Mobile IP is a protocol (developed by IETF) that allows users to move from one network to
another while maintaining a permanent IP address.
This is especially important for mobile devices moving between Wi-Fi, cellular, or different
LANs.
🧠 Key Components of Mobile IP:
Component Role
A router in the home network that maintains the mobile node's
Home Agent (HA)
location
Foreign Agent (FA) A router in the visited network that assists the mobile node
Mobile Node (MN) The moving device (e.g., phone, laptop)
Care-of Address
A temporary IP address in the foreign network
(CoA)
🔄 How Mobile IP Works:
1. The Mobile Node (MN) moves to a new network.
2. It gets a Care-of Address (CoA) via the Foreign Agent.
3. The Home Agent (HA) maps the MN's permanent IP to its CoA.
4. The HA tunnels packets to the MN's current location.
5. The MN replies directly to the source or via the FA.
📬 Tunneling:
The Home Agent uses IP-in-IP encapsulation to tunnel data to the CoA.
This helps hide the movement from the sender.
✅ Benefits of Mobile IP:
Seamless mobility
Transparency to users and applications
Maintains ongoing sessions during movement
Supports global roaming
⚠️ Limitations:
Triangular routing (packets go through HA)
Extra latency due to tunneling
Security and authentication concerns
🧠 Use Cases:
Smartphones switching between networks
Laptops moving between subnets
IoT devices in transportation
Satellite and military communications.