https://github.com/tes3awy/hex-to-ip-conversion
Convert an IPv4 Address to a HEX IP and vice versa
https://github.com/tes3awy/hex-to-ip-conversion
cisco ciscodevnet hex hex-ips ip-address ipv4 ipv4-address netdevops python python3 vscode
Last synced: 9 days ago
JSON representation
Convert an IPv4 Address to a HEX IP and vice versa
- Host: GitHub
- URL: https://github.com/tes3awy/hex-to-ip-conversion
- Owner: Tes3awy
- License: mit
- Created: 2021-04-15T14:39:29.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-07-20T18:19:19.000Z (almost 3 years ago)
- Last Synced: 2025-01-11T08:51:44.167Z (over 1 year ago)
- Topics: cisco, ciscodevnet, hex, hex-ips, ip-address, ipv4, ipv4-address, netdevops, python, python3, vscode
- Language: Python
- Homepage:
- Size: 78.1 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.python.org/downloads)
[](https://github.com/Tes3awy/HEX-to-IP-Conversion)
[](https://github.com/psf/black)
[](https://pycqa.github.io/isort/)
[](https://github.com/pre-commit/pre-commit)
[](https://github.com/Tes3awy/HEX-to-IP-Conversion)
# Convert IPv4 Address to Hexadecimal Address and vice versa
> This application is useful for Cisco Wireless and Collaboration teams where Hexadecimal Addresses are preferably to be used in DHCP pools option commands.
**DHCP Pools Example**
```powershell
configure terminal
!
ip dhcp pool APs
network 60.0.0.0 255.255.255.0
default-router 60.0.0.1
option 43 hex f104.0a0a.0a0f
exit
!
ip dhcp pool Voice
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
option 150 hex c0a8.0101
lease 86400
exit
!
end
```
## Table of Contents
1. [Getting Started](#getting-started)
2. [Installation on Windows](#installation-on-windows)
3. [Installation on macOs and Linux](#installation-on-macos-and-linux)
4. [Usage](#usage)
### Getting Started
**Directory Structure**
```bash
│ main.py # Main application
│ conversion.py # conversion class
│ README.md
│ requirements.txt
│ .pre-commit-config.yaml
│ .gitignore
│ LICENSE
└───
```
---
### Installation on Windows
```bash
path\to\folder> git clone https://github.com/Tes3awy/HEX-to-IP-Conversion.git
path\to\folder> cd HEX-to-IP-Conversion
path\to\folder> py -m venv .venv
path\to\folder> .venv\Scripts\Activate.ps1
path\to\folder> py -m pip install --upgrade pip setuptools
path\to\folder> py -m pip install -r requirements.txt
```
### Installation on macOS and Linux
```bash
$ git clone https://github.com/Tes3awy/HEX-to-IP-Conversion.git
$ cd HEX-to-IP-Conversion
$ python3 -m venv .venv
$ source .venv/bin/activate
$ python3 -m pip install --upgrade pip setuptools
$ python3 -m pip install -r requirements.txt --upgrade
```
---
### Usage
```bash
(.venv)$ python -m main
[1] IPv4 to Hex
[2] Hex to IPv4
Enter 1 or 2 [Default 1]:
```