> ## Documentation Index
> Fetch the complete documentation index at: https://diogo-home-lab.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Networking

> The networking I got outside of K3s stuff

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/diogo-home-lab/UBi13GDIfTZHjRHJ/images/networking-ips-light.png?fit=max&auto=format&n=UBi13GDIfTZHjRHJ&q=85&s=35ebe5070e3e0e6c93f4ff07aeaa29f6" alt="Ips Light" width="1732" height="1037" data-path="images/networking-ips-light.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/diogo-home-lab/UBi13GDIfTZHjRHJ/images/networking-ips-dark.png?fit=max&auto=format&n=UBi13GDIfTZHjRHJ&q=85&s=cb1ed10e9f5457906294503af86fff29" alt="Architecture Dark" width="1732" height="1037" data-path="images/networking-ips-dark.png" />
</Frame>

## Static IP Assignment

In my homelab, I require identical network behavior whether I’m at home, in the office, or on the road. To achieve this, I assign static IP addresses to my core devices on the 192.168.8.0/24 network:

| Device            | Role            | IPv4 Address  |
| ----------------- | --------------- | ------------- |
| Router            | Default gateway | `192.168.8.1` |
| Switch            | Layer-2 switch  | `192.168.8.2` |
| RpiMaster         | Compute node    | `192.168.8.5` |
| RpiNode #1        | Compute node    | `192.168.8.6` |
| RpiNode #2        | Compute node    | `192.168.8.7` |
| RpiNode #3 (soon) | Compute node    | `192.168.8.8` |

<Tip> This way, no matter where I plug in, **I always reach the same IPs.** </Tip>

## DNS Aliases for Service Access

To simplify access to management interfaces and services, I use a consistent domain namespace under `da.lab`. I add DNS host entries on my router that map sub-domains to the static IPs:

| Alias           | Target IP   | Purpose   |
| --------------- | ----------- | --------- |
| `da.lab.router` | 192.168.8.1 | Router UI |
| `da.lab.switch` | 192.168.8.2 | Switch UI |

<Tabs>
  <Tab title="Router">
    This is what i see when i access `da.lab.router`.

    <img src="https://mintcdn.com/diogo-home-lab/UBi13GDIfTZHjRHJ/images/networking-router-interface.png?fit=max&auto=format&n=UBi13GDIfTZHjRHJ&q=85&s=16a1cabdf418e0cadea236376b2fbf2a" width="3164" height="1886" data-path="images/networking-router-interface.png" />
  </Tab>

  <Tab title="Switch">
    This is what i see when i access `da.lab.switch`.

    <img src="https://mintcdn.com/diogo-home-lab/UBi13GDIfTZHjRHJ/images/networking-switch-interface.png?fit=max&auto=format&n=UBi13GDIfTZHjRHJ&q=85&s=00f9fde00382cab770d1212df269de7a" width="3076" height="1798" data-path="images/networking-switch-interface.png" />
  </Tab>
</Tabs>
