Settings

Theme

Node.example.com Is an IP Address

tuckersiemens.com

20 points by nfrmatk 5 years ago · 8 comments

Reader

ukblewis 5 years ago

This is a rather clickbaiting title... in truth it’s just that Python 2 doesn’t differentiate between strings and raw bytes by default. Nothing to do with IP (v4 or v6) addresses or the string “node.example.com”

  • nfrmatkOP 5 years ago

    Personally, I reserve "clickbait" for links with no substance or value on the other side of the click, but I understand what you mean.

    Yes, the intent of the title is to get your attention, but I'm not trying to get you to buy anything, collecting or selling user data, etc.

    I really just wrote the post to share a debugging experience I had this year. It doesn't have to do with IPv{4,6} addresses themselves or any specification thereof, but it does relate to the Python 2 `ipaddress` library's handling of them and a pitfall you can accidentally find yourself in.

    A dry, but more accurate title might have been

    > Python 2's ipaddress library considers "node.example.com" an IPv6 Address

gotem 5 years ago

Doesn't look like it. No results for the following:

https://whatismyipaddress.com/search-results?q=node.example....

tutfbhuf 5 years ago

TL;DR Node.example.com is an IPv6 adresss.

  • utborin 5 years ago

    Because it’s 16 bytes, and in Python 2 strings were just bytes, so any 16-byte string could be interpreted as an IPv6 address.

    Doh.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection