How to connect the Virtual Machines together

Issues related to configuring your network
myasin0511
Posts: 9
Joined: 2020/04/11 15:43:23

How to connect the Virtual Machines together

Post by myasin0511 » 2020/04/11 15:54:53

Hi

I am new to Centos, installed Centos 7.4 "the full version" and want to have two virtual machines inside it.

The first machine is windows which have two interfaces.
The second virtual machine is firewall which have three interfaces.

Virtual machine 1 (windows) interfaces:
Int-1 connected to firewall VM int-1
Int-2 connected to host server physical interface 2 (for the management access)

Virtual machine 2 (firewall) interfaces:
Int-1 connected to Win VM int-1
Int-2 connected to host server physical interface 2 (for the management access)
Int-3 connected to host server physical interface 1 (for the internet traffic).

How I can connect these two machines together, I tried to use the bridging but the network connection is down.
And if there is a good guide for Centos networming and the difference between the bridge, vlan, team, bond....

Thanks

User avatar
TrevorH
Forum Moderator
Posts: 28514
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to connect the Virtual Machines together

Post by TrevorH » 2020/04/11 16:16:32

Don't use 7.4, it's over 2.5 years old and riddled with security vulnerabilities. Your first step should be to run yum update to get to the current version, 7.7 or yum --enablerepo=cr update to get onto the next version, 7.8.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

myasin0511
Posts: 9
Joined: 2020/04/11 15:43:23

Re: How to connect the Virtual Machines together

Post by myasin0511 » 2020/04/12 06:02:30

Hi

I used the "Yum update" and its updated now.
Could you please help in addressing my issues.

Thanks

User avatar
jlehtone
Posts: 2774
Joined: 2007/12/11 08:17:33
Location: Finland

Re: How to connect the Virtual Machines together

Post by jlehtone » 2020/04/12 08:30:29

myasin0511 wrote:
2020/04/11 15:54:53
I tried to use the bridging but the network connection is down.
We can't see what you did.

The "connect to host server physical interface" can be done in more than one way:
* Passthrough: like the device is directly attached to the guest
* Routed: the host acts as router (and firewall) between guest and outside
* Bridged: the host acts like a network switch between guest and outside. Guest is directly a member in the outside subnet

You describe three subnets:
* Internet
* Management
* Between guests

Should the host be member of any of those?
Should the Firewall be member of the Internet?
Do the subnets provide DHCP for members?

MartinR
Posts: 566
Joined: 2015/05/11 07:53:27
Location: UK

Re: How to connect the Virtual Machines together

Post by MartinR » 2020/04/12 10:07:10

I've pulled these two diagrams back from my notes on virtual networking. They may help to understand what is happening within the machine.
Attachments
virbr-routed.gif
virbr-routed.gif (11.28 KiB) Viewed 201 times
virbr-nat.gif
virbr-nat.gif (13.11 KiB) Viewed 201 times

myasin0511
Posts: 9
Joined: 2020/04/11 15:43:23

Re: How to connect the Virtual Machines together

Post by myasin0511 » 2020/04/12 12:10:38

Hi

I attached a drawing of I want to do.
The host interface-1 will be connected to internet, and the firewall must be member of that interface "will provide it static IP".
The host interface-2 will be connected to management, the firewall and the windows are member of that interface.

I came from Esxi environment, so i cant match what I used to do there with what we have in Centos, as I used to create a virtual switch and assign the guest interfaces to it.

What type of interfaces/configuration I have to do so I can get the guests connected?

If you also can share some guide about the virtual-network-manager interfaces types.

Thanks

User avatar
jlehtone
Posts: 2774
Joined: 2007/12/11 08:17:33
Location: Finland

Re: How to connect the Virtual Machines together

Post by jlehtone » 2020/04/13 09:12:41

myasin0511 wrote:
2020/04/12 12:10:38
I attached a drawing of I want to do.


If you also can share some guide about the virtual-network-manager interfaces types.
Attachments? Can't see.

The default virtualization in CentOS is with libvirt:
https://wiki.libvirt.org/page/Networking

Every "virtual network" that the libvirtd creates is a type Bridge connection on the host. Bridge is a switch. Switch is a bridge.

IF VM is to be bridged to external subnet AND host needs IP to that subnet too, then host should set that bridge connection (with IP) and not leave it for the libvirt to start. First diagram from MartinR shows this. ("virbr-routed" is a misleading name, there is no routing.)

MartinR
Posts: 566
Joined: 2015/05/11 07:53:27
Location: UK

Re: How to connect the Virtual Machines together

Post by MartinR » 2020/04/13 09:27:57

@jlehtone - fair point. "virbr-routed" is historic and part of a much longer document (where it does make sense). I probably should have changed the name when I posted.

myasin0511
Posts: 9
Joined: 2020/04/11 15:43:23

Re: How to connect the Virtual Machines together

Post by myasin0511 » 2020/04/13 10:30:35

Hi

I attached it again "I cant insert images into the discussion text!"
New Microsoft Visio Drawing.gif
I want to configure the interfaces through the GUI "not expert in cli", but don't know what I have to do to achieve my target.
If you can summarize what will be needed, bridge interface, VLAN's,...

Please let me know if the drawing is not there.

Thanks

myasin0511
Posts: 9
Joined: 2020/04/11 15:43:23

Re: How to connect the Virtual Machines together

Post by myasin0511 » 2020/04/14 11:26:22

Hi

I was able to create a bridge connection for the host internet interface, but the created bridge didnt appear in the VM NIC interfaces types, so I assigned it manually as a shared device name "attached", why its not appearing in the list?
interfaces.png
interfaces.png (50.35 KiB) Viewed 140 times
VM NIC 2.png
VM NIC 2.png (51.76 KiB) Viewed 140 times
Now I want to create an internal bridge "not connected to the host physical interfaces", need to use it for the connection between two VM's, what are the steps to create this type of bridge?

Thanks

Post Reply

Return to “CentOS 7 - Networking Support”