fix from_net to match the cisco format

The cisco is expecting the netmask inverted, this branch fixes the code and the tests.