Network Layer: Routing and Congestion Control

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which layer is primarily responsible for routing packets from source to destination across multiple networks?

  • Network Layer (correct)
  • Transport Layer
  • Data Link Layer
  • Physical Layer

What are the key functions of the network layer in computer networks?

  • Encryption, compression, and session management
  • Multiplexing, demultiplexing, and segmentation
  • Framing, error detection, and flow control
  • Routing, congestion control, and internetworking (correct)

In store-and-forward packet switching, what is the primary role of a router?

  • To directly connect hosts within the same local network.
  • To provide a dedicated communication path between source and destination.
  • To store a packet temporarily and then forward it to another router or the destination. (correct)
  • To encrypt packets before sending them to the next hop.

Which type of service in the network layer does not require advance setup between the sender and receiver?

<p>Connectionless service (D)</p> Signup and view all the answers

What is a key characteristic of a datagram subnet?

<p>Each packet is routed independently. (D)</p> Signup and view all the answers

What is a virtual circuit (VC) in the context of network communication?

<p>A logical path established before data transmission between sender and receiver. (D)</p> Signup and view all the answers

In a virtual-circuit subnet, what happens when a router along the VC path fails?

<p>All virtual circuits that passed through the failed router are terminated. (C)</p> Signup and view all the answers

What is the primary goal of routing algorithms in the network layer?

<p>To determine the best path for data packets to travel from source to destination. (A)</p> Signup and view all the answers

According to the optimality principle, if router J is on the optimal path between routers I and K, what can be said about the optimal path between J and K?

<p>It falls along the same route as the optimal path between I and K. (C)</p> Signup and view all the answers

In the context of shortest path routing, what does the weight of a link in the network graph typically represent?

<p>The length or cost associated with traversing the link. (B)</p> Signup and view all the answers

If Dijkstra's algorithm is used with each link having a cost of 1, what does the algorithm find?

<p>The path with the smallest number of hops. (C)</p> Signup and view all the answers

How does Dijkstra's algorithm determine the shortest path from a source node to all other nodes in a network?

<p>By iteratively marking nodes as permanent and updating tentative labels based on distances. (C)</p> Signup and view all the answers

What is the primary difference between packet forwarding and routing algorithms?

<p>Packet forwarding determines the outgoing link for a packet based on the routing table, while routing algorithms update the routing tables. (D)</p> Signup and view all the answers

If Dijkstra’s algorithm is applied and the weight of each link is the estimated packet delay over that link, which path will the algorithm determine?

<p>The path with the smallest delay (fastest path). (B)</p> Signup and view all the answers

What is the main characteristic of distance vector routing?

<p>Each node maintains a vector of distances to all other nodes in the network. (B)</p> Signup and view all the answers

What type of information does a router exchange with its neighbors in distance vector routing?

<p>Its routing table, which includes the best-known path to each destination. (B)</p> Signup and view all the answers

In distance vector routing, if a router finds a shorter path to a destination through a neighbor, what action does it take?

<p>Immediately switches to the new path and updates its routing table. (D)</p> Signup and view all the answers

In distance vector routing, what information is included in each entry of a router's routing table?

<p>The preferred outgoing link to the destination and an estimate of the distance to the destination. (B)</p> Signup and view all the answers

How does a router estimate the delay to its neighbors when using delay as the distance metric in distance vector routing?

<p>By sending a special ECHO packet to each neighbor and measuring the round-trip time. (B)</p> Signup and view all the answers

What are the first steps a router might take to establish its routing table using 'The Algorithm'?

<p>Send to each neighbor a list of estimated delays to each destination. (D)</p> Signup and view all the answers

When using 'The Algorithm', how does a router decide which paths to update?

<p>Calculate, using the router's delays plus each table, at which point it can determine the best path to update to. (D)</p> Signup and view all the answers

What is a primary disadvantage of distance vector routing that led to its replacement in ARPANET?

<p>It takes too long to converge, especially in large networks. (A)</p> Signup and view all the answers

Which statement describes a key attribute of link state routing?

<p>Each router maintains a complete view of the network topology. (C)</p> Signup and view all the answers

In link-state routing what is the first thing a router must do?

<p>Discover its neighbors and learn their network address. (C)</p> Signup and view all the answers

In link state routing, how do routers initially learn about their neighbors?

<p>By sending HELLO packets on each outgoing link. (A)</p> Signup and view all the answers

In link state routing, what is the purpose of flooding link state packets?

<p>To inform all routers of the network's topology. (A)</p> Signup and view all the answers

What is the role of the Age field in link state packets?

<p>To prevent link state packets from circulating indefinitely. (B)</p> Signup and view all the answers

What is the general process by which a link-state router constructs its connection map?

<p>Construct the entire graph of the network (has complete topology information). (B)</p> Signup and view all the answers

Flashcards

Network Layer

