Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The easy way to find network address
subtract your mask from 256 and broadcast address is one number less than next network address
Ex- if mask is 192--> 256 - 192 = 64
if mask is 224--> 256 - 224 = 32
if mask is 240--> 256 - 240 = 16 likewise you can find all
In your case your network address is 64.5.96.0 mask is 255.255.255.192 (next network address is 64.5.96.64/26)
broadcast address is 64.5.96.63/26 ( one number less than next network address)
Host range is 64.5.96.1 to 64.5.96.62
The easy way to find network address
subtract your mask from 256 and broadcast address is one number less than next network address
Ex- if mask is 192--> 256 - 192 = 64
if mask is 224--> 256 - 224 = 32
if mask is 240--> 256 - 240 = 16 likewise you can find all
In your case your network address is 64.5.96.0 mask is 255.255.255.192 (next network address is 64.5.96.64/26)
broadcast address is 64.5.96.63/26 ( one number less than next network address)
Host range is 64.5.96.1 to 64.5.96.62
Your subtraction method would not work had his subnet address been .64, .128, or .192.
Your subtraction method would not work had his subnet address been .64, .128, or .192.
"Subtraction method only for find first network address"
by using subtraction method you can find first network address then consequetive addition of that number(first network address) you can find all other network address( within mask)
To find broadcast address, one number less than each network address
Why did you change the subnet mask for .1? the entire range will have the same subnet mask. The answer has already been given for a standard network range. The broadcast is the last ip within range and the network is the first ip within range. You can find a wikipedia article that is quite helpful on the matter. You'd need to study subnet masks to understand how this kinda stuff generally works.
If the answers supplied don't work, my advice would be to check with your supplier, since presumably you have been supplied these ips by something like an ISP or a Datacenter, their is the possibility we aren't actually talking about a standard network range, which could lead to different answers...
Last edited by r3sistance; 02-19-2009 at 12:11 PM.
Hey All,
Studying the same material as chibi2666
The question as stated reads...
Quote:
Given a subnet mask of 255.255.255.192 and the first network address of 64.5.96.0, what are all of the network/broadcast pairs?
which I for one do not yet understand, and have never felt more incompetent.
It appears to me, (given the table for all available Class A subnet masks) that we are talking about 262,144(2^18) "Effective Subnets" with 62 available hosts each.
Not that I can see how its possible, wouldn't that necessarily mean the same number of network/broadcast pairs?
All I can see possible are 4!
Network: 64.5.96.0/26 Broadcast: 64.5.96.63
Network: 64.5.96.64/26 Broadcast: 64.5.96.127
Network: 64.5.96.128/26 Broadcast: 64.5.96.191
Network: 64.5.96.192/26 Broadcast: 64.5.96.255
What does it mean "Effective Subnets - 262,144"?
The material goes on to state...
Quote:
Even though we can gain all of the information we need from the host IP address and its subnet mask, someone decided that it was still a waste of time to write out all of those numbers. Instead, we can denote the same IP/subnet pair using prefix length notation.
in this context, the discussion in this thread appears to centered around IP/subnet pairs, instead of network/broadcast pairs.
Please! I've been at this for several days now, and am just stumped.
What am I missing here???
to clear up the question about "IP address and subnet pairs" and "ip address and prefix notation"...
This is an IP address/subnet pair: "192.168.2.1 / 255.255.255.0"
This is the same thing using prefix notation: "192.168.2.1/24"
If you consider that each octet (the numbers between the periods) has 8 bits, and that the first three octets have the maximum value you can acheive with 8 bits (255), then there are 24 bits in the subnet mask.
255.255.255.0 in dotted decimal is
11111111.11111111.11111111.00000000 in dotted binary. (The 3 sets of 8 'ones' are 24 bits)
So that's where the /24 is significant. it's much easier to write "192.168.2.1/24" that it is to write out "192.168.2.1/255.255.255.0"
Last edited by JulianTosh; 02-24-2009 at 11:22 PM.
Thanks Admiral Beotch,
I do appreciate the speedy reply.
I believe I've managed a fair grasp of prefix length notation.
Just as an exercise to push the limits of my understanding on that count, I have (in a spread sheet) mapped out for myself Classfull Subnet Tables including "Subnet Mask, Prefix-Length, Host Bits Borrowed, Available Hosts/Subnet, and Effective Subnets " for Classes A, B, and C.
I have also written a couple of little scripts in PHP to Class and convert decimal octets to binary (and back again) and to return the IP address/subnet pair in prefix-length-notation on basis of a decimal IP address and subnet mask when both are entered into a form. In fact, purely as a test of my own understanding (but for a few holes therein) I am certain to be but a few lines of code away from completing a fully functional IP Subnet Calculator of my very own.
But here, we are still talking about IP address/subnet pairs, when the stated question is about network/broadcast pairs.
(Or have I missed something?)
Meanwhile, I've stumbled across numerous tables indicating that -- given a subnet mask of 255.255.255.192 -- there are 262,144, 1024, and 8 "Effective Subnets" for Class A, B, and C IP addresses respectively, but thereafter I suffer a complete failure to comprehend the significance of that number, especially in light of the fact that -- using our stated test case for an example -- there appears to be only 4 possible subnets for the given class and mask even though the tables indicate there should be 262,144.
e.g.
But here, we are still talking about IP address/subnet pairs, when the stated question is about network/broadcast pairs.
(Or have I missed something?)
...there appears to be only 4 possible subnets for the given class and mask even though the tables indicate there should be 262,144.
I think some words are being misused so it's best to go back to the individual words and understand their definitions and then come back to understand how they are used together.
An IP address is just a 32 bit number usually notated in dotted decimal format "192.168.1.1"
A subnet is an IP address with a corresponding subnet mask. The mask tells you what is the subnet portion of the IP Address and what is the host id portion of the IP address.
All the 1's denote the subnet, while all the 0's denote the host id.
For each host id, there are two reserved definitions... all 0's is reserved for the subnet address. all 1's is reserved for the broadcast address.
Given that, the "IP address/subnet pair" should probably be read as "IP address/subnet mask pair"
"Network/broadcast" pair isn't really a common reference, but if you can imagine, it would be the subnet address and broadcast address for a given subnet, or for example: "192.168.1.0 / 192.168.1.255". I dont realy think it's a good idea to use that kind of notation because I dont believe you can prove what the actual subnet mask is with just that information.
The most common and accurate notation is using the ip address and mask. From those two pieces of information, you can accurately determine everything about that host: subnet, size of the subnet, host ip, and broadcast address.
As for your second question... you are correct, there are only 4 possible subnets given 64.5.96.0/26. I believe, but I could be wrong, that the "effective subnets" refers to how many different /26 networks there are within ALL of the IPv4 address space. In other words, consider:
192.168.1.0/26
10.10.10.0/26
172.16.12.0/26
Last edited by JulianTosh; 02-25-2009 at 06:07 AM.
I think some words are being misused...
"IP address/subnet pair" should probably be read as "IP address/subnet mask pair"...
I don't realy think it's a good idea to use that kind of notation...
I couldn't agree more! This is just par for the course (pun intended) for the on-line courses through O'Reilly and the University of Illinois. Poorly explained, poorly worded, poorly supported and generally vague. If anyone should ask... I would be more than happy to provide my assessment of their offerings in excruciating detail (I am keeping careful notes at every turn on their many failings).
In short, it is a stupid and misleading question that does almost nothing to further ones understanding of the material.
Just to verify... nonetheless, do I take it that the pairs
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.