Jump to content

.bat? to quickly change ip's


Recommended Posts

Posted

hey all!

in my work i need to use many tifferent ip's, to config different routers and so on. it's annoying to go every time into tcp/ip settings and type them..

is there a possibility to do this automatically - meaning i have lets say 3 different .bat files in my desktop with different ip setting ?

tnx all

Posted

well, i can use our so called technican to :D what else is there..?

does that work only to ip? i would like to change ip;mask;gw and when all is done then back to automatical..if its possible..

Posted

sudo ifconfig eth0 <ip address> netmask <netmask address>

sudo route add default gw <ip address of gateway>

that is the sytax you need to change all that stuff

Posted

If you're lucky enough not to have to use Ubuntu, then your looking for the windows command netsh... This explains it more succinctly than I can. Let me know how it goes.

Posted

tnx to u all, that was just the thing i needed, and it works. tnx again :)

--edit--

guessing im getting greedy now but is there a some sort of asking feature to? meaning that there is them static ips (192.168...so on) and then there are client ips, that we need to check every time and they are never the same.

it would be great if theres somesort of asking system - i run bat, it then asks ip - get ip, ask mask- get mask ask gateway - or something like that.

point is to get past that Network propertis - lan - tcp/ip...its frustrating if u have to do it every day over and over, every time different ip's, specialy with touchpad :D

hope its possible..

Posted

It's called DHCP.

See the ipconfig command.

What you probably want to do is clone the network device (on UNIX you'd get eth1:0, eth1:1, eth1:2 etc. No idea how Windows does it, but I know it's capable), set it up for each env and just activate one using the ipconfig command.

But I really wonder just what the hell you're trying to do.

Set up a few gateways for various parts of the network, and just go through them rather than trying this weird way of getting an IP assigned using whatever means is standard in the target network.

Posted

wait winblows or LINUX theres rly no point in lin lin cuz of its supreme 1337ness

heres for winblows

@echo off

:A

ipconfig /release

ipconfig /flushdns

ipconfig /renew

echo hak5 ownz

goto A

Im not using winblows ne more so this batch could be wrong any1 feel free to correct

  • 2 weeks later...
Posted
wait winblows or LINUX theres rly no point in lin lin cuz of its supreme 1337ness

heres for winblows

Im not using winblows ne more so this batch could be wrong any1 feel free to correct

ugh2.gif

Where to start. Ok txt/l33t speak is not good and it really annoys some people

Second Windows is a great OS, no need to go all fan boy on Linux.

-Just read some of your posts and...wow, just wow. You want people to take you seriously; lay off the abusive language, respect other peoples opinions, and just because you hate the ass of Microsoft doesn't mean everyone else does.

I dont hate Microsoft i just... strongly dislike them :wink:

Posted
wait winblows or LINUX theres rly no point in lin lin cuz of its supreme 1337ness

heres for winblows

Im not using winblows ne more so this batch could be wrong any1 feel free to correct

ugh2.gif

Where to start. Ok txt/l33t speak is not good and it really annoys some people

Second Windows is a great OS, no need to go all fan boy on Linux.

-Just read some of your posts and...wow, just wow. You want people to take you seriously; lay off the abusive language, respect other peoples opinions, and just because you hate the ass of Microsoft doesn't mean everyone else does.

and that nice bit of code there will be happy to trash you IP setting with it's infinite loop

Posted
I dont hate Microsoft i just... strongly dislike them :wink:

What for? Your not old enough to have been doing anything important in the 90's...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...