Wednesday, January 10, 2007

Map IP address to specific pcname

Sometimes there is a need to map the name of a pc to a different ip address. In Windows this is possible by editing the hosts file.

For example when a part of an application connects to a productionserver PROD01 which is down, it can be handy to forward the requests to a developer server. Of course, this is only usefull if you don't have access to the connectionstring in the application.

The following steps explain how to do this:

  • go to C:\Windows\system32\drivers\etc

  • open the hosts file

  • at the end of the file add a new entry as seen in the screenshot

This will forward all requests to PROD01 to 10.10.10.1 which can be the IP address of a different pc (for example the development server).

1 comments:

Gabriel Lozano-Moran said...

Followed by nbtstat -R