Moving packets from source to destination potentially via multiple hops.

Routing

Choosing appropriate paths through a subnet.

Congestion Control

Avoiding link overload.

Internetworking

Dealing with source and destination on different networks.

Signup and view all the flashcards

Carrier's Equipment

Routers connected by transmission lines within a network.

Signup and view all the flashcards

Customer's Equipment

Hosts residing outside the network such as end-user devices.

Signup and view all the flashcards

Connectionless Service

A service without advance setup; packets are routed independently.

Signup and view all the flashcards

Datagrams

Packets in a connectionless service.

Signup and view all the flashcards

Connection-Oriented Service

A service requiring a pre-established path before data transfer.

Signup and view all the flashcards

Virtual Circuit (VC)

Pre-established path in a connection-oriented service.

Signup and view all the flashcards

Packet Forwarding

Deciding the outgoing link for packet transmission.

Signup and view all the flashcards

Routing Algorithm

Updating routing tables.

Signup and view all the flashcards

Routing Optimality

Choosing routes to achieve specific objectives, like minimizing delay.

Signup and view all the flashcards

Shortest Path Routing

Algorithm to find the path with the shortest distance or cost.

Signup and view all the flashcards

Dijkstra's Algorithm

Used to find the shortest path in a network.

Signup and view all the flashcards

Distance Vector Routing

Algorithm where each router maintains a table of best-known paths.

Signup and view all the flashcards

Distance Metric

Estimate of how far a destination is.

Signup and view all the flashcards

Number of Hops

Routing metric calculating how far a destination is by the number of jumps.

Signup and view all the flashcards

Time Delay

Routing metric that measures the time it takes to get to a destination.

Signup and view all the flashcards

Fastest Path

The path has the smallest delay.

Signup and view all the flashcards

Flooding

Flooding helps send link state packets to all routers in the network

Signup and view all the flashcards

Link State Routing

Algorithm where each router discovers its neighbors and the network delays.

Signup and view all the flashcards

Network Address

Address of a neighbor.

Signup and view all the flashcards

Measure Link Costs

Routers measuring the communication time of echo packets.

Signup and view all the flashcards

Study Notes

  • The network layer focuses on delivering packets from the source to the destination.
  • Reaching the destination involves multiple hops via intermediate routers.
  • The network layer differs from the data link layer, which transfers frames across a single link.

Functions of the Network Layer

  • Routing involves selecting appropriate paths through the subnet.
  • Congestion control prevents overloading certain links while leaving others idle.
  • Internetworking handles communication between different networks.

Store-and-Forward Packet Switching

  • Carrier's equipment includes routers connected by lines within the shaded oval of a network diagram.
  • Customer's equipment includes hosts, located outside the shaded oval of a network diagram.
  • Host connections to the subnet utilize leased lines or a LAN and customer-operated routers.
  • To send a packet, a host transmits it to the nearest router within the subnet.
  • Packets are temporarily stored and then forwarded router to router until they arrive at the destination.

Services Provided to the Transport Layer

  • The network layer provides connection-oriented and connectionless services to the transport layer.

Connectionless Service

  • No advance setup is needed.
  • Packets are injected and routed independently, known as datagrams.
  • The subnet is called a datagram subnet.

Connection-Oriented Service

  • A path must be established before sending packets.
  • The path is called a virtual circuit (VC).
  • The subnet is known as a virtual-circuit subnet.

Connectionless Service in Detail

  • Process P1 on host H1 needs to send a long message to process P2 on host H2.
  • A message that is 4 times larger than the maximum packet size is broken into four packets by the network layer.
  • These packets are sent to router A.
  • Router A temporarily stores the packets to verify checksums.
  • The packets are forwarded to the next node based on A's routing table.
  • Packets 1, 2, and 3 are routed from A to C to E to F.
  • A traffic jam causes A's routing table to change.
  • Packet 4 is routed along a different route to bypass the jam.
  • Routing algorithms manage the routing tables.

Connection-Oriented Service in Detail

  • Once a virtual circuit is established, the route is stored in the routers’ tables.
  • All packets are sent on this route.
  • Host H1 sets up connection 1 with host H2, which updates the network table routing and stores it in the first entry.
  • A’s first entry is set up to ensure packets with connection identifier 1 are sent from H1 to C and given connection identifier 1.
  • C also routes the packet to E with the same connection identifier 1 value.
  • H3 establishes connection 1 to H2 but, to avoid conflicts, A assigns a different identifier to the outgoing packets.
  • Routers must be able to connection identifiers, otherwise known as label switching.

Comparison of Datagram and Virtual-Circuit Subnets

