LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-18-2009, 09:22 PM   #1
chibi2666
LQ Newbie
 
Registered: Nov 2008
Posts: 19

Rep: Reputation: 0
Subnetting question


Please help me.



64.5.96.0 subnet mask of 255.255.255.192

I cant figure out the network/broadcast pairs?

This is what I got

64.5.96.0 255.255.255.192

64.5.96.1 255.255.255.224

Any help would be great.

Thanks
 
Old 02-18-2009, 09:26 PM   #2
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
network is .0, broadcast is .63

.192 in binary is 11000000
invert that and 00111111 or 63

Last edited by JulianTosh; 02-18-2009 at 09:27 PM.
 
Old 02-19-2009, 02:06 AM   #3
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
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
 
Old 02-19-2009, 03:30 AM   #4
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
Quote:
Originally Posted by kirukan View Post
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.
 
Old 02-19-2009, 11:06 AM   #5
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
Quote:
Originally Posted by Admiral Beotch View Post
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
 
Old 02-19-2009, 12:06 PM   #6
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,307

Rep: Reputation: 174Reputation: 174
Quote:
Originally Posted by chibi2666 View Post
64.5.96.0 255.255.255.192
64.5.96.1 255.255.255.224
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.
 
Old 02-19-2009, 07:15 PM   #7
chibi2666
LQ Newbie
 
Registered: Nov 2008
Posts: 19

Original Poster
Rep: Reputation: 0
follow up

Quote:
Originally Posted by Admiral Beotch View Post
Your subtraction method would not work had his subnet address been .64, .128, or .192.

So would it look like this if I was to put in order

64.5.96.64/26
64.5.96.63/26
64.5.96.62/26
64.5.96.61/26
64.5.96.60/26
64.5.96.59/26
64.5.96.58/26


Your help has been a great help so far
 
Old 02-19-2009, 11:17 PM   #8
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
64.5.96.64/26 is a subnet address.

It's more like this:

64.5.96.0/26 = (your) subnet address
64.5.96.1/26 = first host on (your) subnet
.
.
.
64.5.96.62/26 = last host on (your) subnet
64.5.96.63/26 = broadcast address on (your) subnet

64.5.96.64/26 = the next subnet address
64.5.96.65/26 = first host of next subnet
.
.
.
etc
 
Old 02-20-2009, 11:11 PM   #9
chibi2666
LQ Newbie
 
Registered: Nov 2008
Posts: 19

Original Poster
Rep: Reputation: 0
Thanks very much

Quote:
Originally Posted by admiral beotch View Post
64.5.96.64/26 is a subnet address.

It's more like this:

64.5.96.0/26 = (your) subnet address
64.5.96.1/26 = first host on (your) subnet
.
.
.
64.5.96.62/26 = last host on (your) subnet
64.5.96.63/26 = broadcast address on (your) subnet

64.5.96.64/26 = the next subnet address
64.5.96.65/26 = first host of next subnet
.
.
.
Etc
thank you
 
Old 02-24-2009, 08:43 PM   #10
fuzzy1
LQ Newbie
 
Registered: Feb 2009
Posts: 7

Rep: Reputation: 0
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???

Last edited by fuzzy1; 02-24-2009 at 09:16 PM.
 
Old 02-24-2009, 11:15 PM   #11
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
check this out and see if it helps...

http://www.ralphb.net/IPSubnet/subnet.html

subnetting is a lot of fun once you get the hang of it.
 
Old 02-24-2009, 11:20 PM   #12
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
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.
 
Old 02-25-2009, 05:19 AM   #13
fuzzy1
LQ Newbie
 
Registered: Feb 2009
Posts: 7

Rep: Reputation: 0
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.
Code:
Networks
64.5.96.0/26
64.5.96.64/26
64.5.96.128/26
64.5.96.192/26
Code:
...with corresponding Broadcast addresses of...
  64.5.96.63 
  64.5.96.127 
  64.5.96.191
  64.5.96.255
... or have I got that wrong too?
 
Old 02-25-2009, 06:05 AM   #14
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
Quote:
Originally Posted by fuzzy1 View Post
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.
 
Old 02-25-2009, 08:02 AM   #15
fuzzy1
LQ Newbie
 
Registered: Feb 2009
Posts: 7

Rep: Reputation: 0
Thanks again Admiral Beotch,
Quote:
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
Quote:
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
are correct?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Subnetting question pnellesen Linux - Networking 11 08-30-2006 03:19 PM
subnetting juanb Linux - Networking 1 06-30-2004 10:23 AM
subnetting samba question odious1 Linux - Networking 1 10-31-2003 01:16 PM
subnetting Fabian030 General 4 09-11-2003 03:11 AM
subnetting juanb Linux - Networking 3 08-26-2003 10:56 AM


All times are GMT -5. The time now is 07:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration