MAC to IP Translation ???

This is a discussion on MAC to IP Translation ??? within the Linux Networking forums, part of the Linux Forums category; Hi, I would appreciate if someone can guide me towards MAC Address to IP Address Translation. Source code, preferably in ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-26-2004
Sanjeev Kumar
 
Posts: n/a
Default MAC to IP Translation ???

Hi,
I would appreciate if someone can guide me towards MAC Address to IP
Address Translation. Source code, preferably in C or VC++ or Win32 API
will be very helpful.

TIA,
Sanjeev Kumar
http://www.coolcampus.8k.com
Reply With Quote
  #2 (permalink)  
Old 07-26-2004
Overbey
 
Posts: n/a
Default Re: MAC to IP Translation ???

I may be mistaken - but I do not think that there is such a thing --- if
there is or if you find one or write one please forward a copy to me.
The MAC address is hard-coded by the manufacture, where the IP is assigned
more or less adhoc by anyone at any time.
If my understanding is incorrect - someone please correct me, but this is
how I understand it.

Overbey


"Sanjeev Kumar" <sanjeev.magoo@gmail.com> wrote in message
news:748cedc2.0407260541.60a201dd@posting.google.c om...
> Hi,
> I would appreciate if someone can guide me towards MAC Address to IP
> Address Translation. Source code, preferably in C or VC++ or Win32 API
> will be very helpful.
>
> TIA,
> Sanjeev Kumar
> http://www.coolcampus.8k.com



Reply With Quote
  #3 (permalink)  
Old 07-26-2004
John Armstrong
 
Posts: n/a
Default Re: MAC to IP Translation ???

On 26 Jul 2004 06:41:54 -0700, Sanjeev Kumar wrote:

> Hi,
> I would appreciate if someone can guide me towards MAC Address to IP
> Address Translation. Source code, preferably in C or VC++ or Win32 API
> will be very helpful.
>
> TIA,
> Sanjeev Kumar
> http://www.coolcampus.8k.com


"arp -n" will give a table of IP addresses and MAC addresses, so maybe a
look at the source for that will give you an idea.
Reply With Quote
  #4 (permalink)  
Old 07-26-2004
Overbey
 
Posts: n/a
Default Re: MAC to IP Translation ???

Cool --- I had forgotten about the arp and rarp commands.
Thanks
Overbey
"John Armstrong" <ja@localhost.localnet> wrote in message
news:eov7w7m3gpbx.dlg@ggrove.plus.com...
> On 26 Jul 2004 06:41:54 -0700, Sanjeev Kumar wrote:
>
> > Hi,
> > I would appreciate if someone can guide me towards MAC Address to IP
> > Address Translation. Source code, preferably in C or VC++ or Win32 API
> > will be very helpful.
> >
> > TIA,
> > Sanjeev Kumar
> > http://www.coolcampus.8k.com

>
> "arp -n" will give a table of IP addresses and MAC addresses, so maybe a
> look at the source for that will give you an idea.



Reply With Quote
  #5 (permalink)  
Old 07-26-2004
James Knott
 
Posts: n/a
Default Re: MAC to IP Translation ???

Sanjeev Kumar wrote:

> Hi,
> I would appreciate if someone can guide me towards MAC Address to IP
> Address Translation. Source code, preferably in C or VC++ or Win32 API
> will be very helpful.
>
> TIA,
> Sanjeev Kumar
> http://www.coolcampus.8k.com


Do you understand what you're asking for??? An analogy would be the
relationship between phone numbers and street addresses.

There is absolutely no relationship between a MAC address and an IP address,
except as implemented on a network. The MAC addresses should be considered
a random number, though NICs purchased from a single vendor may have
similar MACs. An IP address is assigned to an interface. In that manner
alone, is a relationship between MAC & IP and it will change, as soon as
either the NIC or IP address is changes. You can determine the current
relationship on a network, by examining the arp cache or by using a network
analyzer. Incidentally, a MAC address is irrelevant beyond the local
network. That is, as soon as a packet passes through a router, the MAC
from the originating computer will be replaced by that of the router and
this will be repeated at every router along the path to the destination.


--

(This space intentionally left blank)
Reply With Quote
  #6 (permalink)  
Old 07-26-2004
Moe Trin
 
Posts: n/a
Default Re: MAC to IP Translation ???

In article <748cedc2.0407260541.60a201dd@posting.google.com >,
Sanjeev Kumar wrote:
>Hi,
>I would appreciate if someone can guide me towards MAC Address to IP
>Address Translation.


Did you install the Linux kernel source?

>Source code, preferably in C


locate arp.c
locate arp.h

>or VC++ or Win32 API will be very helpful.


Wrong news group.

Old guy
Reply With Quote
  #7 (permalink)  
Old 07-27-2004
Juhan Leemet
 
Posts: n/a
Default Re: MAC to IP Translation ???

On Mon, 26 Jul 2004 14:58:56 +0000, Overbey wrote:
> I may be mistaken - but I do not think that there is such a thing --- if
> there is or if you find one or write one please forward a copy to me.
> The MAC address is hard-coded by the manufacture, where the IP is assigned
> more or less adhoc by anyone at any time.
> If my understanding is incorrect - someone please correct me, but this is
> how I understand it.


There are a number of services that can do the lookup, usually for booting
up workstations, esp. diskless workstations (in the old days) or for doing
network installs, etc. Do some research on DHCP, bootparamd, bootp, etc.
The usual sequence is that the workstations sends its MAC address, often
in a broadcast. A server running one of the appropriate services
(does a table/file lookup and) sends back the IP address that the
workstation is supposed to use, together with some parameters (required
for booting and/or installation), and (if appropriate) a kernel to boot.

e.g. Sun workstations can do a network boot/install from ROM.
PCs can do network boot/install but that usually requires boot from floppy.

--
Juhan Leemet
Logicognosis, Inc.

Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:51 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0