Let's put the theory that we have learned so far into practice.
I have recreated the titan network and its two instances.
At this point, the instances can't be reached from outside,
since their network is not connected to the outside.
For this reason, I will now create a router.
Let me first check if there are any routers, no the list is empty.
Creating a router is very easy. That looks good.
What does it look like in the topology? The router should appear in a
moment, and here it is. Back to the commandline, let me now connect
the router to the titan network. In fact, I cannot connect a router
to a network, I have to connect it to a subnet.
What does this mean for our ports? We now have four ports.
The first one is the port for instance titan2.
The second port was just created implicitly, because I connected the
router to the titan subnet. The third port is the DHCP port,
and the last one obviously for instance titan1.
The details of the router port, here they are, and you can see in this
case the device_owner is a router_interface, which makes sense, I think.
We also have to connect the router to the public network.
The OpenStack client can't set a gateway in Newton, instead I will use
the Neutron client. In newer releases of OpenStack,
the OpenStack client can be used for setting the router gateway.
That looks good, a quick look at the topology, we now have a connection.
I'm interested in the ports again, and this time there doesn't seem to
be a new port. That's actually incorrect, there is a new port,
but we can't see it, because it belongs to the public network,
which belongs to the administrator. So I will very briefly become the
administrator again to check on the ports.
I can list ports that belong to a router, and here you are, we have two ports.
The first one has an IP address that comes from the floating IP range.
It belongs to the public network. What are its details?
Here you are. What I wanted to show you is that the device owner here
is of type router gateway. I will become titan again, and delete that router.
That fails, and again we have this error message, which is not very useful.
The problem here is that we still have an interface set, so I'm going
to remove it. Can we delete the router now?
Yes, we can. We don't have to remove the gateway explicitly,
that is done automatically. Back to the presentation.