aaa.bbb.ccc.ddd - aaa.bbb.eee.fff
naar
aaa.bbb.xxx.yyy/zz
waarbij ik natuurlijk naar de xyz op zoek ben. Mijn binair hoofdrekenen
is suboptimaal, dus zoek ik eigenlijk naar een tooltje dat dit voor me
doet.
--
Joor Loohuis
Loco (Loohuis Consulting)
Training, consultancy and building
Specialized in Open Source solutions
http://www.loohuis-consulting.nl/
tel: +31 30 2431263
-
UULUG, Utrecht Linux Users Group
http://uulug.geo.uu.nl/
> Vraagje, weet iemand een slimme manier om een reeks netwerkadressen te
> vertalen naar verkorte notatie, bijvoorbeeld
>
> aaa.bbb.ccc.ddd - aaa.bbb.eee.fff
> naar
> aaa.bbb.xxx.yyy/zz
>
> waarbij ik natuurlijk naar de xyz op zoek ben. Mijn binair hoofdrekenen
> is suboptimaal, dus zoek ik eigenlijk naar een tooltje dat dit voor me
> doet.
dwijn@ulmo:~> apt-cache search cidr
geeft onder andere:
ipsc - IP Subnet Calculator for console
The IP Subnet Calculator is a tool that allows network administrators
to make calculations that will assist in subnetting a network. You
give the network class and subnet bits and you get back the maximum
number of subnets, maximum number of hosts per subnet, a bimap showing
the breakdown of network bits, subnet bits, and host bits, the decimal
and hexadecimal class netmask, the decimal and hexadecimal subnet mask
and lists subnets and host information. CIDR support and reverse
engineer the network information for a particular interface (e.g. eth0,
ppp0).
--
Alfred G. de Wijn
mail: Sterrekundig Instituut, Postbus 80 000, 3508 TA Utrecht, The Netherlands
phone: +31-30-253 5225 fax: +31-30-253 5201 e-mail: A.G.d...@astro.uu.nl
> Vraagje, weet iemand een slimme manier om een reeks netwerkadressen te
> vertalen naar verkorte notatie, bijvoorbeeld
>
> aaa.bbb.ccc.ddd - aaa.bbb.eee.fff
> naar
> aaa.bbb.xxx.yyy/zz
>
> waarbij ik natuurlijk naar de xyz op zoek ben. Mijn binair hoofdrekenen
> is suboptimaal, dus zoek ik eigenlijk naar een tooltje dat dit voor me
> doet.
elk blok bestat uit 8 bits, 32 totaal.
dus aaaa.bbbb.xxxx.yyyy/zz
waar;
zz=32 voor eht volledige adres
zz=24 voor de eerste 3 blokken
zz=25 voor de eerste 3 blokken + bit 1 van blokc 4
(splitisng in 2 0-127,128-255)
zz=26 blok 4 in vieren 0-63,64-127 enz.
zz=27 0-31,32-63,64-95,96-127 enz.
zz=28 0-15,16-31,32-47,48-63 enz.
zz=29 0-7,8-15,16-23,24-31,32-39,40-47,48-55,56-63
zz=30 0-3,4-7,8-11,12-15 enz.
zz=31 0-1,2-3,4-5,6-7 enz.
zz=32 alles
Dit rijtje geldt dus voor:
blok1 1-8, blok2 9-16, blok 17-24 en blokc 4 dus 25-32
hope this helps
Andor
>
--
Andor Demarteau E-mail: an...@nl.linux.org
student computer science www: http://www.nl.linux.org/~andor/
UU based & VU guest-student MSN,ICQ,YAHOO: do ask ;)
-----------
chairman Stichting Studiereizen STORM www: http://www.stistusto.nl
vice-chairman USF Studentenbelangen executive committee 2002-2003