Attaching networks to routers
Routers in OpenStack can connect to a single external provider network and one or more tenant networks, as shown in the following diagram:
In Figure 4.3, an external provider network provides external connectivity, while tenant networks provide connectivity to virtual machines and other virtual network devices within a project. The router's job is to facilitate end-to-end connectivity using routes and sometimes the NAT via floating IPs.
The commands necessary to attach a network to a router may vary based on network and need:
Attaching a router to an external network:
openstack router set --external-gateway <network> <router>
Attaching a router to a tenant network using subnet ID or name:
openstack router add subnet <router> <subnet>
Attaching a router to a tenant network using a specific port ID or name:
openstack router add port <router> <port>
Getting ready
When attaching a router to a network, the following information...