Archive

Archive for October, 2009

IP Routing in Windows

October 25, 2009 Comments off

Linux is often used for network routing because it is cheap to set up, it is efficient, and it runs on old computer hardware. However, if you are not already familiar with Linux, the set-up can be daunting. If you only have simple routing requirements then a Windows box can be used as the IP router.

By default, for security reasons, Microsoft turns off routing between the Ethernet cards. However, if you need to route, the option can be turned back on.

To set up a Windows box as an IP router do the following:

  1. Take a spare PC with Windows XP or Vista on it to use as the PC router.
  2. Ensure that there are two or more Ethernet cards installed in the PC.
  3. For each of the installed Ethernet cards, assign an IP address from a different subnet.
  4. Enable routing between the Ethernet cards:
    • regedit
    • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
      • Change IPEnableRouter from 0 to 1
    • Reboot
  5. Connect a second PC to a network that is attached to one of the Ethernet cards in the PC router. Using the second PC, attempt to ping each of the Ethernet cards in the PC router. You should be able to ping devices on other subnets through the PC router.
  6. Note: If your second PC’s default gateway is not the PC router then you may need to add additional static routes using the route add command.

Reference:

Advertisements
Categories: System Admin, Windows

Printer driver problem caused Word to crash

October 25, 2009 Comments off

There are innumerable reasons why Word may crash.  In my case Word crashed because of a printer driver problem.

Apparently when Word first opens a document, it queries the printer driver settings for your default printer.  In my case something conflicted between the settings within some documents and my default printer driver settings.  Tested in both Word 2003 and Word 2007, Word would simply crash a few seconds after opening the document.

Deleting the default printer from the Printer applet in the Windows Control Panel and re-adding the printer solved the problem.

Categories: System Admin, Windows

Windows Network Adapter Order

October 25, 2009 Comments off

Need to change the order that network adapters show up in Windows?

Vista:

  • Start -> Control Panel -> Network and Sharing Center
  • Manage Network Connections
  • Alt-N
  • Advanced Settings
  • Adapters and Bindings Tab
  • In the Connections box, click on a connection and press up or down to modify its binding order.

XP:

  • Start -> Control Panel -> Network Connections
  • Alt-N or Menu -> Advanced
  • Advanced Settings
  • Adapters and Bindings Tab
  • In the Connections box, click on a connection and press up or down to modify its binding order.
Categories: System Admin, Windows

Removing Drivers for Non-Present Hardware

October 25, 2009 Comments off

Windows often remembers hardware bindings for devices that are no longer connected to your computer. Sometimes these old bindings cause problems.

To view the bindings for non-present hardware you need to do the following:

  • Start -> Run -> cmd
  • At the cmd prompt type:
    • set DEVMGR_SHOW_NONPRESENT_DEVICES=1
    • devmgmt.msc
  • When the Device Manager console starts select the menu item View -> Show hidden devices

Non-present devices will now show up greyed out in the device manager tree. Remove the troublesome device by selecting it and pressing the “Delete” key or Right-clicking and selecting Uninstall.

Warning! Don’t delete any devices that are required to boot your computer. Plug-and-Play devices are generally safe to remove (ie. USB, PCI, etc…)

References:

Categories: System Admin, Windows

Windows 7 – XP Mode Network Settings

October 23, 2009 16 comments

By default, XP mode virtual machines in Windows 7 are configured to use an internal Virtual PC NAT device.  In order to connect your XP mode virtual machine (VM) directly to your local network you’ll need to change the VM’s network settings to bridge to your local Ethernet card.

In Windows 7:

  • Start -> All Programs -> Windows Virtual PC -> Virtual Machines
  • Right click on your virtual machine configuration file.  e.g. Virtual Windows XP.vmcx
  • Select Settings from the right-click menu
  • In the Virtual PC Settings dialog, select Networking on the left.
  • Change the Adapter drop down box on the right from Shared Network (NAT) to the name of your Ethernet card.
  • Press OK
  • Start/Restart the XP VM image.

Update:

  • For more information on network configurations, please see the first reference below.
  • For wireless setup, see the second reference below.
  • For the record, I do not use XP mode personally.  Instead, I use VMware products such as VMware Workstation, VMware Player (free for personal use) and the VMware server line.  I have found VMware to be more versatile and it fully supports Linux.

References:

Categories: System Admin, Windows

Handling nuisance e-mails at kernel.org

October 20, 2009 Comments off

Ran across the following amusing entry in the FAQ at kernel.org.

“At Kernel.org we pride ourselves on giving our users the highest quality responses to their e-mails (with the Copious Free Time we have to devote to the task) and your e-mail request will be deleted in the order it was received.

Please stay on the internet until the next available admin is available – your e-mails are important to us.”

Categories: Linux

Thread.Sleep as a sign of a poorly designed program

October 20, 2009 Comments off

An interesting article discussing why Thread Sleep() and Sleep(0) should not be used:
https://msmvps.com/blogs/peterritchie/archive/2007/04/26/thread-sleep-is-a-sign-of-a-poorly-designed-program.aspx

Categories: Programming