Announcement

Collapse
No announcement yet.

Creating a Virtual Network

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating a Virtual Network

    I have vmware workstation installed and i'd like to create a VM network of which I will use for studying etc..

    Now Id like the VM network to have an IP range of 10.0.0.x

    My current home network is 192.168.0.x with the router being 254 and handling DHCP

    Now I dont want to change anything on my current network, but I would like the VM network to be able to access the internet, but still have a 2003 dhcp server with in this network

    Could someone please tell me the right way to do this as everytime I have tried to do this, I end up stopping windows networking on my laptop from working

    Thanks

  • #2
    Re: Creating a Virtual Network

    In Workstation you have the option defining the settings of the Virtual network configuration.

    Under ... Edit -> Virtual Network Settings

    Now in order for this to work you will need to use the NAT feature of VMware which allows you to use and "internal" network for your VM's but allow them to access the external network that you host is connected (in your case the internet).

    So at when the window above opens up you go to the NAT tab, -> click edit and set your IP settings to what you would like. (assuming you are using a windows version of workstation - if not then there is a separate "application" for network configuration in the Linux version)

    You can allow Workstation to act as your DHCP for the internal network, or you can work with static addresses (which should be pretty simple if you are not going to work with too many machines). Just make sure you get the IP settings of your guest machines right so that they can access the external network.
    Maish
    ----------------------------------------------------------
    Technodrone|@maishsk|Author of VMware vSphere Design
    VMware vExpert 2013-2010,VCAP5-DCA/DCD,VCP
    MSCA 2000/2003, MCSE 2000/2003
    A proud husband and father of 3 girls
    ----------------------------------------------------------
    If you find the information useful please don't forget to give reputation points sigpic.

    Have a good one!!

    Comment


    • #3
      Re: Creating a Virtual Network

      You need to subscribe to and follow this thread which was started yesterday: http://forums.petri.com/showthread.php?t=26139

      Most, if not all, of the information in there will apply to what you are trying to do.
      VCDX3 #34, VCDX4, VCDX5, VCAP4-DCA #14, VCAP4-DCD #35, VCAP5-DCD, VCPx4, vEXPERTx4, MCSEx3, MCSAx2, MCP, CCAx2, A+
      boche.net - VMware Virtualization Evangelist
      My advice has no warranties. Follow at your own risk.

      Comment


      • #4
        Re: Creating a Virtual Network

        Originally posted by Maish View Post
        In Workstation you have the option defining the settings of the Virtual network configuration.

        Under ... Edit -> Virtual Network Settings

        Now in order for this to work you will need to use the NAT feature of VMware which allows you to use and "internal" network for your VM's but allow them to access the external network that you host is connected (in your case the internet).

        So at when the window above opens up you go to the NAT tab, -> click edit and set your IP settings to what you would like. (assuming you are using a windows version of workstation - if not then there is a separate "application" for network configuration in the Linux version)

        You can allow Workstation to act as your DHCP for the internal network, or you can work with static addresses (which should be pretty simple if you are not going to work with too many machines). Just make sure you get the IP settings of your guest machines right so that they can access the external network.
        Using NAT under Workstation is a start and will grant his VMs access to the physical network that his workstation is attached to, but by default it won't provide him with the route to the internet. Additional steps will be needed involving routes unless ICS is enabled on the workstation. ICS may be an easier way to get it up and running since it's basically one checkbox to configure it.

        Jas
        VCDX3 #34, VCDX4, VCDX5, VCAP4-DCA #14, VCAP4-DCD #35, VCAP5-DCD, VCPx4, vEXPERTx4, MCSEx3, MCSAx2, MCP, CCAx2, A+
        boche.net - VMware Virtualization Evangelist
        My advice has no warranties. Follow at your own risk.

        Comment


        • #5
          Re: Creating a Virtual Network

          Thanks for the info, I'd prefer not to use ICS as my Laptop is configured for my the domain at work and being as it's vista and I just got it working nicely....

          Andy

          Comment


          • #6
            Re: Creating a Virtual Network

            This is not the way I understand it..

            How Networking works in VMware



            What this will do is forward all packets from the internal network - out through the host and from there out to the external network. Once on the external network, the traffic is free to go wherever it would like...

            Coming back in... that is a whole different story. For that you will need to configure port forwarding..

            Here is an example
            Bridged Mode - VM is connected "as if" to the external network





            NAT Mode - VM is "Routed" through the host to the external network. and from there to the internet




            As you can see - when the VM is set to NAT there is no problem with host resolution at all.

            There is no need on the host for connection sharing, nor routing either.
            Maish
            ----------------------------------------------------------
            Technodrone|@maishsk|Author of VMware vSphere Design
            VMware vExpert 2013-2010,VCAP5-DCA/DCD,VCP
            MSCA 2000/2003, MCSE 2000/2003
            A proud husband and father of 3 girls
            ----------------------------------------------------------
            If you find the information useful please don't forget to give reputation points sigpic.

            Have a good one!!

            Comment


            • #7
              Re: Creating a Virtual Network

              ok, what am i missing here?

              I've set my VM to NAT, configured it to use 10.0.0.254 as the gateway and the subnet to 255.0.0.0 but it changes the adapter in windows to 10.0.0.1 which is the IP I want to allocate to the server in the VM

              Is this possible?

              Thanks

              Comment


              • #8
                Re: Creating a Virtual Network

                Originally posted by madman045 View Post
                ok, what am i missing here?

                I've set my VM to NAT, configured it to use 10.0.0.254 as the gateway and the subnet to 255.0.0.0 but it changes the adapter in windows to 10.0.0.1 which is the IP I want to allocate to the server in the VM

                Is this possible?

                Thanks
                MAISH, I stand corrected. I did not think VMware NAT would perform the necessary routing out to the host's default gateway (to the internet). After testing tonight with a Win98 VM, it does work. As you might be able to tell, I rarely use VMware NAT and have grown foggy on its capabilities.

                Madman,

                The way you previously described your network, it sounded like you were using a standard subnet mask of 255.255.255.0. Now you are saying you are using a subnet mask of 255.0.0.0. It doesn't matter which you are using as long as it is consistently applied throughout your network (including your VMware workstation virtual adapters for VMnet1 and VMnet8 host only and NAT networking respectively).

                The Host only and NAT VMNets each run a DHCP server with a configurable scope. You can change the start and end IP address for the DHCP scope by editing the virtual network settings on your host. See attached screenshots.
                Attached Files
                VCDX3 #34, VCDX4, VCDX5, VCAP4-DCA #14, VCAP4-DCD #35, VCAP5-DCD, VCPx4, vEXPERTx4, MCSEx3, MCSAx2, MCP, CCAx2, A+
                boche.net - VMware Virtualization Evangelist
                My advice has no warranties. Follow at your own risk.

                Comment


                • #9
                  Re: Creating a Virtual Network

                  Hi Jason,

                  Wouldnt the vmware DHCP interfere with the 2003 DHCP?

                  As I want to create a domain controller with all the right bits as im currently doing the 70-290 route.

                  Thanks

                  Andy

                  Comment


                  • #10
                    Re: Creating a Virtual Network

                    It could. but if this is for testing purposes for the 70-290 Exam. I gather you will not be putting up more than 2-3 machines so go with static IP's
                    Maish
                    ----------------------------------------------------------
                    Technodrone|@maishsk|Author of VMware vSphere Design
                    VMware vExpert 2013-2010,VCAP5-DCA/DCD,VCP
                    MSCA 2000/2003, MCSE 2000/2003
                    A proud husband and father of 3 girls
                    ----------------------------------------------------------
                    If you find the information useful please don't forget to give reputation points sigpic.

                    Have a good one!!

                    Comment


                    • #11
                      Re: Creating a Virtual Network

                      Originally posted by madman045 View Post
                      Hi Jason,

                      Wouldnt the vmware DHCP interfere with the 2003 DHCP?

                      As I want to create a domain controller with all the right bits as im currently doing the 70-290 route.

                      Thanks

                      Andy
                      Yes they will interfere with each other and DHCP leasing on the subnet will be unpredictable at best.

                      I wasn't aware that you were using Windows 2003 DHCP yet. The way you worded your question/problem, it sounded like your DHCP scope lease range needed help and you were unable to figure that out so naturally I assumed it was on the VMware side were you were less familiar with the moving parts. If you have disabled VMware's DHCP mechanism and you are using Windows 2003 DHCP, then open up the DHCP console and revise the scope you created for the subnet. You can either remove the .1 address out of the scope range or simply add .1 as an exclusion. Using either method, .1 will no longer be assigned by DHCP going forward.

                      Good luck in advance with 70-290.

                      Jas
                      VCDX3 #34, VCDX4, VCDX5, VCAP4-DCA #14, VCAP4-DCD #35, VCAP5-DCD, VCPx4, vEXPERTx4, MCSEx3, MCSAx2, MCP, CCAx2, A+
                      boche.net - VMware Virtualization Evangelist
                      My advice has no warranties. Follow at your own risk.

                      Comment


                      • #12
                        Re: Creating a Virtual Network

                        I cant believe im really struggling with this, but I am

                        Ok, here is how it currently is

                        Laptop - Vista Business X64, IP assigned by DHCP on whatever lan I am connected to

                        Current gateway is 192.168.33.254, DNS is 192.168.33.1

                        I would like my virtual machines to run on their own network, the 2003 domain controller VM will provide DHCP to the VM clients (XP/Vista) and any additional servers will be static IPs

                        Now playing with the NAT side of vmware, I have removed DHCP from the adapter and set the network range to 10.0.0.0 and 255.0.0.0, now the adapter in windows has an IP of 10.0.0.1 and a subnet of 255.0.0.0 and now other details filled in

                        Now what do I need to do to vmware and what gateway do I allocate to the 2003 domain controller VM so that they can have access to the internet?

                        And if possible, use 10.0.0.1 for the 2003 DC and give the network adapter another IP

                        Basically where ever I go, I just want to change the gateway to whatever my current location is so that I can use them

                        Thanks

                        Andy

                        Comment


                        • #13
                          Re: Creating a Virtual Network

                          Originally posted by madman045 View Post
                          Now playing with the NAT side of vmware, I have removed DHCP from the adapter and set the network range to 10.0.0.0 and 255.0.0.0, now the adapter in windows has an IP of 10.0.0.1 and a subnet of 255.0.0.0 and now other details filled in
                          Which adapter has that IP?

                          Originally posted by madman045 View Post
                          Now what do I need to do to vmware and what gateway do I allocate to the 2003 domain controller VM so that they can have access to the internet?

                          And if possible, use 10.0.0.1 for the 2003 DC and give the network adapter another IP
                          In VMware, set your windows 2003 DC VM to use NAT. You cannot allocate the IP address of 10.0.0.1 because it is already in use (as you just said). so choose another. Find your IP of your gateway for the NAT device like below..



                          Once you have that set you DC VM's IP to something else than 10.0.0.1 255.0.0.0 and the address of your Gateway

                          Originally posted by madman045 View Post
                          Basically where ever I go, I just want to change the gateway to whatever my current location is so that I can use them
                          You do not have to change the gateway. With your VM it will always stay the same.

                          That is the beauty of NAT. All the VM needs to do is get to the DG and if your laptop is connected to a network (wireless or wired - no difference) you should be able to get out from your DC to the internet.
                          Maish
                          ----------------------------------------------------------
                          Technodrone|@maishsk|Author of VMware vSphere Design
                          VMware vExpert 2013-2010,VCAP5-DCA/DCD,VCP
                          MSCA 2000/2003, MCSE 2000/2003
                          A proud husband and father of 3 girls
                          ----------------------------------------------------------
                          If you find the information useful please don't forget to give reputation points sigpic.

                          Have a good one!!

                          Comment


                          • #14
                            Re: Creating a Virtual Network

                            Hi Maish

                            I have tried what you have suggested and the VM is still unable to access the internet

                            The VMNET8 adapter in Windows has just the IP of 10.0.0.1 and 255.0.0.0 and no other details

                            NAT is set to 10.0.0.254 as the gateway and the VM is 10.0.0.2 and using 10.0.0.254 and the GW and it still cannot access the internet. is there something else I need to do?

                            Thanks

                            Andy

                            Comment


                            • #15
                              Re: Creating a Virtual Network

                              problem was solved offline...
                              Maish
                              ----------------------------------------------------------
                              Technodrone|@maishsk|Author of VMware vSphere Design
                              VMware vExpert 2013-2010,VCAP5-DCA/DCD,VCP
                              MSCA 2000/2003, MCSE 2000/2003
                              A proud husband and father of 3 girls
                              ----------------------------------------------------------
                              If you find the information useful please don't forget to give reputation points sigpic.

                              Have a good one!!

                              Comment

                              Working...
                              X