ifconfig & Netmasks
Whenever moving IPs around on servers I always find myself looking up the hex for a netmask.
Ever run into this
$ ifconfig inet xxxxxxxxxxx netmask 0xfffffff0 broadcast xxxxxxxxxxxxxx
And need to know what the fffffff0 was for Here it is:
| Dotted Decimal |
Hex | Number of Addresses |
| 255.0.0.0 | FF000000 | 16777214 (16777216-2) |
| 255.255.0.0 | FFFF0000 | 65534 (65536-2) |
| 255.255.255.0 | FFFFFF00 | 254 (256-2) |
| 255.255.255.128 | FFFFFF80 | 126 (128-2) |
| 255.255.255.192 | FFFFFFC0 | 62 (64-2) |
| 255.255.255.224 | FFFFFFE0 | 30 (32-2) |
| 255.255.255.240 | FFFFFFF0 | 14 (16-2) |
| 255.255.255.248 | FFFFFFF8 | 6 (8-2) |
| 255.255.255.252 * | FFFFFFFC * | 2 (4-2) * |
Tags: ifconfig, netmask, networking
Apps

Twitter
March 24th, 2009 at 7:52 pm
Appreciate the info guys, thanks