How to check if eth address is taken from DHCP or set manually (static) using Python?
Tell me more
×
Ask Ubuntu is a question and answer site for
Ubuntu users and developers. It's 100% free, no registration required.
|
|
I think it's going to depend on how the network is configured. Network connections in Ubuntu are either configured for the computer, or by the individual user through Network Manager (that little network icon in your notification area). Servers are generally configured system-wide from If it's a system-wide configuration, you can parse If the network was configured by Network Manager on the desktop, you can interface with it. You can find an example Python script that prints connections from the Network Manager examples. There might be a lower-level way of finding out whether any particular interface is dhcp, but I don't know of it. |
|||
|
|