EMAIL SUPPORT

dclessons@dclessons.com

LOCATION

NZ

Routing on OpenStack

Routing on OpenStack

Posted on Jan 13, 2020 (0)

Configure Routing on OpenStack

Task:

  • Enable Neutron Routing services on OpenStack
  • Create a Router and add two Network dclessons-Network1 with subnet 30.30.30.0/24 and dclessons-Network2 with network 40.40.40.0/24
  • Enable two VM dclessons-VM2 on dclessons-Network1 and second VM dclessons-VM1 on dclessons-Network2.
  • Configure network so that dclessons-VM1 can access to internet
  • Configure Floating IP address so that user can access dclessons-VM1 from internet or external network.

Solution:

Now we will configure the neutron so that Routing can be configured and enabled on OpenStack. Open the following file after taking SSH and do the following setting as we have done in past.

[DEFAULT]
...
service_plugins = router
!
[root@localhost ~(keystone_admin)]# sudo nano /etc/neutron/l3_agent.ini
[DEFAULT]
...
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
!
[DEFAULT]
...
external_network_bridge = br-ex

Now lets create the Router name dclessons-Router1 from CLI by following command:

[root@localhost ~(keystone_admin)]# neutron router-create dclessons-Router1

Now once router is created, it has to be associated with two subnet which was created earlier naming dclessons-Network1 and dclessons-Network2
Go to Projects | Network | Router and select your router which is created and click on it and then click on interface and then click on add interface, Follow as per below figure:

You can verify this also from network topology:

Now Launch VM on each network use following command to launch the VM  as you have to create the port and then associate the port to Instance , we have done this in previous labs.

neutron port-create --name dclessons-port1 dclessons-Network1
nova boot --flavor m1.tiny --image cirros --nic port-id=2ebae7aa-3f7c-42aa-90d1-cad74dd10848 dclessons-vm1

You can verify this via following fig

And initiate the ICMP from VM1 (30.30.30.10) to VM2 (40.40.40.7) you will see that ICMP is successfully and we can say that Routing has been properly working.

Now let’s configure our network so that dclessons-VM1 can access to internet. So before doing that you should configure External Network so that it can access to internet.

Go to Projects | Network | Router and select the router which you have created in this LAB, and after clicking on it click on set gateway option and select the external network.

Now you can ping to default gateway of your Internet Router, here in our case my Internet Router is 192.168.1.19, but we cannot reach to internet as we have taken external network from Public IP range.


Comment

    You are will be the first.

LEAVE A COMMENT

Please login here to comment.