Need help with netsh to change IP addresses everytime it's needed

By deboogeek ·
My brother's computer (in another room) is equipped with a cable modem connection. My computer is connected to my brother's computer via a cross cable (a straight cable + jointer + small cross cable so as to change back to straight cable when connecting directly to modem).

ICS is setup on both the computers as required and everything works fine. When my brother is not working on his computer and it is switched off, I cannot connect through the computer's second network card. I have to manually unplug the jointer and the small cross cable and connect the straight cable to the cable modem.

Then, on my computer, I use a MAC address changer so that my network card's address is the same as what my brother's 1st (onboard) network card has. I also have to manually change from the static IP of to "Obtain and IP address automatically".

This way, I am able to connect both ways and with or without the other computer turned on.

Sometimes I have to do this switching thing more than once a day and it is a hassle to change the IP address every time. I had thought of adding another network card to my computer with a static IP and then I only need to switch the cable to the other card. But the other card (old, Winbond) isn't detected in my computer.

I know that netsh is a command that can change IP addresses based on a script, but do not know how to do this. Using the script, I can just double-click the file and the IP would be changed.

Can someone please tell me what I need to add to the script file and what exact netsh commands do I need for the above?


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Try this

by Jacky Howe In reply to Need help with netsh to c ...

How to use the Alternate Configuration feature for multiple network connectivity in Windows XP

Collapse -

Re:Try This

by deboogeek In reply to Try this

I'm using it this way now, and I don't even change the MAC address. Windows just works without complaining about the mac address, even when the same mac is on my brother's computer.

Thank you, very much!

Collapse -

That's the easiest

by Jacky Howe In reply to Re:Try This

way to get a second connection.

Collapse -

How About

by Russell Gates In reply to Need help with netsh to c ...

Just buy a router and then you don't have to do anything. Like $35-$40 bucks at a supply store? I know sometimes its the fun of doing something but you have to weigh the hassle effect.
You could also just turn off the cable modem while you reconnect the Ethernet and it'll auto assign an IP address. Cable only assigns the one address and will not auto renew upon disconnection/reconnection. But power down/up will cause a new IP address to be assigned.

Related Discussions

Related Forums