Hacker News new | ask | show | jobs
by larschdk 1373 days ago
This is just a convention from BSD, and is not even POSIX compliant. However, 'ping 1.1' is a convenient shortcut (actually pings 1.0.0.1). iproute2 and systemd do not use inet_aton and don't follow this BSD4.2 convention and instead parse it as '1.1.0.0' or not at all.
4 comments

I saw someone ping 127.1 a while back and I was so surprised I didn't know about this even after a few years in networking in the past.
Someone once showed me telnet 0 80. Lots of things should resolve.
(Not to pick on your particular comment, but to highlight a broader issue.)

I feel like convenient shortcuts are becoming hugely inconvenient when a system has hundreds of them. The unlimited amount of unix non-orthogonal options made "for convenience" cannot scale mentally.

> However, 'ping 1.1' is a convenient shortcut (actually pings 1.0.0.1).

Convenient for who!? that one guy that put his home network in 10.0.0 class ?

1.0.0.1 is owned by Cloudflare and is used for their DNS offering. It's likely a reliable 'ping' candidate for checking that your machine has internet access

[0] https://1.0.0.1/

Hey now, what is wrong with 10. class at home ;-)?

I chose 10, for simpler segmentation in my head primarily as I have a lot of devices in my house (10.<grouping/VLAN>.<location>.n), less chance of conflict as devices come online (devices i connect often are coded to 192, VPNs, etc.), helps with my VPNs between my locations.

There is a good chance if you work for company that they will use 10.x for their server stuff.

For similar reason we also steered away from home router area of 192.168.X.X for our company network stuff.

The last shitshow I worked at insisted on 192.168.x.x for their corporate VPN. I'm not sure what they were smoking, but there was no way in hell I was going to reconfigure my entire home network so I could use their shitty VPN, so I just found another way in. Dumbasses.
I suppose you use 172.16/12? :P
We use 10/8 for servers, 172.16/12 for management, 192.168.x (where x is in double/triple digits) for users.