einfra logoDocumentation
How-to guides

Create Router

Router Creation

Navigate yourself towards Project > Network > Routers in the left menu and click on the Create Router on the right side of the window.

Example

Enter router name and select external gateway with the -GROUP suffix.

Example

Now you need to attach your internal network to the router.

1. Click on the router you just created.

Example

2. Move to the Interfaces tab and click on the Add interface.

Example

3. Select a previously created subnet and submit.

Example

1. Create router

openstack router create project_router

The current router has no ports. We need to create at least 2 interfaces: external and internal).

2. Set external network for the router (select one with -GROUP)

openstack router set --external-gateway public-muni-147-251-255-GROUP project_router

3. Assign router as a gateway for internal network

openstack router add subnet project_subnet project_router

Additional router configuration is available in official CLI documentation.

Also, refer to the example of a router creation is handled within creation of VM.

Router External Gateway Assign

If you have no gateway on you router, you can assign a new one.

1. You can set your gateway by clicking Set Gateway.

Example

2. Choose the network you desire to use (e.g. public-cesnet-78-128-251) and confirm.

Example

Set external network for the router (let us say public-muni-147-251-255-GROUP), and the external port will be created automatically

openstack router set --external-gateway public-muni-147-251-255-GROUP my-router1

Additional router configuration is available in official CLI documentation.

Also, refer to example of a gateway creation is handled within router setup.

Router External Gateway Release

Navigate to the Project > Network > Routers. Click on the action Clear Gateway of your router. This action will disassociate the external network from your router, so your machines will no longer be able to access the Internet. If you get an error you need to first Disassociate Floating IPs.

Example

Release external gateway from router

openstack router unset --external-gateway my-router1

Make sure to first release FIPs from the network.

Additional router configuration is available in official CLI documentation.

Last updated on

publicity banner