http://tcllib.sourceforge.net/doc/tcllib_ip.html
The Internet Protocol (described in RFC 791 [L1 ]), which controls how machines talk to and address each other. Usually you have TCP or UDP layered over the top to provide port-based addressing and checksums...
The most common version of IP at the moment is version 4, though you may well also see version 6 about from time to time (mostly at very large ISPs though.)
The currently used checksum in IPV4 as described in RFC 791 [L2 ] is known as the Internet Checksum.
[Need more info on the difference between IPv4 and IPv6...]
If you need to manipulate internet addresses, read Handling internet addresses. You may also be interested in the DNS page for turning hostnames into addresses.
See also A Little CIDR Calculator
pgurumur - 2012-08-19 07:48:52
Created a new project for manipulating IPv4/IPv6 addresses using tcl, http://code.google.com/p/netaddr-tcl/ almost does the same thing, but adds few more stuff.