Internet Protocol , or IP, is a communication protocol for packet-switched networks.
Internet Protocol describes a how interconnected computer systems address and talk to 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.)
set spec 192.168.1.0/28 regexp {(\d+)[.](\d+)[.](\d+)[.](\d+)/(\d+)} $spec -> b0 b1 b2 b3 size set quad [expr {($b0 << 24) | ($b1 << 16) | ($b2 << 8) | $b3}] for {set i 0} {$i < (1<<(32-$size))} {incr i} { set q2 [expr {$quad + $i}] set result [expr {$q2 & 0xff}] for {set j 0} {$j < 3} {incr j} { set q2 [expr {$q2 >> 8}] set result [expr {$q2 & 0xff}].$result } puts $result }