Network Layer and Routing
Network Layer and Routing
Routing and
Types of routing in
Computer Networks
Network Layer and Routing
- The network layer is responsible for routing packets from the source to the
destination.
- In most networks, packets need to make multiple hops to reach their
destination.
- Routing Algorithms determine the best path for packets:
- Decide which path to send each packet through the network.
- For datagram-based networks, routing is decided for each packet.
- For virtual circuit networks, routing is only decided once at the beginning of
each session.
- Routing vs. Forwarding
- Routing: Deciding which route to use.
- Forwarding: Moving each packet along the pre-determined path.
Routing Algorithm Goals and Types
- Stability:
- Important for routing algorithms to reach and maintain a steady state.
- Some unstable algorithms may never reach equilibrium, causing unpredictable routing.
- Fairness vs. Optimality:
- Fairness ensures balanced access for all connections, while optimality focuses on maximum network
efficiency.
- These goals often conflict, requiring compromises to achieve balance.
- Optimization Goals:
- A common goal is to minimize mean packet delay, but maximizing network throughput is also important.
- Many networks try to reduce the number of hops a packet takes to improve delay and save bandwidth, which
can also enhance throughput.
- Dijkstra’s Algorithm:
- Begins by labeling each node with an initial “infinity” distance.
- The starting node is marked as permanent.
- Nodes adjacent to the working node are examined and relabeled with shorter paths if found.
- After each round, the node with the smallest distance becomes permanent and becomes the
next working node.
- The process continues until the shortest path to the destination node is determined.
Flooding (Static Routing Algorithm)
Flooding Mechanism:
Every incoming packet is sent on all outgoing lines except the one it arrived on.
Without limitations, flooding can create an infinite number of duplicate packets.
Methods to Control Flooding:
Hop Counter: A counter in each packet’s header decreases at each hop; the packet is
discarded when the counter reaches zero.
Sequence Numbers: Each packet is assigned a unique sequence number. Routers
track received packets to avoid resending duplicates.
Selective Flooding: Sends packets only on lines that generally head toward the
destination, reducing unnecessary packet transmission.
Applications of Flooding:
Used in military networks where robustness is essential, even if routers are lost.
Useful for distributed databases to update all locations concurrently.
Employed in wireless networks to broadcast within range.
Serves as a benchmark for comparing routing algorithms, as it finds the shortest path
due to its exhaustive coverage.
BroadCasting Methods
Broadcasting:
Broadcasting is sending a packet to all destinations simultaneously.
Applications include weather updates, stock information, and other services where many hosts need the same data.
Broadcasting Methods:
1. Direct Packet Sending:
The source sends a distinct packet to each destination.
Drawback: High bandwidth usage and requires the source to have a complete list of all destinations.
This method is least efficient and often impractical.
2. Flooding:
Each incoming packet is sent out on all outgoing lines except the arrival line.
Flooding guarantees that all destinations receive the packet but creates many duplicate packets and high
bandwidth usage.
Practical for very robust systems, like military applications or wireless networks.
3. Multidestination Routing:
Each packet carries a list of destinations or a bit map of the destinations.
At each router, the packet is copied for each outgoing line to be used, with only relevant destinations included in
each copy.
Efficient in reducing redundant packets but requires routers to manage destination lists, which adds overhead.
4.Reverse Path Forwarding:
Routers check if the packet arrived on the “preferred line” for reaching the broadcast
source:
If yes, it’s forwarded on all other lines.
If no, it’s discarded as a duplicate.
Offers a reasonable compromise of efficiency without complex setup.
Comparison of Methods:
Direct Sending: Simple, high overhead.
Flooding: Ensures delivery to all nodes but generates many duplicates.
Multidestination Routing: Reduces packet load but has destination tracking overhead.
Reverse Path Forwarding: Efficient and easy to implement, with no complex tree or
tracking requirements.
Multicasting
Multicasting is a technique for sending messages to a specific group of recipients in a network, rather than t
(broadcasting) or a single node (unicast).
Multicasting is essential when:
The group size is large but only a small portion of the total network.
Broadcasting would reach many irrelevant nodes, causing inefficiency or security risks.
Challenges in Multicasting:
Group Management:
Groups need to be dynamically managed—created and destroyed as needed, and members can join or leave at any
Hosts need a mechanism to inform their routers when they join or leave a group.
Router Awareness:
Routers need to track which groups their connected hosts belong to.
This information is crucial for directing messages to the correct set of recipients.
Routers gather this data either through direct updates from hosts or by periodically querying them.
Multicast Routing Algorithm:
Multicast routing efficiently delivers messages to group members without overwhelming non-members.
Spanning Trees for Efficiency:
Each router computes a spanning tree covering all other routers to determine the best paths for delivering messag
The spanning tree is structured to reach only relevant routers with connected group members.
Example: In a network with groups 1 and 2, each router maintains a spanning tree that covers only routers connecte
one member of the specified group.
Benefits of Multicast Routing:
Minimizes network traffic by avoiding redundant message delivery to non-members.
Down : 1.The routing method uses a list of
destinations in each packet
Across : 2.The metric often used to determine the
shortest path in routing
Down : 3.The primary disadvantage of direct
packet sending in broadcasting
Across : 4.The method used to avoid resending
duplicate packets in flooding
Across : 5.The process of determining the best
path for data packets to travel across a network
Down : 6.The multicast technique that uses
spanning trees for efficient message delivery
Down : 7.The routing algorithm that has predetermined
routes set during network initialization
Across : 8.The routing algorithm known for using
“Shortest Path”
Across : 9.The mechanism that reduces
unnecessary packet transmission in flooding
Across : 10.The type of routing algorithm that adjusts
routes based on changes in traffic and topology
Across : 11.The term that describes process of moving
packets along a predetermined path
Across : 12.The technique to send messages to
specific groups in a network
Across : 13.The technique to ensure delivery to all
nodes but creates duplicates
Thank You