Distributed entanglement and teleportation on a quantum network