The Broadcast Address

The broadcast address is used to send a packet to every host on a network. The standard broadcast address is composed of the network address and a host address of 255. Given the ifconfig statement shown previously, the default broadcast address is Using the IP address of and the netmask of gives a network address of Add to that the host address of 255 to get So why did I define the broadcast address instead of letting it default? Because you might be surprised by the default broadcast address.

You can check the configuration of an Ethernet interface by using the ifconfig command with only the interface name as a command-line argument. This does not change any configuration values; it displays the values that have already been set. Here is an example:

# ifconfig eth0 netmask

# ifconfig eth0

eth0 Link encap:Ethernet HWaddr 00:60:97:90:37:51 inet addr: Bcast:

Mask: UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:319 errors:0 dropped:0 overruns:0 TX packets:76 errors:0 dropped:0 overruns:0 Interrupt:3 Base address:0x300

In this example, we configure the interface but do not define the broadcast address, expecting that the default will be exactly what we want. Instead, the default appears to ignore the netmask argument, and creates a broadcast address that would be correct if we used the old address class rules. Be specific. There are several files and scripts involved in setting the network interface configuration during the boot. Unless you're specific about it, you might not get the configuration you want.

Was this article helpful?

0 0

Post a comment