Networking Forums

Networking Forums > Computer Networking > Linux Networking > Virtual MAC/ IP Address calculation

Reply
Thread Tools Display Modes

Virtual MAC/ IP Address calculation

 
 
Peter Weiss
Guest
Posts: n/a

 
      11-25-2005, 03:00 PM
Hi,

we are setting up a virtual server farm using xen virtualization.

Each instance needs to have an own ethernet and ip address. We'd like to use
the reserved range ACE:48 for the mac addresses.

I'm looking for a way to calculate the IP address from the mac address and
vice versa. For the ethernet address there are 3 bytes remaining but an
IP-address is 4 bytes long. Is there any compression algorithm or something
out there that can be used to solve this?

TIA -- Peter

--
(E-Mail Removed) ConSol* Software GmbH
Phone +49 89 45841-100 Consulting & Solutions
Mobile +49 177 6040121 Franziskanerstr. 38
http://www.consol.de D-81669 München
 
Reply With Quote
 
 
 
 
James Knott
Guest
Posts: n/a

 
      11-26-2005, 11:36 AM
Peter Weiss wrote:

> Hi,
>
> we are setting up a virtual server farm using xen virtualization.
>
> Each instance needs to have an own ethernet and ip address. We'd like to
> use the reserved range ACE:48 for the mac addresses.
>
> I'm looking for a way to calculate the IP address from the mac address and
> vice versa. For the ethernet address there are 3 bytes remaining but an
> IP-address is 4 bytes long. Is there any compression algorithm or
> something out there that can be used to solve this?
>


If you're configuring your MAC addresses, why not just incorporate the last
three bytes of IP address as the last three bytes of the MAC? The first
byte of the IP address should be the same for your entire network, no
matter what IP address range you use, unless you've got more than 16
million "computers".

As for your question about an algorithm, it's impossible for 32 arbitrary
bits to be reduced to 24 bit numbers and be guaranteed that they're all
unique.
 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      11-26-2005, 07:17 PM
On Fri, 25 Nov 2005, in the Usenet newsgroup comp.os.linux.networking, in
article <(E-Mail Removed)>, Peter Weiss wrote:

>Each instance needs to have an own ethernet and ip address. We'd like to
>use the reserved range ACE:48 for the mac addresses.


[compton ~]$ etherwhois ACE:48
AC-DE-48 (hex) PRIVATE
ACDE48 (base 16)
[compton ~]$ zgrep -c ' PRIVATE$' MACaddresses.gz
79
[compton ~]$

It's not really "reserved" so much as assigned to an entity that has
requested IEEE not to publish their name and address. ('etherwhois' is a
local script that queries a copy of MACaddresses.gz obtained from IEEE
early in October.))

>I'm looking for a way to calculate the IP address from the mac address
>and vice versa. For the ethernet address there are 3 bytes remaining but
>an IP-address is 4 bytes long.


Grab a text book on how 'Multicast' works - the relationship between the
low 23 bits of 224.0.0.0/4 and 01:00:5e:

But why do you care? You're not going to be putting packets out onto
the Internet (because IANA hasn't assigned 0.0.0.0/0 to you), _AND_
that MAC addresses are "local" to the collision domain - once you hit
a router, they're meaningless. For that matter:

[compton ~]$ zgrep -c '^ACDE' MACaddresses.gz
1
[compton ~]$

>Is there any compression algorithm or something out there that can be
>used to solve this?


You wanna think about that for a minute? You have 4294967296 people you
want to give an individual number out of a pool of 16777216 Looks to
me that each number must be shared by 256 people. Ain't gonna work.

Old guy
 
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
bind outgoing mail connects to virtual ip address? Jack Snodgrass Linux Networking 4 03-13-2008 02:52 PM
virtual IP address - ssh problem Eggert Ehmke Linux Networking 2 12-13-2006 01:56 PM
Speed Calculation Badass Scotsman Home Networking 5 05-11-2006 07:57 PM
dBi Calculation Question Rob D Wireless Internet 2 02-14-2005 08:28 AM
Adding Virtual IP Address Vijay Linux Networking 5 05-25-2004 03:36 PM



1 2 3 4 5 6 7 8 9 10 11