How to sort IP addresses using the GNU sort utility

Need to sort list of IP addresses in shell? Here’s the invocation that works:

sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4

Thanks for this tip goes to Paul Heinlein.

Related:
How to grep for IP addresses using the GNU egrep utility