In addition to the client IPv4 address, a DHCP server can offer a number of options. Nearly always included are subnet mask (0x01), router (0x03), domain name server (0x06).
The subnet mask defines the size of the local subnet. It defines how many bits belong to the subnet address aka prefix. The rest of the 32-bit IP address is used for host-specific addresses. If the subnet mask isn't configured by DHCP it needs to be configured locally.
The size of the local subnet is important for a client. Destinations inside the local subnet can be talked to directly - commonly using Ethernet L2 frames. Destinations outside the local subnet require the use of a gateway aka router.
All bits in the host-specific part set to 1
is the directed broadcast address of the subnet (e.g. x.y.z.255
for the x.y.z.0/24
subnet). A limited broadcast is simpler, it's always 255.255.255.255
. It has the same reach as a directed broadcast but is generally not forwarded across routers.
Broadcast domain is a term used for the reach of a layer-2 network. That domain is limited by the physical and logical connections in a network (e.g. all ports connected to a switch, interconnected switches or a VLAN).
An IP broadcast uses the layer-2 broadcast mechanism for delivery and usually has the exact same size, sometimes they do differ.