Networking Forums

Networking Forums > Computer Networking > Linux Networking > MAC to IP Translation ???

Reply
Thread Tools Display Modes

MAC to IP Translation ???

 
 
Sanjeev Kumar
Guest
Posts: n/a

 
      07-26-2004, 01:41 PM
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
 
 
 
 
Overbey
Guest
Posts: n/a

 
      07-26-2004, 02:58 PM
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
 
John Armstrong
Guest
Posts: n/a

 
      07-26-2004, 04:03 PM
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
 
Overbey
Guest
Posts: n/a

 
      07-26-2004, 04:12 PM
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
 
James Knott
Guest
Posts: n/a

 
      07-26-2004, 04:24 PM
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
 
Moe Trin
Guest
Posts: n/a

 
      07-26-2004, 06:53 PM
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
 
Juhan Leemet
Guest
Posts: n/a

 
      07-27-2004, 04:16 PM
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Port Translation via iptables? d a v i d Linux Networking 1 04-19-2007 08:17 PM
Translation please? Les Hemmings Broadband 11 10-21-2006 11:05 AM
tcp checksum after port translation Giacomo Linux Networking 0 09-14-2005 06:31 PM
Subnet and address translation Rajat Linux Networking 0 01-10-2005 04:12 AM
Port Address Translation Sherwin Windows Networking 8 01-06-2004 06:27 AM



1 2 3 4 5 6 7 8 9 10 11