Broadcast address specification
Mon, 25 Jun 2001 12:52:07 +0200
> while setting up a firewall for two nets, one on a 2.2 kernel and the
> other on a 2.4, I've found out I don't know exactly how to specify a
> broadcast address for the rules, so I guess I'll ask out.
> My questions:
> a) If I'm sending packets to 192.168.1.0/24, my log says that destination
> is 192.168.1.255. What address specification do I use? 192.168.1.255?
The broadcast address has all the host bits set to one. For the network
192.168.1.0/24, the broadcast address is therefore 192.168.1.255. If you
specify 192.168.1.0/24, any IP address from 192.168.1.0 to 192.168.1.255
> b) Same case for network 188.8.131.52/29. What do I specify? Exactly
> that? I have a feeling it doesn't work, but I haven't been getting enough
> sleep lately..
The broadcast address of that network is 184.108.40.206, I believe. 29 bits
of subnet mask leave three bits of host address, ranging from 0 to 7. 7 + 56