Change IP - bat file needed

By sritce
Jan 23, 2010
Topic Status:
Not open for further replies.
  1. Hi,i need a bat file for changing IP address randomly ..Also should change in the ip range.For ex.now this is my setting..

    Ip address : 192.168.1.2
    subnet mask : 255.0.0.0
    default gateway :192.168.1.1

    preferred dns :125.22.47.125
    alternate dns :202.56.250.5

    Now i need a bat file which should change my ip address alone randomly in the range 192.168.1.2 to 192.168.1.100...I dont know its possible or not..but i need to do this how can i..thanks in advance..
  2. jobeard

    jobeard TS Ambassador Posts: 13,285   +281

    hmm; very strange request to perform randomization via bat file.

    we normally recommend using DHCP to make the assignments to avoid collisions with
    other systems on the subnet.

    there is no advantage to randomization

    so imo, this is very suspicious of being some kind of hacking effort ...
  3. Archean

    Archean TechSpot Paladin Posts: 6,034   +70

    I know it can be done; but why would anyone want to do it?
  4. jobeard

    jobeard TS Ambassador Posts: 13,285   +281

    makes no sense on the LAN side, as the public WAN ip address is set by the ISP and that would be where we would track down spammers :)
  5. sritce

    sritce Newcomer, in training Topic Starter Posts: 58


    dude i am not for hacking ..And i made a mess here..after all just now figured out the difference between system ip and internet ip...My objective is to restart my modem automatically using a batch file to get new ip ..I guess now i am clear..sorry guys..

    Now i found how to reboot the my modem for getting my new ip..Now last step guys pls help..This is the command i used to give in cmd prompt for rebooting modem.

    telnet 192.168.1.1
    pasword : (Now it asks for password )
    set reboot

    Done its working.But how to make batch file for this because the second line is password input.and this password is CONSTANT(means same for all) ...help guys..My thanks to all who replied..
  6. sritce

    sritce Newcomer, in training Topic Starter Posts: 58

    Sorry made a mess here..My objective is to restart my modem automatically using a batch file to get new ip ..I guess now i am clear..sorry guys..

    Now i found how to reboot the my modem for getting my new ip..Now last step guys pls help..This is the command i used to give in cmd prompt for rebooting modem.

    telnet 192.168.1.1
    pasword : (Now it asks for password )
    set reboot

    Done its working.But how to make batch file for this because the second line is password input.and this password is CONSTANT(means same for all) ...help guys..My thanks to all who replied..
  7. Archean

    Archean TechSpot Paladin Posts: 6,034   +70

    Ah that clarifies it; but as far as I've known it can be done for LAN settings; I am pretty much sure the procedure I know would not work on Modem. But anyway, whats the make/model/type of modem you are referring to.

    Also try downloading this util if it can see your modem may be something can be done about it.
  8. sritce

    sritce Newcomer, in training Topic Starter Posts: 58


    i want to restart my model automatically at night.so i need batch file so that i ll schedule it..

    modem name : beetel 450tc1adsl2+ router....

    this is the commands to do restart my modem..
    telnet 192.168.1.1
    Password : (it asks for password and now it should take it autoamtically from that batch file so that it continues with out asking for input)
    set restart

    now how to make this as batch file..important is that it doesnt wait for user input for password..help me guys..thanks..
  9. Archean

    Archean TechSpot Paladin Posts: 6,034   +70

  10. jobeard

    jobeard TS Ambassador Posts: 13,285   +281

    no matter what you do, the ISP will control the WAN side (ie: public ) ip address of your modem.
Topic Status:
Not open for further replies.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.