ArticleslgStudy

computer science

Link-state routing protocol

Link-state routing protocol is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Link-state routing protocol rather than just read about it. In short: Link-state routing protocols are one of the two main classes of routing protocols used in packet switching networks for computer communications, the others being distance-vector routing protocols. Examples of link-state routing protocols include Open Shortest Path First (OSPF) and Intermediate System to Intermediate System (IS-IS).

Key takeaways

  • Link-state routing protocol belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Link-state routing protocol to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Link-state routing protocol from memory before moving on to harder problems.

Reference excerpt

Link-state routing protocols are one of the two main classes of routing protocols used in packet switching networks for computer communications, the others being distance-vector routing protocols. Examples of link-state routing protocols include Open Shortest Path First (OSPF) and Intermediate System to Intermediate System (IS-IS). The link-state protocol is performed by every switching node in the network (i.e., nodes which are prepared to forward packets; in the Internet, these are called routers). The basic concept of link-state routing is that every node constructs a map of the connectivity to the network in the form of a graph, showing which nodes are connected to which other nodes. Each node then independently calculates the next best logical path from it to every possible destination in the network. Each collection of best paths will then form each node's routing table. This contrasts with distance-vector routing protocols, which work by having each node share its routing table with its neighbors. In a link-state protocol, the only information passed between nodes is connectivity related. Link-state algorithms are sometimes characterized informally as each router "telling the world about its neighbors."

Overview In link-state routing protocols, each router possesses information about the complete network topology. Each router then independently calculates the best next hop from it for every possible destination in the network using local information of the topology. The collection of best next hops forms the routing table. This contrasts with distance-vector routing protocols, which work by having each node share its routing table with its neighbours. In a link-state protocol, the only information passed between the nodes is the information used to construct the connectivity maps.

History What is believed to be the first adaptive routing network of computers, using link-state routing, was designed and implemented during 1976–1977 by a team from Plessey Radar led by Bernard J Harris; the project was for "Wavell" – a system of computer command and control for the British Army. The first link-state routing concept was published in 1979 by John M. McQuillan (then at Bolt, Beranek and Newman) as a mechanism that would calculate routes more quickly when network conditions changed and thus lead to more stable routing. The technique was later adapted for use in the contemporary link-state routing protocols IS-IS and OSPF. Cisco literature refers to Enhanced Interior Gateway Routing Protocol (EIGRP) as a "hybrid" protocol, despite the fact it distributes routing tables instead of topology maps. However, it does synchronize routing tables at start-up as OSPF does and sends specific updates only when topology changes occur. In 2004, Radia Perlman proposed using link-state routing for layer 2 frame forwarding with devices called routing bridges, or Rbridges. The Internet Engineering Task Force has standardized the Transparent Interconnection of Lots of Links (TRILL) protocol to accomplish this. More recently, this hierarchical technique was applied to wireless mesh networks using the Optimized Link State Routing Protocol (OLSR). Where a connection can have varying quality, the quality of a connection can be used to select better connections. This is used in some ad hoc routing protocols that use radio frequency transmission.

Distributing maps

The first main stage in the link-state algorithm is to give a map of the network to every node. This is done with several subsidiary steps. First, each node needs to determine what other ports it is connected to over fully working links; it does this using reachability protocol that it runs periodically and separately with each of its directly connected neighbours. Each node periodically (and in case of connectivity changes) sends a short message, the link-state advertisement, which:

Identifies the node that is producing it. Identifies all the other nodes (either routers or networks) to which it is directly connected. Includes a 'sequence number', which increases every time the source node makes up a new version of the message. This message is sent to all the nodes on a network. As a necessary precursor, each node in the network remembers, for every one of its neighbors, the sequence number of the last link-state message which it received from that node. When a link-state advertisement is received at a node, the node looks up the sequence number it has stored for the source of that link-state message; if this message is newer (i.e., has a higher sequence number), it is saved, the sequence number is updated, and a copy is sent in turn to each of that node's neighbors. This procedure rapidly gets a copy of the latest version of each node's link-state advertisement to every node in the network. The complete set produces the graph for the map of the network. The link-state message giving information about the neighbors is recomputed and then flooded throughout the network whenever there is a change in the connectivity between the node and its neighbors, e.g., when a link fails.

Calculating the routing table The second main stage in the link-state algorithm is to produce routing tables by inspecting the maps. Each node independently runs an algorithm over the map to determine the shortest path from itself to every other node in the network; generally, some variant of Dijkstra's algorithm is used. A node maintains two data structures: a Tree data structure tree containing nodes which are "done", and a list of candidates. The algorithm starts with both structures empty; it then adds to the first one the node itself. The variant of a greedy algorithm then repetitively does the following:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Link-state routing protocol

Start with the simplest possible case. Write down what Link-state routing protocol claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Link-state routing protocol before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Link-state routing protocol ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Link-state routing protocol

In research
Link-state routing protocol appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Link-state routing protocol in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Link-state routing protocol is common in secondary-school and first-year university syllabi. It links to neighbouring topics Routing algorithms, Routing protocols, so understanding it makes those chapters shorter.
In everyday life
Look for Link-state routing protocol outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Link-state routing protocol in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Link-state routing protocol means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Link-state routing protocol out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Link-state routing protocol in simple terms?

Link-state routing protocols are one of the two main classes of routing protocols used in packet switching networks for computer communications, the others being distance-vector routing protocols. Examples of link-state routing protocols include Open Shortest Path First (OSPF) and Intermediate Syst…

Why does Link-state routing protocol matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Link-state routing protocol?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Link-state routing protocol.

Tags

  • Routing algorithms
  • Routing protocols

Keep exploring