So to make this short.
I have a bunch of printers I wanted to network in a lab. The computers are a mix of laptops and desktops. The desktops have two NICs, and the laptops connect to the internet wirelessly.
I have all the ethernet run and hooked up some routers, but then discovered that windows could not tell which NIC to use for internet and which one to use for the LAN. So I turned of DHCP and then it works, but the IPs have to be assigned manually. This is no problem for desktops, but laptops leave the lab and get hooked up where they need to have the ip assigned automatically.
In the past to deal with this issue I just did the netsh stuff.
netsh -c interface dump c:\lab
netsh -f c:\lab
netsh -c interface dump c:\home
netsh -f c:\home
Made the second command into a bat file and then users could simply click the bat for home or lab. Unfortunately it doesn't seem to be working in windows 7. I did run as admin but it was no joy. I even tried more specific bat files such as
netsh interface ip set address name="Local Area Connection" static 192.168.0.1
netsh interface ip set address "Local Area Connection" dhcp
When I did this it turned off dhcp, and entered the ip address, but then it showed up as manually enter ip address with all blanks instead of turning dhcp back on for some reason. I restarted the laptop and it worked, but I don't remember netsh requiring restarts in the past.
Any advice on how to easily deal with this situation? Either to get netsh to work right, use the alternate ip config tab (which I never noticed previously) or some other idea?
Thanks guys and gals
edit: I cannot try not, but after reading about the alternate config tab it actually sounds like it may do the trick all by itself, that is epically awesome if so.
I have a bunch of printers I wanted to network in a lab. The computers are a mix of laptops and desktops. The desktops have two NICs, and the laptops connect to the internet wirelessly.
I have all the ethernet run and hooked up some routers, but then discovered that windows could not tell which NIC to use for internet and which one to use for the LAN. So I turned of DHCP and then it works, but the IPs have to be assigned manually. This is no problem for desktops, but laptops leave the lab and get hooked up where they need to have the ip assigned automatically.
In the past to deal with this issue I just did the netsh stuff.
netsh -c interface dump c:\lab
netsh -f c:\lab
netsh -c interface dump c:\home
netsh -f c:\home
Made the second command into a bat file and then users could simply click the bat for home or lab. Unfortunately it doesn't seem to be working in windows 7. I did run as admin but it was no joy. I even tried more specific bat files such as
netsh interface ip set address name="Local Area Connection" static 192.168.0.1
netsh interface ip set address "Local Area Connection" dhcp
When I did this it turned off dhcp, and entered the ip address, but then it showed up as manually enter ip address with all blanks instead of turning dhcp back on for some reason. I restarted the laptop and it worked, but I don't remember netsh requiring restarts in the past.
Any advice on how to easily deal with this situation? Either to get netsh to work right, use the alternate ip config tab (which I never noticed previously) or some other idea?
Thanks guys and gals
edit: I cannot try not, but after reading about the alternate config tab it actually sounds like it may do the trick all by itself, that is epically awesome if so.