MadBoy Posted September 26, 2007 Share Posted September 26, 2007 (edited) Hello,I need kind of put in the right direction on one problem. I have around 10 ips that are constantly being used by someone from my team. Those IP's are static ones. We often change ips on computers and there's always someone that chooses wrong ip address from those 10. So i was wondering if it's possible to write a script that would check if IP is taken or not (as in send some kind of broadcast packet????) and it the ip is taken go for next one. I am aware of set your address easly.I don't need the whole script or anything. Just an idea where to go with this as i am not realy network guy that much Thank you very much,MadBoy Edited September 26, 2007 by MadBoy My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
ssubirias3 Posted September 26, 2007 Share Posted September 26, 2007 Just wondering if a static address pool (aka registered pools) would work for you? Link to comment Share on other sites More sharing options...
Nahuel Posted September 26, 2007 Share Posted September 26, 2007 Maybe: expandcollapse popupPing("XX.XX.XX.X1") If @error Then MsgBox("","The IP XX.XX.XX.X1 seems to be available. Taking it...",2) ;~ ============ ;~ *set your IP address XX.XX.XX.X1 easily* ;~ ============ Exit Else MsgBox("","The IP XX.XX.XX.X1 seems to be taken. Moving to next",2) EndIf Ping("XX.XX.XX.X2") If @error Then MsgBox("","The IP XX.XX.XX.X2 seems to be available. Taking it...",2) ;~ ============ ;~ *set your IP address XX.XX.XX.X2 easily* ;~ ============ Exit Else MsgBox("","The IP XX.XX.XX.X2 seems to be taken. Moving to next",2) EndIf Ping("XX.XX.XX.X3") If @error Then MsgBox("","The IP XX.XX.XX.X3 seems to be available. Taking it...",2) ;~ =========== ;~ *set your IP address XX.XX.XX.X3 easily* ;~ ============ Exit Else MsgBox("","The IP XX.XX.XX.X3 seems to be taken. Moving to next",2) EndIf Ping("XX.XX.XX.X4") If @error Then MsgBox("","The IP XX.XX.XX.X4 seems to be available. Taking it...",2) ;~ ============ ;~ *set your IP address XX.XX.XX.X4 easily* ;~ ============ Exit Else MsgBox("","The IP XX.XX.XX.X4 seems to be taken. Moving to next",2) EndIf Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 27, 2007 Share Posted September 27, 2007 I have around 10 ips that are constantly being used by someone from my team. Those IP's are static ones. We often change ips on computers and there's always someone that chooses wrong ip address from those 10. So i was wondering if it's possible to write a script that would check if IP is taken or not (as in send some kind of broadcast packet????) and it the ip is taken go for next one.It's called DHCP. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
weaponx Posted September 27, 2007 Share Posted September 27, 2007 If you don't mind...why are you changing addresses regularly? Do you put them in a fish bowl? No but seriously, why not use dhcp? Link to comment Share on other sites More sharing options...
realkiller Posted September 27, 2007 Share Posted September 27, 2007 in the registry you can set your ip staticaly Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2 Link to comment Share on other sites More sharing options...
MadBoy Posted September 27, 2007 Author Share Posted September 27, 2007 I see nobody understand what i meant so i'll rephrase. I know what DHCP is and i know how to use it and yes this is solution. But i just simply don't want to do that (due to many circumstances). However those 12 ip's are registred IP's from my provider aka external IP's and not internal ones. I know about "netsh" and i will probably use it as a solution to set IP. That's also not what i am asking for. What i am asking for is that i have lets say around 20 PC's that are constantly reinstalled and 3 ppl working on them at same time. 6 of those 12 ips are taken all the time so i'm only left with 6. As it requires coordination between my guys to know what Ip's are currently in use and which aren't i wanted to make a script that would precheck if the IP is in USE by one of those 20Pc's and use the ones that are free. And now we get to the point where i need to know how to precheck if that IP is in use without setting IP on computer first. Hope this clears it up and i can get some nice answer @NahuelI don't think Ping will work if you don't have IP set, so your script isn't what i am looking for.Thank you for the answers so far My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now