Introduction
Here, We will look at how to setup a network (based on VLAN). Connect VM instances to these networks. Make necessary configurations so that VM's can communicate with each other across different networks. We also try to figure out how the Linux Bridge is setup as we configure the Network and the Virtual Machines.
This would be extended later using an external switch/router in the subsequent blog.
Read this blog to understand about Linux Network Namespaces
Read this blog to understand about Linux Network Namespaces
Create Network.
Created a new network named "application_net" having subnet "103.103.103.0/24" and gateway ip address as "103.103.103.1". VM's created on this network would have ip address allocated from this subnet.
List the Network and Subnet details.
Use neutron commands to see the created and network and subnet-details.
Create two Virtual Machines connected to the Network.
Create two VM's "app_1" and "app_2" connected to this newly created Network "application_net"
Bridge details and Network Topology.
Let's see what all has happened under the hood.
A new bridge(Linux Bridge) is created by the name "brq5cc1629c-7d" and there are tap/veth interfaces that gets attached to the bridge.There is tap interface for that gets attached to the bridge for every VM in the network.(application_net)
A new bridge(Linux Bridge) is created by the name "brq5cc1629c-7d" and there are tap/veth interfaces that gets attached to the bridge.There is tap interface for that gets attached to the bridge for every VM in the network.(application_net)
Communication between two VM's
The two VM's app_1 and app_2 will be able to ping each other, as they are on the same network (application_network)
Ping between VM's in application_net |
Create another network and VMs
Lets create another network "db_net" with VMS "db_1" and "db_2" in that network.
These two VM's would be able to talk to each other. (as they are on the same Linux bridge).
Communication between VM's between the two networks
VM (app_1) in application_network will not be able to ping VM(db_1) in db_network.
In order to achieve such a communication, the two bridges should be connected to a router(Physical/Virtual)
In order to achieve such a communication, the two bridges should be connected to a router(Physical/Virtual)
Thanks for posting this. Very useful information
ReplyDelete