Skip to content
Migrate data from phpIPAM to Device42
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Device42 is a comprehensive data center inventory management and IP Address management software that integrates centralized password management, impact charts and applications mappings with IT asset management.

This repository contains sample script to take Inventory information from a PHPIPAM install and send it to Device42 appliance using the REST APIs.


* The script assumes that you are running PHPIPAM 1.2.1 and above
* This script works with Device42 and above


* python 2.7.x
* netaddr (you can install it with pip install netaddr)
* pymysql (you can install it with pip install pymysql)
* requests (you can install it with pip install requests or apt-get install python-requests)
* allow remote connections to PHPIPAM MySQL port 3306


* rename conf.sample to conf
* in conf add D42 URL/credentials
# ====== Device42 upload settings ========= #
D42_USER = 'device42 user'
D42_PWD = 'device42 password'
D42_URL = 'https:// device42 server IP address'
* in conf add PHPIPAM DB info/credentials
# ====== MySQL Source (PHPIPAM) ====== #
DB_IP = 'phpipam server IP'
DB_PORT = 'phpipam database port'
DB_NAME = 'phpipam database name'
DB_USER = 'phpipam database user'
DB_PWD = 'phpipam database password'
* in conf adjust log settings
# ====== Log settings ==================== #
LOGFILE = 'migration.log'
STDOUT = False  # print to STDOUT
DEBUG = True  # write debug log
DEBUG_LOG = 'debug.log'

Run the script and enjoy! (python If you have any questions - feel free to reach out to us at support at


* Script runs on Linux and Windows


* Understandable device types : 'physical', 'virtual', 'blade', 'cluster', 'other'.
* Understandable IP types : 'static', 'dhcp', 'reserved'.
* If type not understandable, 'default' type inserted into D42.
* Order of function calls in main() function is important. Do not change it!
  For example: subnets must be migrated before IP addresses in order for addresses to join appropriate subnets.
You can’t perform that action at this time.