Re: [Linux-decnet-user] MAC Address Calculations
Brought to you by:
chrissie_c,
ph3-der-loewe
|
From: Patrick C. <pa...@ty...> - 2002-07-25 10:39:06
|
On Thu, Jul 25, 2002 at 11:26:12AM +0100, Nick Holder wrote: > Hi all, > > *Newbie Alert* > > I am having trouble working out the MACADDR for a given Node > > >From http://linux-decnet.sourceforge.net/faq-single.html I got that > MACADDR=AA:00:04:00:0A:04 = 1.10 > > And from http://linux-decnet.sourceforge.net/kernel.html I got The form of a > DECnet physical address is AA:00:04:00:XX:XX The last two hex digits codify > the DECnet node address. > > So MACADDR=AA:00:04:00:0A:04 > > 0A = 10 - That I can get simple Hex-Dec convert > > However > > 04 = 1 - That I can't work out It's because the last two hex digits are actually a 16bit number with the address taking up 10 bits and the area the remaining six. so 1.10 is actually: 000000 00 00000000 000001 00 00001010 4 A > Can anyone help me get my brain arround it (and if someone wants to work out > 5.400 I'd be most greatful *Grin*) so. 5.400 would be 000101 01 10010000 15 90 thence: AA:00:04:00:90:15 (cos it's in little-endian format) There's a script in app/setether.sh that will do this for you (it's what I used for the Debian startups). patrick |