VMWare Workstation and Wireless Network Adapter Problem

There is one important note to keep in mind when setting up VMWare Workstation (I use version 7) to use wireless network adapter. Here’s the basic terminology:

Bridged: Connected directly to your physical network.
So, a virtual machine is set to use Bridged mode, the vm is sitting on the physical network, having different IP address than the host and can access / be accessed by other computer in the same network (assuming the network sharing is enabled).

NAT: Used host’s IP address as its IP address.
A virtual machine that uses NAT mode is not connected directly to physical network. This vm kind of stand behind the host machine and is able to talk to network’s router / switch through the host’s IP address. Other devices in the same network would not be able to access the virtual machine.

Host-only: Connected to the host only.
Virtual machine that uses this mode is on host’s private network. The virtual machine is isolated in this private network that it can’t reach outside the host’s private network nor can any body reach in to the private network beside the host. This also means the vm can’t talk to physical network’s router / switch, so no Internet connection is available for the vms in the private network.

These virtual network adapter modes can be set / modify through “Virtual Network Editor” (From VMWare Workstation menu, Edit > Virtual Network Editor).

Having said this, when setting up your home / office network to use wireless network adapter, you will need to keep these terminologies in mind.

When a computer uses wireless network adapter to connect to a wireless router, the router will normally assign an IP address to that adapter. A typical router is able to assign multiple IP addresses to the same MAC address. However, some routers can’t do this. When a computer connects to a router using wireless adapter, the router recognizes the wireless adapter (not the computer) as one MAC address and it will assign one IP address to that adapter.

Problem might arise when you try to connect your guest machines using bridged connection because, remember, in bridged mode, a guest machine has different IP address. What happens if you use bridged mode is the host and the guest machines will have different IP addresses. These different IP addresses will use same wireless network adapter to connect to the router. If the router can’t assign multiple IP addresses to the same MAC address, the router will kick out host / guest (randomly) out of the network and only allow one IP address to use the device with previously defined MAC address.

The problem is not happening in NAT mode because guest machines will share same IP address with the host. The problem will also not be happening in Bridged mode with ethernet connection (as oppose to wireless) because the router will see each computer (host and guest machines) as having different MAC addresses.

Advertisements

Enable WCF Web Service Help Page in Web.Config

In .Net 4.0 of WCF, we can now enable service’s help page that look like this:

To do that, add the following xml tag in web.config file:

<endpointBehaviors>
    <behavior name="DefaultEndPointBehavior">
        <webHttp helpEnabled="true" />
    </behavior>
</endpointBehaviors>

The attribute (helpEnabled=”true”) in <webHttp> tag enables the help page and it’s case-sensitive.

To access the help page, just goto your service end point url and add “/help”, for example:

http://localhost/HelloWorld.svc/help

Using Wireless Extender (Netgear WiFi Range Extender – WN2000RPT) on AT&T U-verse Router (Windows and Macintosh)

There are tricks in order to use wireless extender on AT&T U-verse router. I am using Netgear Universal WiFi Range Extender (WN2000RPT) for my wireless extender.

Just connecting the extender and complete the extender’s configuration will only give you access to the network, but not the Internet access. This means, you can access the computer within the network, but you can’t access the Internet. This is what I got:

  1. Go to Netgear configuration manager.
  2. Turn off DHCP feature on the extender by going to “IP Address Setup” and use static ip address.
    On “IP Address” field, specify the ip address you want for the extender. Remember this ip address.
    Do note that the “Gateway IP Address” and “Primary DNS” are the ip of your AT&T U-verse router. By default, the AT&T U-verse router’s ip is 192.168.1.254.
  3. Click Apply button to save the setting.
  4. Now, configure your computer’s network setting to point its default gateway and primary dns to the extender’s ip address.
  5. On Windows, open up the network adapter setting.
  6. Display the properties.
  7. Properties on “Internet Protocol Version 4 (TCP/IPv4)” or something similar to that.
  8. Define ip address and dns server address.
    On “IP address”, specify ip address you want for this computer.
    On “Default Gateway” and “Preferred DNS server”, type in the AT&T U-verse router’s ip address. By default, the AT&T U-verse router’s ip is 192.168.1.254.
  9. Go back to network adapter setting to restart the connection (disable and then enable again).

Mac users: you can do the same thing: point your Mac’s network default gateway and dns server address (router) to AT&T U-verse router’s ip address.

To access your network setting, go to System Preferences > Internet & Wireless > Network > Advanced > TCP/IP.

The side effect (not sure if it’s good / bad…) of using this technique is your AT&T U-verse router will assign a ‘dynamic’ ip address for the extender. What I meant by ‘dynamic’ here is, the ip address will constantly change depend on what device is making connection to AT&T U-verse router. So for example, you have specify the extender ip address as 192.168.1.1 in the extender’s configuration manager and you have 2 devices connecting to the extender with ip addresses as 192.168.1.5 and 192.168.1.6 respectively, the extender ip address in AT&T U-verse router will change from 192.168.1.1, 192.168.1.5 or 192.168.1.6.

Update 4.19.2011: For those who use VMWare Workstation, please read additional post if you have problem connecting the extender to your router: VMWare Workstation and Wireless Network Adapter Problem.

VMWare Virtual Machine Can’t Connect to the Internet or Detect Network Adapter / Ethernet Controller

Issue: when powering on and start the VMWare virtual machine, the guest machine can’t connect to the Internet. In device manager, it shows the system can’t detect network adapter / ethernet controller.

This normally happens when upgrading VMWare version or upgrading Windows operating system or converting physical machine to virtual. The later one is my case.

Apparently, this VMWare bug as stated in this forum: http://communities.vmware.com/message/1400475

The workaround is:

  1. Power off (not just suspend) the virtual machine.
  2. Go to VM > Settings > Options tab. Check “Guest operating system” section and make sure it matches version of the actual operating system.
  3. Open up the virtual machine’s .vmx file (located in the virtual machine’s folder). Ensure it has the following lines, add if it doesn’t:
    ethernet0.addressType = “generated”
    ethernet0.connectionType = “bridged”
    ethernet0.virtualDev = “e1000”
  4. Power on the virtual machine.

Access iPad File System with SSH from Mac

  1. Install “OpenSSH” on your iPad This can be found on Cydia if the iPad is jail-broken.
  2. Enable the SSH connection on the iPad I install “SBSettings” from Cydia to turn SSH on / off. There are many other apps that can do this.
  3. Find out your iPad’s IP address If you have “SBSettings” installed, you can see your IP address on this app as well.
  4. From your mac, run Terminal
  5. SSH to your iPad by typing the following command SSH root@192.168.1.65
  6. When prompted for Password, type in “alpine” (without double quote – all lowercase)
  7. Whoola, you are in iPad’s file system now.
  8. If you can’t access your iPad with SSH, try reboot the iPad.

Delete All iPad’s Address Book and Calendar Data

  1. SSH to your iPad.
  2. Note that the folder and file names in iPad are case-sensitive.
  3. Delete “AddressBook.sqlitedb” file on “/private/var/mobile/Library/AddressBook/” with the following command:
    rm /private/var/mobile/Library/AddressBook/AddressBook.sqlitedb
  4. Delete “Calendar.sqlitedb” file on “/private/var/mobile/Library/Calendar/” with the following command:
    rm /private/var/mobile/Library/Calendar/Calendar.sqlitedb

Good Automation System Process Characteristics

  1. Run one instance only.
  2. Send notification when error occurs.
  3. Auto-fix error if possible (based on frequently occurred errors).
  4. Logging capability.
  5. A separate monitor system to watch the process.
  6. Monitor system must very simple to prevent failure.