> eth0 Link encap:Ethernet HWaddr 00:40:95:00:00:10
> inet addr:192.168.2.1 Bcast:192.168.2.15 Mask:255.255.255.0
Plug: Anybody having problems sorting out netmasks and broadcast
addresses (especially with sub or super netting) might find these
tools useful.
ftp://ftp.ocs.com.au/pub/ipcalc.pl.gz
ftp://ftp.ocs.com.au/pub/ipcalc.tcl.gz
The first one is Perl and is intended for quick calculations, like this.
# ipcalc.pl 192.168.2.1/28
IP address 192 . 168 . 2 . 1 / 28 192.168.2.1/28
Netmask bits 11111111 11111111 11111111 11110000
Netmask bytes 255 . 255 . 255 . 240 255.255.255.240
Address bits 11000000 10101000 00000010 00000001
Network 192 . 168 . 2 . 0 192.168.2.0
Broadcast 192 . 168 . 2 . 15 192.168.2.15
First Host 192 . 168 . 2 . 1 192.168.2.1
Last Host 192 . 168 . 2 . 14 192.168.2.14
Total Hosts 14
PTR 1.2.168.192.in-addr.arpa
IP Address (hex) C0A80201
The Tcl version is more for demonstrations, I use it when teaching
network people how netmasks *really* work. It is disheartening how
many people know class B/C and nothing else :(.
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]