A Cloud Router connects a private network to the internet and to other networks. Without one, servers on a private network can talk to each other but cannot reach the internet. The default network already has a router; you create your own when you build custom networks.
Create the router
- Open Networking, then Cloud Routers, and create a router.
- Fill in:
- Name: for example
main-router. - External Gateway: set this to the region's external network. This is what gives connected servers outbound internet access. Leave it off only for a router that just joins internal networks.
- Name: for example
- Create it.
Connect your networks
A router does nothing until you attach subnets to it.
- Open the router and add an interface for each private subnet it should serve.
- Choose the subnet and confirm.
Once a subnet is attached to a router that has an external gateway, servers on it can reach the internet outbound. Inbound access still needs a public IP and open security rules. To see how your networks and routers connect, open the Network Map.