在win xp中,hosts文件在目錄windows\system32\drivers\etc下。

127.0.0.1       localhost
127.0.0.1       test1
127.0.0.1       test2
127.0.0.1       test3


這樣設置后,測試機器就可以解析test1,test2,test3解析到127.0.0.1