CS331 / Slide Breakdowns
Upgraded Study Guide

Network Layer: Routing Of Packets

A richer breakdown of routing tables, default routes, destination-address forwarding, shortest path routing, distance vector, link state, autonomous systems, and common routing protocols.

Source focusNetwork Layer Part 2
Exam skillApply masks and compare routes
Memory hookDefault = 0.0.0.0/0
Best useUse for forwarding table problems
Role

What Routing Protocols Are Responsible For

Routing protocols are network-layer software that implement routing algorithms and support forwarding decisions.

Routing

Build and update tables

Routing finds shortest or best paths from each source to destinations, then fills and updates routing tables.

Forwarding

Use the table

Forwarding decides which output interface an incoming packet should use by referring to the routing/forwarding table.

Hierarchy

Why Internet routing is hierarchical

The Internet has too many routers and hosts for one flat table. Hierarchical routing divides the problem into manageable parts.

Mini summary
  • Routing computes paths.
  • Forwarding moves packets.
  • Internet routing is hierarchical.
Graph

Modeling The Network As A Graph

Routing algorithms often treat the network as a graph so costs can be calculated systematically.

Nodes and edges

Graph representation

Routers are graph nodes. Physical links are edges. Each edge has a cost such as delay or bandwidth-based cost.

Cost

Shortest means least cost

The shortest path is the path with the least total cost. It does not always mean the fewest hops unless hop count is the metric.

Tree

Least-cost tree

A least-cost tree shows the lowest-cost paths from one router to destinations in the routing domain.

Mini summary
  • Graphs model routers and links.
  • Costs define best paths.
  • Least-cost paths feed routing tables.
Tables

Forwarding Tables And Default Route

Destination-address forwarding applies masks to destination IP addresses and compares results with table entries.

Network-specific

Network route

A network-specific route lists a destination network address. It matches many hosts in that network.

Host-specific

Host route

A host-specific route lists one destination host address. It is more specific than a general network route.

Default

0.0.0.0/0

The default route is used when no more specific route is found. The route 0.0.0.0/0 can match any destination and acts as fallback.

Mini summary
  • Network routes match groups.
  • Host routes match one host.
  • Default route is fallback.
Algorithms

Static, Distance Vector, And Link State

Routing algorithms differ in how routers learn and update route information.

Static

Precomputed or manually configured

Static routes change slowly and can be entered by an administrator or precomputed offline.

Distance vector

Neighbor distance exchange

Each node maintains a distance vector table containing distances to destinations. Routers share distance information with neighbors and update minimum costs.

Link state

Shared network map

Each router measures the cost to directly connected neighbors, creates link-state packets, floods them, and builds a link-state database. Routers then compute shortest paths.

Concept Meaning Exam clue
Distance vector Sends distance information to neighbors Think table sharing
Link state Floods link facts and builds LSDB Think map building
Static Configured and slow-changing No automatic adaptation
Mini summary
  • Static is simple but manual.
  • DV shares distances with neighbors.
  • LS builds a shared database.
Internet

Autonomous Systems And Routing Protocols

The Internet is divided into autonomous systems to make global routing manageable.

AS

Autonomous system

An AS is a single network or group of networks under one administrator and assigned a globally unique AS number.

Interior

Inside one AS

Interior routing protocols operate inside one autonomous system. Examples listed in the slides include RIP, OSPF, and EIGRP.

Exterior

Between ASs

Exterior routing connects autonomous systems. BGP is the main protocol between ASs and border gateway routers.

Mini summary
  • AS means one administrative domain.
  • Interior protocols work inside AS.
  • BGP works between ASs.
Revise

Final Cheat Sheet

Use this as the last-pass memory page before a quiz or exam.

  • Routing Finds paths and fills tables.
  • Forwarding Chooses output interface.
  • Graph node Router.
  • Graph edge Physical link.
  • Default route 0.0.0.0/0.
  • Network route Matches destination network.
  • Host route Matches one host.
  • DV Neighbor distance exchange.
  • LS Flood link-state facts.
  • AS Administrative routing domain.
  • Interior RIP, OSPF, EIGRP.
  • Exterior BGP.
Practice

Practice Questions With Answers

These questions target the facts, comparisons, and calculations that are easiest to test.

What does 0.0.0.0/0 represent?

Answer: The default route.

Explanation: A /0 mask can match any destination when no specific route matches.

What is the difference between distance vector and link state?

Answer: DV shares distance tables with neighbors; LS floods link facts and builds a shared database.

Explanation: They learn topology information differently.

Do hosts need full forwarding tables?

Answer: No, hosts normally send to a default router.

Explanation: Routers perform most forwarding decisions.

Which protocol is exterior routing?

Answer: BGP.

Explanation: BGP routes between autonomous systems.

What does shortest path mean?

Answer: Least total cost according to the metric.

Explanation: Cost may not equal hop count.