Issue Datagram Subnet Virtual-Circuit Subnet
Circuit setup Not needed Required
Addressing Full source and destination address Short VC number
State information Routers do not hold connection states Each VC requires router table space
Routing Independent routing Route chosen when VC is set up, all packets follow it
Router failures Packets loss during crash All VCs are terminated
Quality of service Difficult Easy if resources can be allocated in advanced
Congestion control Difficult Easy if resources can be allocated in advanced

Routing Algorithms

  • Packet forwarding determines the outgoing link for transmission using routing tables.
  • Routing algorithms update these tables.
  • With virtual circuits, the algorithm decides when the circuit is set up.
  • With datagrams, a decision must be made upon every arrival.

Routing Optimality

  • Routing algorithms are chosen to optimize objectives like minimizing packet delay, maximizing throughput and minimizing hops..
  • The optimality principle states that if router J is on the optimal path between routers I and K, then the optimal path between J and K also lies on the same route.
  • If a better route existed, it could be combined with the initial segment to achieve greater route optimization.

Shortest Path Routing

  • Represents a network as a graph. Routers are nodes and communication lines are the links.
  • Each link as a weight that represents its length.
  • Algorithms find the shortest path between nodes corresponding to a pair of routers.

Dijkstra’s Algorithm

  • Start by labeling all nodes with the distance from the source node.

  • Initially, all labels are tentative, and set to infinity, as the paths are unknown yet.

  • Mark the sender A as permanent (black circle) Then,

  • Examine each node adjacent to A

  • Relabel each node with the distance to A We choose the node with the smallest tentative label and mark it permanent.

  • If the {label of B + distance from B to C (respectively E) 9 is labeled (9,B) Choose the node with the smallest tentative label and mark it permanent.

  • Repeat until all nodes are permanently labeled giving the shortest path from source-destination.

Dijkstra’s Algorithm Variations

  • If each link is equal to 1, it determines the path using the fewest hops.
  • If the packet delay over a link is used as weight, it provides the fastest path.

Distance Vector Routing

  • Dynamic routing algorithm
  • Each router maintains a distance vector table with the best known route to each destination and its outgoing link.
  • Tables are updated through neighbor exchanges.
  • This was the ARPANET routing algorithm and used on the internet.

Distance Metric

  • The router A’s routing table has an entry for each destination network address
  • This entry has 2 parts: the preferred outgoing link, and an estimate of the distance from the destination.
  • Distance metrics can be a number of hops, time delays (in milliseconds), or the total number of packets queued along the link.
  • Each router knows its distance to its neighbors.
  • To measure hops, the nearest neighbor distance is equal to one.
  • To measure delay, the rotor sends each neighbor a special echo packet that the neighbors will respond to as quickly as possible.
  • Estimate delay by ensuring that the round trip time and each router can get an estimate of the delay to its neighbor.

Distance Vector Routing Algorithm Flow

  • Every 'T' msec each router sends a destination delays list and likewise, receives a neighboring list. An incoming table from a neighbor 'X' to Router 'Y' has 'Xi' being the estimated delay from the nearest neighbor.
  • The destination router will know the delay to router X is 'm' msec and can calculate the formula ''Xi + m = Time''.
  • Performing the calculation to determine which routes are best, it then updates and sets new path assignments.

Distance Vector Routing Example

  • J measures neighbours A, I H and K to be at respective delay intervals of 8ms, 10ms, 12ms and 6ms.
  • The vectors show that the delays from A to B is claims 12ms, 25ms to 'C' and 40 for 'D' etc.
  • Router J computes a new route to G, which claims via A (8+18=26ms), also checking via H and K. The lowest time is via route 'H' with a value of 18.
  • Router J creates a new routing table and makes the entry to use route (H) with a time of 18MS and does so for all available neighbors.
  • Replaced Distance vector routing, due to the slow convergence.
  • Discovering the neighbors’ network addresses.
  • Measuring the delay to each neighbor.
  • Constructing packets with neighbor delays.
  • Sending the packet to all routers.
  • Finally computing the shortest path to all routers.

Learning about the Neighbors

  • Upon booting, a router sends HELLO packet on each outgoing link.
  • The device on either node sends an acknowledgment packet containing its network address.
  • Every router transmits to EACH neighbor is echo packet.
  • The device on either node sends the sent packets as FAST as possible.
  • With the round trip time divided 2, the approximate cost to near routers can be estimated.
  • Routers construct link data packets upon regular intervals or whenever an event occurs.
  • Flooding spreads the link state packets to all nodes in the network.
  • Each packet contains a number sequence, which increments foreach data being sent.
  • Compare the receiving numbered packets, forwarding newest packages whilst discarding old and duplicated entries.
  • A life span is assigned during creation and it decrements each time the router forwards the state of the packages. when zero is hit, the package is deleted to prevent infinite travelling

Computing The Shortest Paths

  • Routers construct the graph when all packets exist for each destination.
  • The Dijkstra algorithm is applied to find shortest paths.
  • Routing Tables are updated accordingly.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser