Improve IPv4 and IPv6 scheme for mesh networking