Ubuntu 20.04, Hyper-V problem with network connection with private switch type

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 hereeth1 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

1 Answer

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like