# Network Topologies

### Nodes and links <a href="#nodes-and-links" id="nodes-and-links"></a>

Nodes (computers) communicate with eachother over links (channels).

In graph theory, nodes are called vertices and links are called edges.

<figure><img src="https://1588585907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTwgToRvLjYdjfpAVgP%2Fuploads%2F1Wejg9w3ouDErQDICQnG%2Fimage.png?alt=media&#x26;token=76e240d9-7177-406f-a904-a8db48f90698" alt=""><figcaption><p>Nodes connected by a Link</p></figcaption></figure>

### Fully Connected Network

A fully connected network has direct links from every node to every other node. This scales badly in networking as the number of links grows quadratically with the number of nodes.&#x20;

The formula is `l = n x (n - 1) / 2`

In graph theory, this is called a complete graph.

<figure><img src="https://1588585907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTwgToRvLjYdjfpAVgP%2Fuploads%2FrrnJz3ngGl05oClw4mPE%2Fimage.png?alt=media&#x26;token=861c76bb-fff4-4bcd-9ddd-9ee913525225" alt=""><figcaption></figcaption></figure>

### Star Network

Introducing a central node (**router / relaying node**) reduces the number of links between nodes.

In a star network, the number of links scales linearly with the number of nodes.

Non-relaying nodes act as communication endpoints.

**A star network is centralized**, with the central node exerting control over communication and being a single point of failure.

This topology **reduces availability** and may be undesirable for political and technical reasons.

<figure><img src="https://1588585907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTwgToRvLjYdjfpAVgP%2Fuploads%2F7YXv3hXrbJTSeXQYLxfL%2Fimage.png?alt=media&#x26;token=b4736e2b-8005-4581-87db-b1fe67e981b2" alt=""><figcaption><p>Star network with central node (router) in blue</p></figcaption></figure>

### Mesh Network

Increasing the number of routers (relaying nodes) avoids the drawbacks of centralization.&#x20;

In a mesh network, communication remains possible even if some routers fail.&#x20;

A partially connected network **balances redundancy and scalability.**&#x20;

Mesh networks are typically **preferred for flexibility and reliability**.&#x20;

Critical systems may connect to multiple routers for **increased availability, despite higher costs**.

<figure><img src="https://1588585907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTwgToRvLjYdjfpAVgP%2Fuploads%2Fhczdln3x7sUMepukpECr%2Fimage.png?alt=media&#x26;token=c50505e9-aeff-43f3-8176-4cfdb5968a44" alt=""><figcaption><p>Mesh Network with multiple routers</p></figcaption></figure>
