13
Apr
08

Virtual Network, no longer virtual!

Working in a virtual environment can be real and crucial sometimes. In addition to the simplicity and consolidation that can be offered by making things virtual, I love the networking part. It’s incredibly easy, a tasty little piece of cake… You don’t need to think about how many NICs you’ll need, or even how many IP addresses you could assign… Simply, it’s awesome!

Network Settings

In a real environment, we struggle to build a stable and effective network as we hopefully expect. Many factors and risks can ruin your project. A lot of legwork is involved plus a huge waste of time and money. Virtualization comes in to solve many issues alike. A sophisticated hosting environment can be built in a very simple and efficient way. It’s doesn’t really matter whether you’re using Xen, OpenVZ, Hyper-V or VMware, Virtual Network is fun with no regrets. Basically, I will demonstrate four different types of network settings which I usually encounter in many real “originally virtual!” scenarios.

  1. Not connected. Yea, exactly as you’ve already thought that the network adapter is disconnected “Cable Unplugged”. I guess that this option has been made to make things appear as real as possible :-)
  2. Local “Host-only”. A virtual switch will be in place to communicate all guest machines within the same network segment. That means that those “guest” machines won’t be able to access any network resources on the host machine.
  3. Local

  4. Shared Networking (NAT - Network Address Translation). A simple NAT engine will manage all traffics between the host and guest machines. You don’t have to define any IP addressing scheme for that. Also, a virtual DHCP server will take care of assinging the IP addresses to all machines. In this case, the VDHCP server assigns 192.168.131.x internal addresses to all guest machines and the virtual gateway address 192.168.131.254. The point here is that this virtual gateway will be also responsible for answering DNS requests and thereby will only be able to answer queries from that virtual network segment. You can manually assign a different DNS to resolve this issue.
  5. NAT

  6. Network adapter on the physical computer “Bridged”. Each virtual network will appear as another network interface in the physical machine “host”. This will allow the guest machine to access any services in the external network and vice versa.
  7. bridged

  8. MS Loopback Adapter. For complexity purposes, definitely, this is your choice! If you’ve used VMware to create virtual machines, this is gonna be similar to “Custom” setting which allows you to choose the virtual network adapter. You can install a different Loopback “software-only” adapter in the host machine without the necessity to install any additional physical network adapters. In very common scenarios, you will need to manually set a static IP address for each Loopback adapter. Afterwards, you can connect to other virtual networks in a different network switch. Remember that this adapter is software only and no external network is involved.
    MS Loopback
    Here are very common steps to add a new Loopback adapter “Windows”:

    1. Control Panel >> Add Hardware “hdwwiz.cpl” >> Click Next
    2. Click Yes, I have already connected the hardware.
    3. In the Installed hardware list, click Add a new hardware device >> Next.
    4. Click Install the hardware that I manually select from a list (Advanced) >> Next.
    5. In the Common hardware types list, click Network adapters >> Next.
    6. In the Manufacturer box, click Microsoft, in the Network Adapter list, click Microsoft Loopback Adapter >> Next >> finish.
    7. Now, you can configure and use the new Loopback adapter that is listed in the Network Connections “ncpa.cpl“.

Conclusion

Virtual Networks are the most amazing thing in virtualization world. You don’t need to spend extra money or even efforts to communicate with different network segments. Surprisingly, NAT and DHCP services are already there and they need only to be enabled. The virtual machines are able communicate together in a private network, or to intranet, extranet, and the internet.


0 Responses to “Virtual Network, no longer virtual!”


  1. No Comments

Leave a Reply