Update mhc.py

adding auto ip address config. need to test on linux.