import socket


def get_local_network(private=False, subnet=100):
  """
  Returns the IP address of the local network
  
  Defaults to the local area network.  If 'private", defaults to '100' for
  the ROACH network.
  """
  if private:
    IP = socket.gethostbyname("192.168."+str(subnet)+".1")
  else:
    IP = socket.gethostbyname(socket.gethostname())
  return '.'.join(IP.split('.')[:-1])