[Malvern] DHCP versus static.
Stefan Szwarnowski
st at sszw.eclipse.co.uk
Wed Mar 1 22:23:09 GMT 2006
On Monday 27 February 2006 11:41, Geoff Bagley wrote:
> I am still trying to get a better understanding of Ethernet.
>
> Do you guys prefer to use Static IP addresses on your LAN, or do you
> prefer DHCP ?
>
> Can you read out the MAC number of another host (that being invariable) ?
> A bit like pinging, but more specific and informative.
>
> By the way, some outfit in Hunan, China, keeps probing my system
> (unsuccessfully) !
We're using DHCP entirely on our LAN with mixture of static and dynamic
assignments. ISC dhcpd running on an old PC is used as the DHCP server.
Desktop computers get a static assignment through an entry in /etc/dhcpd.conf
with their MAC address and hostname/IP. There is also a dynamic IP pool and
this has been setup for Wireless LAN users (mostly the neighbours :-).
You can determine a machines IP address by pinging it as usual and then
running /sbin/arp. This will get you the kernel's IP<->MAC address table. You
might want to try the 'arping' package; this functions in a similar way to
the standard ping application but uses ARP instead of ICMP.
Here's an example of pinging a host on my LAN. Unlike the '/sbin/arp' method
above, you will need to run this as root though.
----------
# arping access-rtr
ARPING 192.168.0.1
60 bytes from 00:01:42:33:24:1e (192.168.0.1): index=0 time=1.501 msec
60 bytes from 00:01:42:33:24:1e (192.168.0.1): index=1 time=1.507 msec
60 bytes from 00:01:42:33:24:1e (192.168.0.1): index=2 time=1.557 msec
60 bytes from 00:01:42:33:24:1e (192.168.0.1): index=3 time=1.506 msec
--- 192.168.0.1 statistics ---
4 packets transmitted, 4 packets received, 0% unanswered
----------
If you're using debian 'apt-get arping' otherwise get it here
http://freshmeat.net/projects/arping/
Hope that helps,
Stefan.
More information about the Malvern
mailing list