Non-DHCP XP Network Gateway configuration

configurationdhcpgatewaywindows-xp

I've got two internet gateways on my network. I want half the machines to point to the first Gateway and half to the second. Currently, they're all using DHCP.

I assume that to assign them to a specific gateway, I'll have to switch off DHCP and enter the gateway address manually.

Assuming this is the case – can someone provide a set of steps to do this?

Best Answer

Management of all those static IP's would be a pain. Have you considered splitting into two routed subnets, each with its own DHCP scope?

EG subnet1 is one one switch (or set of linked switches) and a router that connects to the internet. DHCP server is here.

Subnet2 on a different switch, or set of switches, whose router has one route/connection to subnet1, and another route/connection to the internet. On this router you can run a DHCP relay ('ip helper-address' if the switches are Cisco). If you used DHCP relay then your DHCP server in subnet1 would simply have abother scope, with its own address range and gateway settings. Alternatively you could just run another DHCP server in subnet2.

alt text http://f.imagehost.org/0521/2routers.png

Note that this solution would require both routers having dual WAN links, OR a switch capable of VLANs. So it may not apply to you.

Caution: if you do this, your name services need to be in great condition all the time, since clients will no longer be able to fallback to broadcast name resolution if/when name services fail.

Alternatively you could go around setting static IP and gateway setting by hand or by script. Have a look at the NETSH commandline utility if you wish to script it. Example of a netsh command you'd run on each PC (changing the IP address each time):

netsh interface ip set address "NICname" static 192.168.20.101 255.255.255.0 192.168.20.1
                                                ^address       ^netmask      ^gateway 
Related Topic