Quantcast
Channel: THWACK: All Content - Network Performance Monitor
Viewing all articles
Browse latest Browse all 21870

Converting dotted decimal into IPv6 address

$
0
0

On Juniper routers they have vendor-specific traps for BGP and IPv6. One of the varbinds look like this:

jnxBgpM2PeerRemoteAddr.0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.38.7.250.120.0.0.0.0.0.0.0.0.0.0.120.28= 38.7.250.1​20

 

this bit:

38.7.250.120.0.0.0.0.0.0.0.0.0.0.120.28

should get translated thus:

 

387250120000000000012028
2607FA7800000000000000000000781C

Which is the IPv6 address of a router.

 

Anyone suggest any incantation to convert from the dotted-decimal to the HEX version?

 

[note I'm almost certain the oidValue is being truncated to 4 bytes since the trap knows this is an IP address and assumes that it's an ipv4 addresses]

 

Thanks



Viewing all articles
Browse latest Browse all 21870

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>