How to apply an Group Policy only to Clients in a specific IP range? (using WMI Filter)

I need to apply a GPO only to some computers in a specific network range.

I'm aware that there many other solutions for this issue. I could group them into an OU or use Sites. But the current situation doesn't allow me to act in any other way except to determine if the IP address of the client is in a specific network.

Therefore I assumed I could use a WMI filter and I asked my good friend Google for help: I found http://waynes-world-it.blogspot.ch/2008/03/wmi-filter-for-subnet-filtered-group.html but

Select * FROM Win32_IP4RouteTable
WHERE ((Mask='255.255.255.255' AND NextHop='127.0.0.1')
AND (Destination Like '10.31.%'))

doesn't seem to work. The policy isn't applied to any computer due to the filter. Can anyone give me hint how this could be solved?

Thank you very much


Got it:

SELECT * from Win32_IP4RouteTable 
       WHERE ((Mask='0.0.0.0' AND NextHop LIKE '10.31.%'))

Works perfect. Seems the sample is either wrong or at least not applicable to Windows Server 2008 R2