Score:0

How to create two different networks on Hyper-v

ve flag

I currently have 2 physicals hosts with windows server 2012 R2 datacenter on each of them. I have a 10.69.11.0/24 network with several VM's: 2 DC 2 File servers.

I want to test a course that I have bought, and use another network 192.168.1.0/24 for that lab. So I have created a new VM to start, and connected it to the same virtual switch than the other network. I got a DHCP address of the first network and changed it with the new one I want. As soon as I have setup the IP configuration, I lose the Internet. I have tried to use the DNS of my ISP, but it's not working at all. What can I do to have those separate networks and still get the internet. Thank you

Score:0
ve flag

I finally used pfsense to create the router for my Lab with 2 interfaces (Wan and Lan), and all lab machines connected to the Lan virtual switch. It works perfect.

Score:0
cv flag

You can use any ip addressing scheme you'd like between any two computers on your network (physical or virtual) but if your routing infrastructure isn't configured for that network then you won't have internet access.

What can you do to have those separate networks and still get the internet? Configure your routing infrastructure to support the additional network.

djdomi avatar
za flag
To have 2 Separate networks, which are being Isolated and you can test your DHCP and DNS without an impact on your Main Network, you have to add a switch on Hyper-V with Type Internal - and also add this, as a second Network Card to your first Server, which has both networks - this has to be Configured as joe already stated correctly as a router for your new, separate network - The other Servers are being also added to the Internal switch, without the main network
Alain avatar
ve flag
@djdomi: I have done it. My router seems to work, I get traffic on the external and internal. (I can ping the router from the test server). But I can't go on internet from that server.
djdomi avatar
za flag
you can verfiy that situation with ping (by the Way this is MCSA Basics!) ping a server, ping the server-router ping your home router and at last, ping a public ip i.e. 1.1.1.1 or 8.8.8.8 or even similar (Remind, on the router might be needed to use NAT to get internet, you can maybe for example take a look [here](https://techgenix.com/nat-network-hyper-v-vms/)
djdomi avatar
za flag
ehm, forgot about, it seems that the origianl author messed up with external and internal, please use InternalIPInterfaceAddressPrefix and NOT ExternalIPInterfaceAddressPrefix as shown in the pictures at the above reference - meaning ` New-NetNat -Name MyServerNat -InternalIPInterfaceAddressPrefix 10.0.0.0/24 ` should be correct :)
Alain avatar
ve flag
actually, I forgot to update, but I had fixed the issue, I simply mistyped a number in my gateway. So right now, my config is as followed: 1. Router server with external and internal NIC and NAT activated. 2. AD server connected to internal NIC AD server can go on the internet and access the internal network, and access the router server. My issue is that it can access the main network as well and I don't want that.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.