Does anyone have a simple way to convert IPv6 addresses to dotted decimal notation?
I am currently using a pretty ugly python script which:
- Converts the IPv6 address to exploded form
- Splits every 2 hex characters and converts those to decimal
- Joins decimal numbers together with "." and returns the string
The use case for this is for SNMP lookups which as far as I know require dotted decimal notation. Is anyone aware of a simple/pretty solution to this problem?
Input:
2607:f8b0:400a:801::200e
Output:
38.7.248.176.64.10.8.1.0.0.0.0.0.0.32.14