> On 11/09/09 11:10 AM, Daniel wrote:
> >
> > I have a situation where I'm trying to determine an
> IP address from a mac address on a network that uses
> a DHCP server. I use the following command:
> >
> > arp -a | grep $macAddress | awk "{print $2}"
> >
> > but this is returning multiple addresses. I believe
> what's happening is that we're restarting these hosts
> frequently during testing and the old leases for the
> mac address are not up yet and so there are multiple
> entries in the dhcp table.> You need to make sure that your test hosts shutdown > cleanly and as a > part of that actively release the DHCP address that > they receive from > the DHCP server. Something else is wrong. The DHCP server should return the same IP address each time the host requests one. The DHCP client is supposed to keep track of its lease on an IP address and, as long as that lease hasn't expired, request that same address. The DHCP server is supposed to agree to that request. I wonder if the underlying problem is that the DHCP client on the host is not remembering its lease? In any case, the `dhcpinfo' command run on the host should provide all of the information that it's obtained from the DHCP server. -- This message posted from opensolaris.org _______________________________________________ networking-discuss mailing list [email protected]
