A broadcast address is a
network address used to transmit to all devices connected to a multiple-access
communications network. A message sent to a broadcast address may be received by all network-attached hosts.
In contrast, a
multicast address is used to address a specific group of devices, and a
unicast address is used to address a single device.
For
network layer
In the seven-layer OSI model of computer networking, the network layer is layer 3. The network layer is responsible for packet forwarding including routing through intermediate Router (computing), routers.
Functions
The network layer provides t ...
communications, a broadcast address may be a specific
IP address
An Internet Protocol address (IP address) is a numerical label such as that is assigned to a device connected to a computer network that uses the Internet Protocol for communication. IP addresses serve two main functions: network interface i ...
. At the
data link layer
The data link layer, or layer 2, is the second layer of the seven-layer OSI model of computer networking. This layer is the protocol layer that transfers data between nodes on a network segment across the physical layer. The data link layer p ...
on
Ethernet
Ethernet ( ) is a family of wired computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in 198 ...
networks, it is a specific
MAC address
A MAC address (short for medium access control address or media access control address) is a unique identifier assigned to a network interface controller (NIC) for use as a network address in communications within a network segment. This use i ...
.
IP networking
In Internet Protocol version 4 (
IPv4
Internet Protocol version 4 (IPv4) is the first version of the Internet Protocol (IP) as a standalone specification. It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. ...
) networks, broadcast addresses are special values in the host-identification part of an
IP address
An Internet Protocol address (IP address) is a numerical label such as that is assigned to a device connected to a computer network that uses the Internet Protocol for communication. IP addresses serve two main functions: network interface i ...
. The all-ones value was established as the standard broadcast address for networks that support broadcast. This method of using the all-ones address was first proposed by R. Gurwitz and R. Hinden in 1982. The later introduction of
subnets and
Classless Inter-Domain Routing
Classless Inter-Domain Routing (CIDR ) is a method for allocating IP addresses for IP routing. The Internet Engineering Task Force introduced CIDR in 1993 to replace the previous classful network addressing architecture on the Internet. Its goal ...
changed this slightly, so that the all-ones value becomes the local broadcast address and the all-ones host address of each subnet is that subnet's directed broadcast address.
The directed broadcast address for any IPv4 host can be obtained by taking the
bit complement (bitwise NOT) of the ''subnet mask'' and then performing a
bitwise OR
In computer programming, a bitwise operation operates on a bit string, a bit array or a binary numeral (considered as a bit string) at the level of its individual bits. It is a fast and simple action, basic to the higher-level arithmetic opera ...
operation with the host's IP address. A shortcut to this process (for common masks using only 0 and 1 bit placements) is to simply take the host's IP address and set all bits in the ''host identifier'' portion of the address (any bit positions which hold a 0 in the subnet mask) to 1.
As shown in the example below, in order to calculate the directed broadcast address to transmit a packet to an entire IPv4 subnet using the
private IP address space , which has the subnet mask , the broadcast address is calculated as bitwise ORed with = . Directed broadcasts always work within a subnet but, for security reasons, many routers disable the forwarding of these by default.
A special definition exists for the IP address . It is the broadcast address of the ''zero network'' or , which in Internet Protocol standards stands for ''this network'', i.e. the local network. Transmission to this address is limited by definition, in that it is never forwarded by the routers connecting the local network to other networks.
IP broadcasts are used by
BOOTP and
DHCP clients to find and send requests to their respective servers.
Internet Protocol version 6 (
IPv6
Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communication protocol, communications protocol that provides an identification and location system for computers on networks and routes traffic ...
) does not implement this method of broadcast, and therefore does not define broadcast addresses. Instead, IPv6 uses
multicast addressing to the ''all-hosts'' multicast group. No IPv6 protocols are defined to use the all-hosts address, though; instead, they send and receive on particular link-local multicast addresses. This results in higher efficiency because network hosts can filter traffic based on multicast address and do not need to process all broadcasts or all-hosts multicasts.
Ethernet
Broadcast is possible also on the underlying
data link layer
The data link layer, or layer 2, is the second layer of the seven-layer OSI model of computer networking. This layer is the protocol layer that transfers data between nodes on a network segment across the physical layer. The data link layer p ...
in
Ethernet
Ethernet ( ) is a family of wired computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in 198 ...
networks. Frames are addressed to reach every computer on a given LAN segment if they are addressed to
MAC address
A MAC address (short for medium access control address or media access control address) is a unique identifier assigned to a network interface controller (NIC) for use as a network address in communications within a network segment. This use i ...
. Ethernet frames that contain IP broadcast packages are usually sent to this address.
Ethernet broadcasts are used, among other purposes, by
Address Resolution Protocol to resolve IP addresses to MAC addresses.
IPX networking
Internetwork Packet Exchange (IPX) allows broadcast. A packet with ''network number'' of
FFFFFFFF is sent to all networks available. When the ''node number'' is specified as
FFFFFFFFFFFF, the packet is intended to be received by all hosts in the network.
AppleTalk
The
AppleTalk protocol allows broadcast. When the node ID is specified as
255, a packet is sent to all networks available.
See also
*
Default gateway
A default gateway is the node in a computer network using the Internet protocol suite that serves as the forwarding host ( router) to other networks when no other route specification matches the destination IP address of a packet.
Role
A gatew ...
*
UDP Helper Address, a router configuration to forward broadcast network traffic across subnet boundaries
References
{{reflist
Network addressing
de:Broadcast
fr:Broadcast
pl:Broadcast