there are different ways of getting a new ip address. one of them is called bootstrap protocol (usually shortened to bootp). the device that needs a new address, does not know what network it is in, so it uses an ip address of all zeroes (0.0.0.0) which it sends as a broadcast to the current network, on a special port. in addition, it sends the mac address of the network card, plus a 4 byte random number. the bootp server will send a reply, also as broadcast, addressed to a different port. the reply will contain the mac address of the client, the random number, and the ip address of the client. when the client receives the data, it will set the address specified. if the bootp server is configured that way, it will also send the ip address and hostname of the bootp server, the name and path to a file which should be loaded to boot the client (using tftp) or the name of a directory, which the client should mount using nfs.