> For the complete documentation index, see [llms.txt](https://digitalgarden.batamladen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://digitalgarden.batamladen.com/notes/services/routing-protocols/dynamic/igp/link-state.md).

# Link-State

Metric: Cost

## What is Link-State?

Link state protocols (LSPs) are based on a different algorithm than DVPs. LSPs are based on a graph theory algorithm called Dijkstra's algorithm, named after its creator E.W. Dijkstra.&#x20;

The algorithm works like this:\
The premise is that a collection of points is seen as a tree; one point is the base and the shortest path to all other points as the pathway. The cost of the path is the sum of the path costs between the source point and the terminus point. Whereas DVPs are interested in the shortest route, LSPs are interested in the operational status of all of the links in the network. Each host compiles a "map" of the routing domain from its own point of view.

Link-State protocols are:

* [OSPF](/notes/services/routing-protocols/dynamic/igp/link-state/ospf.md)
* [ISIS](/notes/services/routing-protocols/dynamic/igp/link-state/is-is.md)

***

## Pros & Cons

### <mark style="color:red;">Cons:</mark>

Link-State's limiting aspect is the memory required by the router to compile the shortest path distances needed for the routing table. On a small network consisting of 20 or so routers, these computations are manageable, but on a network of 100 or more, these calculations can cripple a small router with limited CPU and memory. \
LS Protocols are complex which can make them difficult to troubleshoot, and there is a problem with flooding[^1].

### <mark style="color:green;">Pros:</mark>

On the other hand, LS protocols have fast convergence time because each router has its own complete map of the network. They have more efficient usage of network resources because they only send updates when there is a change in the network topology, reducing the amount of traffic.\
Also, LS protocols can handle large networks.

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><mark style="color:green;"><strong>Pros:</strong></mark></td><td><ul><li>Fast Convergence</li><li><strong>Efficient Resource Usage</strong></li><li><strong>Scalability</strong></li></ul></td></tr><tr><td><mark style="color:red;"><strong>Cons:</strong></mark></td><td><ul><li><strong>Memory Requirements</strong></li><li><strong>Complexity</strong></li><li><strong>Flooding Issues</strong></li></ul></td></tr></tbody></table>

[^1]: Flooding is a common issue with link state protocols. It occurs when a link state advertisement (LSA) is transmitted by a router and forwarded by other routers to all their neighbors, including the originating router.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://digitalgarden.batamladen.com/notes/services/routing-protocols/dynamic/igp/link-state.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
