On Tuesday 23 Mar 2004 9:20 pm, rikona wrote:
> Hello newbie,
>
> I need to convert a number of IP addresses back and forth from
> nnn.nnn.nnn.nnn form to xx:xx:xx:xx:xx:xx form. Does anyone know of a
> calculator on- or off-line to do this?

You are mistaken.
nnn.nnn.nnn.nnn is an IP (version 4) address.
xx:xx:xx:xx:xx:xx is an Ethernet address.

They have no relationship except that in a working system they are 
(usually) paired together.

The IP address refers to the address of the machine through a particular 
network port.

The Ethernet address refers to a particular network card.

In fact, IIRC, Linux can bond multiple network cards onto the same IP 
address. It is rare though.

Here is a bash script to convert IP addresses to Ethernet addresses, so 
long as the machine in question is accessible on the network at the 
time the script is run.

The reverse conversion is always problematic - and is usually the one 
you want to do. It most cases it becomes a matter of walking from one 
machine to the next checking the ethernet address of each.

-- 
Richard Urwin

Attachment: ip2ether
Description: application/shellscript

____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to