Re: Retrieving MAC address for given IP from BIND server?
- From: ibuprofin@xxxxxxxxxxxxxxxxxxxxxx (Moe Trin)
- Date: Fri, 17 Nov 2006 19:09:51 -0600
On 16 Nov 2006, in the Usenet newsgroup comp.unix.admin, in article
<1163706325.946488.85110@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, andrejohn.mas@xxxxxxxxx
wrote:
Part of my confusion with BIND, is that I thought it included DHCP
server support.
That's possible, but it's not a "standard feature". You've just
discovered another major problem about using DHCP, never mind all of
the security issues.
Certainly I would need to speak to the DHCP server to ask for that
information though how I would do that I am sure, which is really where
I need the help. If you can help me there I would certainly appreciate
the help.
Actually, that may be of little use anyway. For any packet to be
transmitted in _unicast_ mode, the local sending station (probably
a router in this case) has to know the MAC <-> IP mapping. This data
would be in the ARP cache on the router. Problem is, ARP data is supposed
to expire off the cache after a period of inactivity. RFC1122 Section
2.3.2.1 speaks of a timeout on the order of one minute, but most routers
use a substantially longer interval - perhaps up to an hour or two. If
the hosts ARP entry has expired off the cache, then the router must ARP
to obtain the "current" MAC/IP relationship. Your sleeping host will not
respond to that, and the router can not send a unicast. If you are using
a switched network, your Ethernet switches may also have an MAC cache for
traffic isolation. You can set up a static MAC/IP file, which means
that the individual host must obtain the same address each time it
contacts the DHCP server, but in that case why not set configure the hosts
to a static configuration and get rid of the DHCP service entirely.
The reason I also wanted the IP addresses is that it would mean I would
not need to broadcast the packets, since from my tests there is no
gurantee the broadcast will always reach the right computer. It is
possible that I am doing something wrong with the way I am doing the
broadcast.
That's a function of the networking setup. Today, most people drop
packets to broadcast addresses at routers as a defense against Denial
Of Service attacks. This may also be the case on your Ethernet switches.
Of course the use of an IP address for a computer assumes a) the lease
is for more than a few days and b) the computer has not released its
lease
Ah, but you forgot about the ARP cache in the routers.
The way we implemented this was a simple server daemon on each subnet that
the luser can connect to and send a "wake up $MYBOX" command. While our
routers all drop packets sent to local broadcast addresses, our switches
don't, so the server merely executes a 'ping -c 3 -s 240 -p $MAC_ADDRESS
$LOCAL_BROADCAST' (for example 'ping -c 3 -s 240 -p 080020ea5fcc
192.0.2.255') which sends an ICMP packet to the subnet broadcast address
(which all of our systems ignore by default) that contains the magic
(at least) 16 repetitions of the target MAC address. We send it three
times in case it gets dropped by the switch due to other traffic. Note
that this should also be able to work on a DHCP setup if the local server
has a current 'hostname <-> MAC' table.
Old guy
.
- References:
- Retrieving MAC address for given IP from BIND server?
- From: andrejohn . mas
- Re: Retrieving MAC address for given IP from BIND server?
- From: Mark Rafn
- Re: Retrieving MAC address for given IP from BIND server?
- From: andrejohn . mas
- Retrieving MAC address for given IP from BIND server?
- Prev by Date: Re: Retrieving MAC address for given IP from BIND server?
- Next by Date: Re: test
- Previous by thread: Re: Retrieving MAC address for given IP from BIND server?
- Next by thread: Re: test
- Index(es):
Relevant Pages
|