/31 has the problem that only two addresses exist and the first is the network address and the second one is the broadcast address. There is no room to fit a host address and both setport.sh and interfaces.php do validate this in the IPv4 case.