For users who use both Intranet and Internet, you often need to manually switch the Intranet and Internet IP addresses. A batch process for automatically switching IP addresses is provided. Windows 7 is as follows: [plain] netsh interface ip set address name = "Local Connection" source = static addr = 192.168.1.55 mask = 255.255.255.0 gateway = 192.168.1.1 rem netsh interface ip set dns "Local Connection" source = static addr = 8.8.8.8 windows XP: [plain] netsh interface ip set address name = "Local Connection" source = static addr = 192.168.1.55 mask = 255.255.255.0 netsh interface ip set address name = "Local Connection" gateway = 192.168.1.1 gwmetric = 0 rem netsh I Nterface ip set dns name = "Local Connection" source = static addr = 8.8.8.8 register = PRIMARY rem netsh interface ip add dns name = "Local Connection" addr = 8.8.8.8 index = 2 copy the preceding code to a local file (xxx.txt ), save and modify the suffix. bat. Note: you need to set the addr, gateway, and dns in the above Code according to your network environment.