I need to get a new address from the DHCP server. As I understand it, you need to delete your current ip and wait (and it’s better to request) until the router issues a new address. Tell me how to do it on python.

  • It is not entirely clear what you are doing on the python. But, for example, on Windows such a procedure looks like this: ipconfig /release - release the address; ipconfig /renew - request a new one. - de_frag
  • @defrag is in my ubuntu, and what will you do if you have several connections to the network? - SkiF
  • @defrag writing tests on python - SkiF
  • four
    to python, the question is irrelevant. Perhaps the question should be: how to execute the OS command in python. - vadim vaduxa
  • @SkiF ubuntu: sudo dhclient -r eth0 - free eth0; get new - sudo dhclient eth0 - de_frag

0