0

I have created Ubuntu 20.04 VM on my Hyper-V. I added there 2 network switches:

  • external for internet connection
  • private for isolated network

The problem is that this VM cannot connect with private network. enter image description here eth1 is a private network and is all the time in Connecting status (aslo notification "activation of network connection failed" is shown) eth0 is normal internet switch

It is a little bit weird that this connection does not work and I cannot create isolated network between Ubuntu and other machines. can you help me with that?

4
  • Ok, 20.04, sorry
    – Developus
    Mar 28, 2022 at 15:09
  • This is often just the fact that it fails to get a DHCP address, could it be that you miss a dhcp server on that private network? If so either set one up or configure these connections with a static IP - then it should complete. You'll see the interesting info with either journalctl -f (globally) or probe connection attributes via nmcl con ... - hope that helps, if not please update the question with what you have found. Mar 29, 2022 at 6:02
  • I added static IP and it works fine now.
    – Developus
    Mar 29, 2022 at 7:14
  • Ok @developus, let me add it as answer then so that is it more discoverable for anyone else. Apr 7, 2022 at 5:31

1 Answer 1

0

In this particular case - after discussion - it turned out that there was no DHCP set up on the secondary network. Therefore the default connection never came up, it had no configuration and waited to find something.

The alternatives here are either:

  1. Configure your guests with static IPs.
  2. Like #1 plus only doing this for one of the guests and then adding and configure a DHCP service on this guest to serve that to the others
  3. Set up a dhcp server on the host that will handle this network, in this cases with libvirt you can easily do so in your network config which will add a dnsmasq service to provide that.
  4. Bridge this additional network to a real device on a network that has a dhcp service
  5. there are more variants for sure ...

Neither of these is right or wrong, it depends on what you want to achieve. @Developus has chosen #1 without setting up an additional internal DHCP server for more machines to fetch from it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .