Confused by logical networks

I'm not sure how the logical networks should work and would appreciate if someone could shed some light into the matter, I've tried reading the documentation¹ but have not become any wiser :-/ For the sake of argument, I have two hosts in the same cluster/DC, They both have 2 network devices each (let's call them eth0 and eth1). On both hosts the ovirtmgmgt is connected to eth0 and uses the 10.0.0.0/8-network. Host 1 is 10.0.0.1 and host 2 is 10.0.0.2. All four network devices are connected to one switch. Then I create a logical network, mylogic which should be 192.168.1.0/24, which I assign to eth1 on each host, but define only for host 1 an ip-address, 192.168.1.1, host 2 has also the network assigned to eth1, but withouth an ip address. Next I create vm1 on host 1, give it a single virtual network connection to mylogic, and configure the guest to use 192.168.1.2 with gw 192.168.1.1. Obviously I can from the guest ping 192.168.1.1 which is the host address on the logical network as the guest is running on the same hardware where the host ip address is defined. However, and this is where my confusion lies, if I now create another vm, vm2, on host 2, attach its network device to the mylogic network and configure it to use 192.168.1.3 with gw 192.168.1.1, I can not ping neither 192.168.1.1 nor 192.168.1.2. My understanding is that vm2 should be able to ping the wm1 as well as the gateway address defined on host 1. However this does not seem to be the case. What have I missed here? TIA, Poltsi ¹ https://www.ovirt.org/documentation/admin-guide/chap-Logical_Networks/

I had similar confusion, and trying to assign static IPs was just not working for me. Here is how I got it to work: #1 you absolutely require a DNS server you can add entries to. I tried to go without, and it just does not work. For me, management network is on vlan 10, so each host grabs a 172.16.10.xx address. The oVirt engine (self hosted) also grabs an address in this subnet. I look in the DHCP leases and turn those into static assignments in the router, but left the config on the hosts to DHCP. Add those IPs to your DNS so that you can reach each host, and the engine, at hostname.domain.net (or whatever your fully qualified domain name is for each) Now, set your VM network to DHCP on a different, specific VLAN. Set that vlan up in your router with a small DHCP pool, only big enough for the VMs you want to run. Make sure you allow that vlan through to the switchports connected to the nic you are using for your VMs. For me, the VMs are on vlan 30, so the subnet is 172.16.30.xx. Each VM boots up, makes a DHCP request on vlan 30, and is assigned an address. Then again go into your router and make this a static entry, leaving the config in the VM to DHCP. Once you install the agent in the VM, the IP will show up in the engine GUI. Then you can assign an FQDN to each vm's IP I'm your DNS server. Set up this way, I can migrate the VM to whichever host, and still access it over RDP by it's FQDN. I also have dual NICs but I set mine up as a team (bridge) instead of one for MGMT and one for VMs. That way, I can also unplug anyone Ethernet cable from any machine, and nothing happens, both the MGMT and VM network keep ticking away happily. I have each NIC plugged into a separate switch chassis, to gain redundancy on the switches. Hope some part of this helps you! On Feb 22, 2018 7:25 AM, "Paul-Erik Törrönen" <poltsi@poltsi.fi> wrote:
I'm not sure how the logical networks should work and would appreciate if someone could shed some light into the matter, I've tried reading the documentation¹ but have not become any wiser :-/
For the sake of argument, I have two hosts in the same cluster/DC, They both have 2 network devices each (let's call them eth0 and eth1). On both hosts the ovirtmgmgt is connected to eth0 and uses the 10.0.0.0/8-network. Host 1 is 10.0.0.1 and host 2 is 10.0.0.2. All four network devices are connected to one switch.
Then I create a logical network, mylogic which should be 192.168.1.0/24, which I assign to eth1 on each host, but define only for host 1 an ip-address, 192.168.1.1, host 2 has also the network assigned to eth1, but withouth an ip address.
Next I create vm1 on host 1, give it a single virtual network connection to mylogic, and configure the guest to use 192.168.1.2 with gw 192.168.1.1. Obviously I can from the guest ping 192.168.1.1 which is the host address on the logical network as the guest is running on the same hardware where the host ip address is defined.
However, and this is where my confusion lies, if I now create another vm, vm2, on host 2, attach its network device to the mylogic network and configure it to use 192.168.1.3 with gw 192.168.1.1, I can not ping neither 192.168.1.1 nor 192.168.1.2.
My understanding is that vm2 should be able to ping the wm1 as well as the gateway address defined on host 1. However this does not seem to be the case.
What have I missed here?
TIA,
Poltsi
¹ https://www.ovirt.org/documentation/admin-guide/chap-Logical_Networks/ _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

On 2018-02-22 22:56, Vincent Royer wrote:
Hope some part of this helps you!
Thanks for your answer, I need to digest it more in detail, but it seems like I indeed have missed some essential parts. I'll come back with a more detailed result later, but for the record, I do have a DNS server that I can manage completely in this case, and the switch management is also accessible to me. Poltsi

should work out for you then. In my case I was trying to do it all just with static addressing without dns entries and I quickly learned that it's just not designed to operate that way. Cheers *Vincent Royer* *778-825-1057* <http://www.epicenergy.ca/> *SUSTAINABLE MOBILE ENERGY SOLUTIONS* On Thu, Feb 22, 2018 at 9:16 PM, Paul-Erik Törrönen <poltsi@poltsi.fi> wrote:
On 2018-02-22 22:56, Vincent Royer wrote:
Hope some part of this helps you!
Thanks for your answer, I need to digest it more in detail, but it seems like I indeed have missed some essential parts.
I'll come back with a more detailed result later, but for the record, I do have a DNS server that I can manage completely in this case, and the switch management is also accessible to me.
Poltsi
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

On Feb 22, 2018 5:26 PM, "Paul-Erik Törrönen" <poltsi@poltsi.fi> wrote: I'm not sure how the logical networks should work and would appreciate if someone could shed some light into the matter, I've tried reading the documentation¹ but have not become any wiser :-/ For the sake of argument, I have two hosts in the same cluster/DC, They both have 2 network devices each (let's call them eth0 and eth1). On both hosts the ovirtmgmgt is connected to eth0 and uses the 10.0.0.0/8-network. Host 1 is 10.0.0.1 and host 2 is 10.0.0.2. All four network devices are connected to one switch. Then I create a logical network, mylogic which should be 192.168.1.0/24, which I assign to eth1 on each host, but define only for host 1 an ip-address, 192.168.1.1, host 2 has also the network assigned to eth1, but withouth an ip address. There's no reason really to assign IPs to hosts on the logical network. oVirt provides layer 2 (L2) connectivity to VMs. Whatever DHCP, DNS or gateway is on that network, they'll use. It should not be one of the hosts. Their interfaces just bridge the VM traffic over to the designated network, nothing more. Y. Next I create vm1 on host 1, give it a single virtual network connection to mylogic, and configure the guest to use 192.168.1.2 with gw 192.168.1.1. Obviously I can from the guest ping 192.168.1.1 which is the host address on the logical network as the guest is running on the same hardware where the host ip address is defined. However, and this is where my confusion lies, if I now create another vm, vm2, on host 2, attach its network device to the mylogic network and configure it to use 192.168.1.3 with gw 192.168.1.1, I can not ping neither 192.168.1.1 nor 192.168.1.2. My understanding is that vm2 should be able to ping the wm1 as well as the gateway address defined on host 1. However this does not seem to be the case. What have I missed here? TIA, Poltsi ¹ https://www.ovirt.org/documentation/admin-guide/chap-Logical_Networks/ _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

On 2018-02-23 08:41, Yaniv Kaul wrote:
There's no reason really to assign IPs to hosts on the logical network.
Ah yes, you're correct. I was using the physical host as a GW so that the VMs on the logical network would have an access point to outside (like the CentOS repositories). Anyways, I found the cause of my confusion in the end. The switch was not properly set up (*ahemm* forgot to save configuration). 3 thumbs up for oVirt showing the LLDP-info of the switch :-) And the fact that despite having to reinstall essentially everything oVirt from scratch (due to failed upgrade), the VMs were just a matter if import. Splendid work! Poltsi
participants (3)
-
Paul-Erik Törrönen
-
Vincent Royer
-
Yaniv Kaul