I've write two posts about how to get the IP address of the Raspberry Pi the first time is connected to the network (or any host on the network, in fact). But, what if you don't want to use a IP address and use something more human friendly to reference you RaspPi?

If you want to do so, you need to install avahi-daemon packet. If you install this packet in both Rasperry Pi and you laptop/computer you will be able to make:

$ ping raspberrypi.local  
PING raspberrypi.local (192.168.0.16) 56(84) bytes of data.  
64 bytes from sam (192.168.0.16): icmp_req=1 ttl=64 time=2.48 ms  
64 bytes from sam (192.168.0.16): icmp_req=2 ttl=64 time=2.56 ms

Avahi will use the fiticious TLD ".local" and will make multicast DNS requests (mDNS) asking something like "ei! who is the raspberrypi host name?". The Raspberry will receive this packet and will respond to it giving it IP address. This way, if you router gives always different IPs via DHCP you will be able to know the IP of your RaspPI just making a ping.

Of course if you want to ping you laptop from the RaspPI you only needs to know what's the name of the laptop hostname. You can know it by executing "hostname" command and imagine that the result is "homelaptop". Now, from you Raspberry Pi you will be able to do:

$ ping homelaptop.local

Easy tip, but very useful. Take care.