IP Math anyone?

Sean Reifschneider jafo at tummy.com
Tue Feb 27 09:46:49 CET 2001


On Tue, Feb 27, 2001 at 08:08:09AM +0000, Remco Gerlich wrote:
>He doesn't; .0.255 and .1.0 are not IP addresses you could give to a machine.
>I've never seen existing code for this, seems to need some custom hacking.

It all depends on your netmask:

	10.0.0.254/24 + 1 = 10.0.1.1/24
	10.0.0.254/23 + 1 = 10.0.0.255/23
	10.0.0.2/30 + 1 = 10.0.0.5/30

Sean
-- 
 A computer is like an Old Testament god, with a lot of rules and no mercy.
                -- Joseph Campbell
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python




More information about the Python-list mailing list