Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

MAC to IP Translation ???

Reply
 
Thread Tools Display Modes
  #1  
Old 07-26-2004, 02:41 PM
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


Sanjeev Kumar
Reply With Quote
  #2  
Old 07-26-2004, 03:58 PM
Overbey
Guest
 
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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  
Old 07-26-2004, 05:03 PM
John Armstrong
Guest
 
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  
Old 07-26-2004, 05:12 PM
Overbey
Guest
 
Posts: n/a
Default Re: MAC to IP Translation ???

Cool --- I had forgotten about the arp and rarp commands.
Thanks
Overbey
"John Armstrong" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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  
Old 07-26-2004, 05:24 PM
James Knott
Guest
 
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  
Old 07-26-2004, 07:53 PM
Moe Trin
Guest
 
Posts: n/a
Default Re: MAC to IP Translation ???

In article <(E-Mail Removed) >,
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  
Old 07-27-2004, 05:16 PM
Juhan Leemet
Guest
 
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

Tags
mac, translation

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 04:07 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.