Routers¶
A Router is a virtual networking device that bridges the gap between different networks. It acts as the gateway for your traffic, deciding how data should travel between your internal private networks and the outside world.
What is a Router?¶
If a Network is a room, a Router is the door that connects multiple rooms together. Without a router, your virtual machines and services can only talk to others on the same network. By adding a router and "attaching" your networks to it, you enable them to communicate with each other.
Key Capabilities¶
- Inter-Network Routing: Connects your backend and frontend networks, allowing your application servers to reach your database while keeping them in separate isolated networks.
- Internet Access: Routers can be connected to an External Network (like the Public Internet). When configured this way, the router provides your internal services with a path to reach external websites, APIs, or software repositories.
- Static Routing: For advanced setups, you can define custom paths for your traffic. For example, you might want to direct all traffic destined for a specific remote office through a VPN gateway.
Creating and configuring a Router¶
A router starts with just a name and description. Once it exists, you connect it to networks and configure routing through dedicated actions.
External gateway (internet access)¶
To give your attached networks a path to the outside world, enable the External Gateway. It is off by default. When you enable it you pick an external network — only networks you have imported from your cloud can serve as the external network.
Attaching networks¶
Attach a network to the router to route traffic to and from it. Each attachment can optionally take a Fixed IP (IPv4) for the router's interface on that network; leave it blank to have one assigned automatically.
Warning
Detaching a network interrupts any routing that flows through that interface.
Static routes¶
For custom paths, add static routes. Each route has a Destination CIDR and a Next Hop. Static routes are IPv4 only.
Editing¶
The router's edit dialog changes only its name and description. The external gateway, network attachments and static routes are each managed through their own actions, not the edit dialog.
Interactions¶
Routers work in tandem with other infrastructure components:
- Networks: You attach networks to a router to enable them to communicate. The router typically serves as the "Default Gateway" for all devices on those networks.
- Virtual Machines: These services rely on routers to reach the internet for updates, image pulls, or communicating with external APIs.
- External Networks: Routers connect your private infrastructure to external networks provided by your cloud provider.