Tag Info

New answers tagged

0

TOOGAM has an excellent answer for this one. However, I'll throw in my two cents, this is how I used to simplify it to wrap my mind around subnetting: Look at IP addresses in binary. Each segment of an IP address is made up of 8 bits, or an octet, which means you have a working range of 0-255 because that's the range of numbers 8 bits can represent. Here ...


0

I hate to give you the "cheat" way if this is for school...but i haven't used "math" to sub-net a network in years because it just complicates everything... "and yours is kind of faulty :(. " Its called CIDR (Classless Inter-Domain Routing); http://www.ipaddressguide.com/cidr has a short explanation and a JavaScript Utility to demonstrate how it works. ...


1

Answering this sort of question requires correct use of mathematical skills (in addition to an understanding of subnets). You said that 2^6 (8-2 = 6). It is true that 8-2 is 6, but 2 raised to the sixth power is 64, not 8. This is wrong, which may be why you are experiencing some problems. A subnet mask of 255.255.255.192 has 64 addresses, of which you ...


1

Allright, I think this might work for you - assuming you have awk installed and the ip addresses are in ip.txt: cat ip.txt | awk 'BEGIN { FS = "." } ; { printf("%s.%s.%s\n%s.%s.%s.%s\n", $1, $2, $3, $1, $2, $3, $4) }' | sort | uniq -c | sort -rn A little explanation: cat prints the file awk splits the ip addresses in 4 variables and prints both the /24 ...



Top 50 recent answers are included