I use my computer to communicate with a piece of hardware via ethernet. To communicate with this device I set my ip to 192 168 0 11, subnet mask to 255 255 255 0, and defaul
Actually very simple to do (windows only) (uses preinstalled libraries only):
import os; os.system("ipconfig /renew")