[Winpcap-users] non-network bits set in '172.16.243.240 mask 255.255.255.0"

Guy Harris guy at alum.mit.edu
Tue Jan 17 01:48:32 PST 2012


On Jan 17, 2012, at 1:41 AM, WeiJie Royce wrote:

> I tired to filter using net 172.16.243.240 mask 255.255.255.0 and it prompt me this error. What's happening?
> 
> non-network bits set in '172.16.243.240 mask 255.255.255.0"

What's happening is that the network address 172.16.243.240, i.e. 0xAC.0x10.0xF3.0xF0 has bits that are clear in the network mask 255.255.255.0, i.e. 0xFF.0xFF.0xFF.0x00.

Try

	net 172.16.243.0 mask 255.255.255.0

If the netmask truly is 255.255.255.0, a network of 172.16.243.0 is the same as a network of 172.16.243.1 is the same as a network of 172.16.243.2 ... is the same as a network of 172.16.243.239 is the same as a network if 172.16.243.240 is the same as a network of 172.16.243.241 ....  I.e., the network is really 172.16.243.0.

WinPcap is warning you that the network can't possibly really be 172.16.243.240 if the netmask is 255.255.255.0, as the hosts on that network could have addresses between 172.16.243.1 and 172.16.243.254.  (Libpcap, not surprisingly, produces the exact same warning, as the code that produces it is exactly the same.)


More information about the Winpcap-users mailing list