Networking Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationNetworking Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 23rd, 2003, 09:15 AM
chibu68 chibu68 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 1 chibu68 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile getting ip address from mac address

Hi dear, can you explain to me in detail how to determine ip address from mac address?
Thanks
Chibuzo

Reply With Quote
  #2  
Old November 23rd, 2003, 09:16 PM
ctrlaltdel's Avatar
ctrlaltdel ctrlaltdel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Boston MA
Posts: 71 ctrlaltdel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
@echo off
:Start
IF "%4"=="" GOTO Help
SET thirdOctet=%1
SET thirdlimit=%2
SET fourthOctet=%3
SET fourthlimit=%4
IF "%5"=="" SET net1=131
SET net1=%5
IF "%6"=="" SET net2=162
SET net2=%6
IF "%7"=="" SET timeOut=100
SET timeOut=%7
GOTO IP

:IP
IF %fourthOctet% GEQ %fourthlimit% GOTO PART2
SET ipadd=%net1%.%net2%.%thirdoctet%.%fourthOctet%
ECHO Processing %ipadd%
GOTO PART1

:PART1
ping -n 1 %ipadd% -w %timeOut% > junk.del
GOTO Update

:Update
SET /A fourthOctet=%fourthOctet%+1
GOTO IP

:PART2
IF %thirdOctet% GEQ %thirdlimit% GOTO END
SET fourthOctet=1
SET /A thirdOctet=%thirdOctet%+1
SET ipadd=%net1%.%net2%.%thirdOctet%.%fourthOctet%
ECHO Processing %ipadd%
GOTO PART1

:Help
ECHO Usage :
ECHO C_ARP 3rd_octet 3rd_limit 4th_octet 4th_limit [Optional 1st_octet] [Optional 2nd_octet] [Optional Timeout]
----------------
ECHO Example Usage 1 :
ECHO C_ARP 145 147 1 255
ECHO will scan the ip ranges from 131.162.145.1 to 131.162.145.255
ECHO and 131.162.146.1 to 131.162.146.255
ECHO and 131.162.147.1 to 131.162.147.255
ECHO C_ARP 145 147 1 255 156 230 10
ECHO will do the same thing except that 131 will be replaced by 156
ECHO and 162 will be replaced by 230
ECHO the timeout will be 10 instead of 100
ECHO NOTE :
ECHO The parameters 1st_octet, 2nd_octet and Timeout should be
ECHO entered in sequence if you use it.
ECHO .....................................................................
ECHO ABOUT THE BATCH FILE
ECHO .....................................................................
ECHO I created this as i needed a way to get the ip address
ECHO from the mac address, since the hostname changes
ECHO depending from where you are logged in (ex, Carnegie or Library)
ECHO This batch script pings all the ip addresses of the range of
ECHO 131.162.third_octet.fourth_octet to 131.162.third_limit.fourth_limit
ECHO This in effect fills the cache tables of your ARP, which you can
ECHO then use to determine the ip address from the mac address you have!!
ECHO Use arp -a to display your arp table and Use arp -d * to clear your arp cache
---------------
ECHO DEVELOPED BY KHALSA
ECHO CONTACT : 050188s@acadiau.ca
ECHO When one door closes, another opens
GOTO LETGO

:END
del junk.del
arp -a > results.arp
ECHO ARP table saved in file results.arp, Good luck !!
:LETGO

Reply With Quote
  #3  
Old November 25th, 2003, 09:07 AM
aureliano's Avatar
aureliano aureliano is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Italy
Posts: 8 aureliano User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to aureliano
[ot]

lol ... ctlaltdel ... you shred!!!!

[/ot]

Reply With Quote
  #4  
Old December 24th, 2003, 08:09 AM
dbasnett dbasnett is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 108 dbasnett User rank is Lance Corporal (50 - 100 Reputation Level)dbasnett User rank is Lance Corporal (50 - 100 Reputation Level)dbasnett User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 10 h 29 m 22 sec
Reputation Power: 5
I think this sequence:
SET fourthlimit=%4
IF "%5"=="" SET net1=131
SET net1=%5
IF "%6"=="" SET net2=162
SET net2=%6
IF "%7"=="" SET timeOut=100
SET timeOut=%7

needs to be:
SET fourthlimit=%4
SET net1=%5
IF "%5"=="" SET net1=131
SET net2=%6
IF "%6"=="" SET net2=162
SET timeOut=%7
IF "%7"=="" SET timeOut=100

to work.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationNetworking Help > getting ip address from mac address


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway