pluralsight/PS-AutoLab-Env

LabNat not working

Closed this issue · 11 comments

Hi.
No matter what I do I can't make this work. Setup is fairly foolproof, and I've followed the guide, but I assume I've done something wrong.
<<<
PS C:\Autolab\Configurations\MultiRole-Server-2016> Get-PSAutoLabSetting

AutoLab : C:\Autolab
PSVersion : 5.1.19041.610
PSEdition : Desktop
OS : Microsoft Windows 10 Pro
FreeSpaceGB : 315,19
MemoryGB : 16
PctFreeMemory : 14,19
Processor : Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
IsElevated : True
RemotingEnabled : True
HyperV : 10.0.19041.561
PSAutolab : 4.18.0
Lability : 0.19.1
Pester : {4.10.1, 3.4.0}
PowerShellGet : 1.0.0.1
PSDesiredStateConfiguration : 1.1

<<<
PS C:\Autolab\Configurations\MultiRole-Server-2016> Get-NetNat

Name : LabNat
ExternalIPInterfaceAddressPrefix :
InternalIPInterfaceAddressPrefix : 192.168.3.0/24
IcmpQueryTimeout : 30
TcpEstablishedConnectionTimeout : 1800
TcpTransientConnectionTimeout : 120
TcpFilteringBehavior : AddressDependentFiltering
UdpFilteringBehavior : AddressDependentFiltering
UdpIdleSessionTimeout : 120
UdpInboundRefresh : False
Store : Local
Active : True

<<<
PS C:\Autolab\Configurations\MultiRole-Server-2016> Get-NetAdapter

Name InterfaceDescription ifIndex Status MacAddress LinkSpeed


vEthernet (Ekstern) Hyper-V Virtual Ethernet Adapter #2 24 Up 34-48-ED-6F-B5-85 1 Gbps
vEthernet (Default Swi... Hyper-V Virtual Ethernet Adapter #3 48 Up 00-15-5D-B9-3E-7E 10 Gbps
vEthernet (vEthernet (... Hyper-V Virtual Ethernet Adapter #5 49 Up 00-15-5D-BE-4F-39 10 Gbps
vEthernet (LabNet) Hyper-V Virtual Ethernet Adapter 44 Up 00-15-5D-00-33-13 10 Gbps
Wi-Fi Intel(R) Wireless-AC 9560 160MHz 12 Disabled 08-D2-3E-00-28-87 0 bps
Bluetooth-nettverkstil... Bluetooth Device (Personal Area Netw... 9 Disconnected 08-D2-3E-00-28-8B 3 Mbps
Kablet Intel(R) Ethernet Connection (6) I21... 8 Up 34-48-ED-6F-B5-85 1 Gbps
Ethernet 2 Cisco AnyConnect Secure Mobility Cli... 7 Up 00-05-9A-3C-7A-00 995 Mbps
vEthernet (vEthernet (... Hyper-V Virtual Ethernet Adapter #4 30 Up 00-15-5D-CB-21-B3 10 Gbps

I'm not sure what you think isn't working. This looks normal. What are you running that is giving you an error message?

I'm not getting access to the internet from my lab environment.

In the lab, what error message do you see when you try to access the Internet? Can you try setting up another lab like Windows10 and see if you get the same result? That way we can eliminate or confirm the configuration as the culprit.

Ping, traceroute and web browsing isn't working. I can ping internally(not between all machines, but I presume that's due to windows firewall).
When I try with the single-machine Windows 10 lab I get the same result.

Hmmm. I can't think of an immediate cause off the top of my head. I'm firing up a test config to see what I can do. Unfortunately, I will be away from my desk most of the day. I assume there's nothing special about your desktop like Group Policy or other restrictions. Do you have firewall or AV software that could be interfering? Just trying to be thorough to see why your setup is different.

Well, when I'm using a virtual switch which is external everythings works just fine.

Also, from what I understand, one should be able to update the lab from the host(update-lab). That's not working either.

I think we need to look at your networking configuration. Your comment about a virtual switch is raising concerns. I have no issues in my environment so let's compare environments and see where we diverge. I am running Windows 10 Pro on a physical computer. The computer is using an Ethernet connection to a 4 port switch which is uplinked to my ISP's modem. I have no Interent access issues from the virtual machines with this setup. This is a setup I expect most people have.

Now, if you are connecting from your desktop to an upstream device that is performing another layer of NAT, I can see where problems might occur.

We might also check your routing table. On your desktop, run this command:

get-netroute -AddressFamily IPv4 -DestinationPrefix 192.168.3.0/24,0.0.0.0/0

The next hop for the 192.168.3.0 network should be 0.0.0.0 and 0.0.0.0 should next hop to your default gateway.

Not being able to ping SOME VM's maybe firewall as you had stated. I have had this issue when the network profiles of the VM's were not all set to Private, or better yet, domain. From one of the non-pingable machines, if you query the DC by name, do you get connection issues? Did you make any DNS zone changes or similar adjustments?

I've run into issues when the net connection profile was public but only when trying to use PowerShell remoting. It shouldn't affect outbound Internet traffic. In the configuration, tghe domain members point to the domain controller for DNS. As far as I know that service is using root hints.

Closing presumed resolved or no longer an issue.