Re: Retrieving MAC address for given IP from BIND server?



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

.



Relevant Pages

  • Re: TCP/IP Urgent help
    ... >> coneect to them in the same subnet. ... >> subnet and connect between them using router, or there is no any Problems ... >> because of Broadcast, if so, and if i made each company to work with its ... > You would set up a server in the head office running DNS (and possibly WINS ...
    (microsoft.public.windowsxp.network_web)
  • Re: ip helper-address... help!
    ... The router "sees" the DHCPDISCOVER packet and forwards it to both ... Why does the client broadcast the ... request instead of unicasting it to the server? ...
    (comp.dcom.sys.cisco)
  • 2 NICs, arpatch reports flip flop (etheral shows the same)
    ... how can i prevent that the IP switches every time from one NIC to the ... The server works fine but a router with arpwatch reports thousands of ...
    (linux.redhat.misc)
  • Re: Need help Find a local Virtual Machine thats sending packets?
    ... guessing its because its using the local host NIC's 10.1.x.x address. ... broadcasts for an IP address, it sends a broadcast but has no IP, ... things to internal server networking. ... Therefore when it reaches the router, ...
    (comp.dcom.sys.cisco)
  • Re: Small Biz server network question
    ... will flash several times. ... This looks like it is a broadcast or something ... of the lights on my switches? ... I want to research this first before I look at the SBS server. ...
    (microsoft.public.windows.server.sbs)