calculate prefix ip, and use it to configure samba.