{"id":7457,"date":"2021-08-16T22:36:37","date_gmt":"2021-08-16T20:36:37","guid":{"rendered":"https:\/\/tekmart.co.za\/t-blog\/?p=7457"},"modified":"2021-08-28T15:54:53","modified_gmt":"2021-08-28T13:54:53","slug":"how-to-connect-vmware-workstation-vms-to-the-internet","status":"publish","type":"post","link":"https:\/\/tekmart.co.za\/t-blog\/how-to-connect-vmware-workstation-vms-to-the-internet\/","title":{"rendered":"How to connect VMware Workstation VMs to the Internet"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time-approximately:<\/span> <span class=\"rt-time\"> 5<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Learn how to configure VMware Workstation virtual networks, including connecting guest virtual machines to the Internet, use the Virtual Network Editor and more.<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/rms\/dataCenter-Virtualization\/headshot-daviddavis.png\" alt=\"David Davis\"\/><\/figure>\n\n\n\n<p>By <a href=\"https:\/\/www.techtarget.com\/contributor\/David-Davis\">David Davis<\/a><\/p>\n\n\n\n<p>VMware Workstation offers many possibilities for how to connect to the internet in VMware and configure virtual networking &#8212; you can bridge VMs to the Internet, connect VMs to the Internet via NAT, create private connections or use a host-only virtual network. Each method has its own particular use, which depends largely on your security configuration.<\/p>\n\n\n\n<p>VMware Workstation makes the ideal desktop application for a self-contained lab testing environment on your desktop or laptop. With Workstation, you can create multiple private networks, connect VMs to a host, bridge networks to a LAN and use Network Address Translation protocol (NAT) to connect those networks to a LAN.<\/p>\n\n\n\n<p>The&nbsp;configurability of VMware Workstation&#8217;s virtual networks&nbsp;makes Workstation powerful. But this same virtual networking flexibility can also make Workstation a challenge to configure. Although creating a new VM in Workstation is simple, configuring the virtual network poses issues. To ease such virtual network configuration burdens, you can&nbsp;give your VM guests&nbsp;Internet access.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Virtual Network Editor<\/strong><\/h3>\n\n\n\n<p>One of the features that makes&nbsp;Workstation&#8217;s virtual networking&nbsp;so configurable &#8212; and complex &#8212; is the Virtual Network Editor. This tool enables you to configure each of the different types of the Workstation networking options and work with the Dynamic Host Configuration Protocol (DHCP) and NAT Workstation services.<\/p>\n\n\n\n<p>You can use the tool to create various lab scenarios and modify many network settings. Virtual Network Editor enables you to add and remove virtual networks and create custom virtual networking configurations as well as apply networking changes across an entire infrastructure. You can also use Virtual Network Editor to restore a network to its default settings in the event of an emergency.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"What is a Virtual Machine (VM)? Benefits of a Virtual Machine\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/Xvw2MIjSA9g?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Connect VMs to the Internet with bridging<\/strong><\/h3>\n\n\n\n<p>The task of connecting a guest VM to the Internet varies based on your network and Internet configuration. Assuming your LAN offers a DHCP server with default gateway and DNS, you have no MAC restrictions and your firewall allows any computer from the LAN to connect to the Internet, you shouldn&#8217;t have to change any virtual machine settings to use&nbsp;bridged networking, or VMnet0.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>If a VM host has one elastic IP address &#8212; for example, 10.0.0.100 &#8212; and each VM guest has its own IP address &#8212; 10.0.0.101, 102, and 103, respectively &#8212; that each receives from the DHCP server, then each VM guest acts as its own IP node on the network. This system makes each VM guest identifiable. You can connect to each using Remote Desktop Protocol, or connect to the Web interface using a VM guest.<\/p><\/blockquote>\n\n\n\n<p>However, if your physical network has IP restrictions, then you must separately configure each guest on the network. For example, if your firewall allows only specific devices to communicate with the Internet, each VM guest would require its own authorization on the firewall because it has its own IP address.<\/p>\n\n\n\n<p>Windows networking restrictions can also present a challenge when determining how to connect to the Internet in VMware. Perhaps your Cisco switch device has MAC address restrictions. In this case, each of these&nbsp;VM guests has its own MAC address. The VM host&#8217;s Ethernet port might lock down on the Cisco switch due to too many MAC addresses requesting network access. In this scenario, bringing up even one VM guest with bridging will get your host window or server disconnected from the network for violation of port security.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/digitalguide\/images\/Misc\/cvwg_1.jpg\" alt=\" VM bridging diagram\"><br><em><strong>Bridging VMs to the LAN in order to connect to the Internet<\/strong><\/em><\/p>\n\n\n\n<p>To map a VM guest to a particular virtual network with bridging, configure the virtual network interface card (NIC) as bridged.<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/digitalguide\/images\/Misc\/cvwg_2.jpg\" alt=\"Bridged\"><br><em><strong>To connect a Workstation guest VM to the Internet via bridging, select the &#8220;Bridged&#8221; setting in the Virtual Network Edito<\/strong>r<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Connect VMs to the Internet with NAT<\/strong><\/h3>\n\n\n\n<p>As an alternative to bridging, you can use NAT or VMnet8 to connect VMware to the Internet. With a NAT setup, all VM guests use the same host IP address. In other words, when the VM guest communicates with the LAN, the LAN actually sees the VM host making the request.<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/digitalguide\/images\/Misc\/cvwg_3.jpg\" alt=\"VM NATing diagram\"><br><em><strong>Connecting Workstation guest VMs to the Internet via NAT<\/strong><\/em><\/p>\n\n\n\n<p>Every VM needs its own IP address. In the case of NAT, VMware Workstation actually has its own internal DHCP server that hands out internal and private IP addresses to any VM guest on the NAT network.<\/p>\n\n\n\n<p>If you navigate to the&nbsp;<strong>NAT<\/strong>&nbsp;tab in the VMware Workstation Virtual Network Editor, you can see the NAT Service. It must be running to translate the special Workstation NAT network &#8212; 192.168.220.0 to 192.168.220.254 &#8212; to the IP address of the VM host. VMs connected to the network via NAT default to the compute gateway 192.168.220.2.<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/digitalguide\/images\/Misc\/cvwg_4.jpg\" alt=\"Default gateway for NATed VMs\"><br><em><strong>The default gateway for NATed guest VMs is 192.168.220.2, which you can find under the &#8220;NAT&#8221; tab in Virtual Network Editor<\/strong><\/em><\/p>\n\n\n\n<p>Still, the NAT service doesn&#8217;t hand out IP addresses; the VMware Workstation DHCP Service does. If you look at the&nbsp;<strong>DHCP<\/strong>&nbsp;tab, you can see the DHCP range for VMnet8.<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/digitalguide\/images\/Misc\/cvwg_5.jpg\" alt=\"DHCP tab in Virtual Network Editor\"><br><em><strong>Under the DHCP tab in Virtual Network Editor, you can find the range for VMnet8<\/strong><\/em><\/p>\n\n\n\n<p>With NAT, each VM has its own IP address provided by the VMware Workstation DHCP service. Virtual Network Editor &#8220;NATs&#8221; that IP to the IP of the VM host in order to access the LAN and the Internet.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Test machines with IP address conflicts, malware or duplicate names<\/strong><\/h3>\n\n\n\n<p>If you have VMs that have IP address conflicts, malware or DNS names that conflict with production server DNS names, you want these servers to run in a&nbsp;secure and private network&nbsp;to prevent possible risk to your production network. VMware Workstation has, by default, a private virtual network called VMnet7, which you can use in these cases.<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/digitalguide\/images\/Misc\/cvwg_6.jpg\" alt=\"Workstation's default private virtual network, VMnet7\"><br><em><strong>You can find VMware Workstation&#8217;s default private virtual network, VMnet7, under the Summary tab in Virtual Network Editor<\/strong><\/em><\/p>\n\n\n\n<p>Keep in mind you must configure a static IP address on the VM guest in the private network since, by default, that subnet has no DHCP server. If you do want DHCP, you can configure Workstation to provide IP addresses with the Workstation DHCP service, or you could run a Windows DHCP server as a VM in the private subnet.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Test a safe VM that requires access to the host<\/strong><\/h3>\n\n\n\n<p>If you have a VM guest that you don&#8217;t want on the local LAN but you must share files and access that VM over a virtual network, you can use the&nbsp;host-only virtual network, VMnet1. While host-only networking isn&#8217;t as secure as the private network option, the VM host and the VM guests on the host-only virtual network can&nbsp;communicate via TCP\/IP networking.<\/p>\n\n\n\n<p>VMware Workstation provides DHCP services to this private network using the default IP address range of 192.168.234.0 through 192.168.234.254.<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/digitalguide\/images\/Misc\/cvwg_7.jpg\" alt=\"Custom setting in Virtual Network Editor, VMnet7 selected\"><br><em><strong>Workstation uses a default IP address range from its private network, VMnet7, to provide DHCP services &#8212; which you can select in the Virtual Network Editor under the &#8220;Custom&#8221; network setting.<\/strong><\/em><\/p>\n\n\n\n<p>To configure a VM guest to use this private network, connect it to the Host-only virtual network.<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/digitalguide\/images\/Misc\/cvwg_8.jpg\" alt=\"VMnet1 selected under the DHCP tab of Virtual Network Editor\"><br><em><strong>Configure your guest VM to use a private network by connecting to the Host-only virtual network, VMnet1<\/strong><\/em><\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/cdn.ttgtmedia.com\/digitalguide\/images\/Misc\/cvwg_9.jpg\" alt=\"VMnet1 seen under the Summary tab of Virtual Network Editor\"><br><em><strong>VMnet1 is a host-only virtual network &#8212; a private network shared only between hosts<\/strong><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time-approximately:<\/span> <span class=\"rt-time\"> 5<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>Learn how to configure VMware Workstation virtual networks, including connecting guest virtual machines to the Internet, use the Virtual Network Editor and more. By David Davis VMware Workstation offers many possibilities for how to connect to the internet in VMware and configure virtual networking &#8212; you can bridge VMs to the Internet, connect VMs to the Internet via NAT, create<\/p>\n<p><a class=\"more-link\" href=\"https:\/\/tekmart.co.za\/t-blog\/how-to-connect-vmware-workstation-vms-to-the-internet\/\">Read More<\/a><\/p>\n","protected":false},"author":113,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,35,8,4,30,16,3,28,95],"tags":[],"class_list":["post-7457","post","type-post","status-publish","format-standard","hentry","category-best-practices-for-data-center-operations","category-data-center-facilities","category-data-center-hardware","category-datacenter-news","category-expert-advise-and-opinion","category-how-tos-and-other-useful-tips-and-tricks","category-industry-news-and-expert-advise","category-partner-content","category-timeless-tips"],"_links":{"self":[{"href":"https:\/\/tekmart.co.za\/t-blog\/wp-json\/wp\/v2\/posts\/7457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tekmart.co.za\/t-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tekmart.co.za\/t-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tekmart.co.za\/t-blog\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/tekmart.co.za\/t-blog\/wp-json\/wp\/v2\/comments?post=7457"}],"version-history":[{"count":3,"href":"https:\/\/tekmart.co.za\/t-blog\/wp-json\/wp\/v2\/posts\/7457\/revisions"}],"predecessor-version":[{"id":7532,"href":"https:\/\/tekmart.co.za\/t-blog\/wp-json\/wp\/v2\/posts\/7457\/revisions\/7532"}],"wp:attachment":[{"href":"https:\/\/tekmart.co.za\/t-blog\/wp-json\/wp\/v2\/media?parent=7457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tekmart.co.za\/t-blog\/wp-json\/wp\/v2\/categories?post=7457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tekmart.co.za\/t-blog\/wp-json\/wp\/v2\/tags?post=7457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}