- Posts: 25
- Thank you received: 0
RARP Ip to MAC resolution... HELP!
20 years 8 months ago #3259
by SixFive7
SixFive7
RARP Ip to MAC resolution... HELP! was created by SixFive7
Hi everybody,
I am stuck and frustrated. I've written this huge program that could pull data out of my 3com superstack switch. It gives me a complete table of "switch ports" versus "mac addresses". But I want to reference my switch ports to IP adresses, even when there are more computers on one port. My switch can only give me the MAC address. Now, I've been searching for WEEKS for a solution. I've looked into the ARP table, and the RARP protocol and all that stuff. But it just ain't working. I need a clear Visual Basic code, to translate the MAC addresses in my LAN to IP addresses which I can resolve to hostnames. At the moment I'm even so desperate, that I would ping my entire subnet, and than start searching in the arp table.... but that isn't a real solution.... only the bandwith already...
Anywayz,
If someone has an answer to my question, please tell me... I'm about to give up for the first time, when it comes to networking problems.....
Thanx already!,
Jori Huisman
I am stuck and frustrated. I've written this huge program that could pull data out of my 3com superstack switch. It gives me a complete table of "switch ports" versus "mac addresses". But I want to reference my switch ports to IP adresses, even when there are more computers on one port. My switch can only give me the MAC address. Now, I've been searching for WEEKS for a solution. I've looked into the ARP table, and the RARP protocol and all that stuff. But it just ain't working. I need a clear Visual Basic code, to translate the MAC addresses in my LAN to IP addresses which I can resolve to hostnames. At the moment I'm even so desperate, that I would ping my entire subnet, and than start searching in the arp table.... but that isn't a real solution.... only the bandwith already...
Anywayz,
If someone has an answer to my question, please tell me... I'm about to give up for the first time, when it comes to networking problems.....
Thanx already!,
Jori Huisman
SixFive7
20 years 8 months ago #3262
by Chris
Chris Partsenidis.
Founder & Editor-in-Chief
www.Firewall.cx
Replied by Chris on topic Re: RARP Ip to MAC resolution... HELP!
Jori,
If your switch will not support the function you require, then you will certainly need to implement it in your program as I can't see another other solution.
So, to help answer your question ... here's some links which should do the job:
1) vbnet.mvps.org/index.html?code/network/macaddressremote.htm
2) www.planet-source-code.com/vb/scripts/Sh...d=33954&lngWId=1
3) www.a1vbcode.com/code.asp?type=networking&intPage=3
If none of the above helps you, then my suggestion is to visit www.visualbasicforum.com and post the request - I'm sure someone will be able to help.
Cheers,
If your switch will not support the function you require, then you will certainly need to implement it in your program as I can't see another other solution.
So, to help answer your question ... here's some links which should do the job:
1) vbnet.mvps.org/index.html?code/network/macaddressremote.htm
2) www.planet-source-code.com/vb/scripts/Sh...d=33954&lngWId=1
3) www.a1vbcode.com/code.asp?type=networking&intPage=3
If none of the above helps you, then my suggestion is to visit www.visualbasicforum.com and post the request - I'm sure someone will be able to help.
Cheers,
Chris Partsenidis.
Founder & Editor-in-Chief
www.Firewall.cx
20 years 8 months ago #3267
by sahirh
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
Replied by sahirh on topic Re: RARP Ip to MAC resolution... HELP!
I'm still having a look round for a solution to your problem. (Which btw is an interesting one), however I'm interested in how you're pulling the data outta the switch -- SNMP ?
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
20 years 8 months ago #3269
by Chris
Chris Partsenidis.
Founder & Editor-in-Chief
www.Firewall.cx
Replied by Chris on topic Re: RARP Ip to MAC resolution... HELP!
Sahir,
I'm quite certain SNMP is used here. It's the common method used to pull information from such devices.
I'm quite certain SNMP is used here. It's the common method used to pull information from such devices.
Chris Partsenidis.
Founder & Editor-in-Chief
www.Firewall.cx
20 years 8 months ago #3273
by sahirh
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
Replied by sahirh on topic Re: RARP Ip to MAC resolution... HELP!
Yep SNMP seems like the only way to do it. Hows it coded in VB though ? Is there some ready-made control or do you have to write some code from scratch.
When its done maybe you could send it across for us to have a look, sounds like it could make a useful addition to the arsenal.
When its done maybe you could send it across for us to have a look, sounds like it could make a useful addition to the arsenal.
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
20 years 8 months ago #3276
by SixFive7
SixFive7
Hey there,
Already thanx for the great help! I just needed these examples. You see, I am writing this software that allows me to see who's on the switch, and where. Also I was thinking of a sort of intrusion detection system. One that allows me to identify abnormal Ip's, hostnames or MAC's and as a result putting them in a different VLAN. Which basically means throwing them of the switch. I wanna use this to protect my network from outsiders that bring a laptop and try to login. (We get that a lot).
Now I found some interesting things as well. You see, I do not use SNMP to extract the info from my switch. Instead I use a telnet session to an Ip, or sometimes via the COM port. Then I send the necessary commands to login and ask for the info. I write the info to a string, and then start deconstructing it in small parts of info I need. (Hell of a job by the way.... the telnet ASCII’s already....). However, I found that, my switch probably is carrying a database of Ip's. But that I can only access these via the 3com monitoring program. Which uses SNMP! It seems SNMP is a widely used protocol to exchange status and usage reports of all kinds of router like devices.
Now my question is, is there any way I can use VB to access my router trough SNMP... how does this protocol work?
Then there's always the other side, what if, even via SNMP it is not possible to extract this data from my switch. Is there no other way to get from a MAC to an Ip? You see, I was wondering, is it a protocol limitation. Imagine a Linux computer with some virtual Ip's on one MAC. How will this query then resolve my question? Also I find it quite strange, that such a fundamental protocol (if it exists) is not written about all over the internet. I mean, it is the basics... MAC is where it started right?
Also, what does a computer do, when it sends a package to Ip X while it doesn’t know the MAC of Ip X. I figured it sends a sort of MAC broadcast package to figure out the MAC of the IP. Also, how does a switch handle these MAC broadcast (if any)? And why, if I send a ping to my Ip broadcast address, do only some computers respond, while they should all respond? Can’t I just send a MAC broadcast to get all the Ip’s, or can you only use MAC broadcast when you have defined the IP?
In short, I don’t understand any of it…
Oh, and the source, I didn’t really wrote it…. (Friend of mine). But I think I’d be able to get it on the net soon. Shall I send the current version? Or should I wait until it works?
Thanx Already,
Jori Huisman
Already thanx for the great help! I just needed these examples. You see, I am writing this software that allows me to see who's on the switch, and where. Also I was thinking of a sort of intrusion detection system. One that allows me to identify abnormal Ip's, hostnames or MAC's and as a result putting them in a different VLAN. Which basically means throwing them of the switch. I wanna use this to protect my network from outsiders that bring a laptop and try to login. (We get that a lot).
Now I found some interesting things as well. You see, I do not use SNMP to extract the info from my switch. Instead I use a telnet session to an Ip, or sometimes via the COM port. Then I send the necessary commands to login and ask for the info. I write the info to a string, and then start deconstructing it in small parts of info I need. (Hell of a job by the way.... the telnet ASCII’s already....). However, I found that, my switch probably is carrying a database of Ip's. But that I can only access these via the 3com monitoring program. Which uses SNMP! It seems SNMP is a widely used protocol to exchange status and usage reports of all kinds of router like devices.
Now my question is, is there any way I can use VB to access my router trough SNMP... how does this protocol work?
Then there's always the other side, what if, even via SNMP it is not possible to extract this data from my switch. Is there no other way to get from a MAC to an Ip? You see, I was wondering, is it a protocol limitation. Imagine a Linux computer with some virtual Ip's on one MAC. How will this query then resolve my question? Also I find it quite strange, that such a fundamental protocol (if it exists) is not written about all over the internet. I mean, it is the basics... MAC is where it started right?
Also, what does a computer do, when it sends a package to Ip X while it doesn’t know the MAC of Ip X. I figured it sends a sort of MAC broadcast package to figure out the MAC of the IP. Also, how does a switch handle these MAC broadcast (if any)? And why, if I send a ping to my Ip broadcast address, do only some computers respond, while they should all respond? Can’t I just send a MAC broadcast to get all the Ip’s, or can you only use MAC broadcast when you have defined the IP?
In short, I don’t understand any of it…
Oh, and the source, I didn’t really wrote it…. (Friend of mine). But I think I’d be able to get it on the net soon. Shall I send the current version? Or should I wait until it works?
Thanx Already,
Jori Huisman
SixFive7
Time to create page: 0.135 seconds