1. install python devpython
sudo apt-get install python-devcode
2.download src code and installip
https://pypi.python.org/pypi/netifaces/get
2.get ip,mac,netmask,gatewayimport
import netifacesim
netifaces.interfaces()apt-get
netifaces.gateways()co
https://pypi.python.org/pypi/netifacessudo