network address and broadcast address? | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

network address and broadcast address?

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 11-09-2003
pnxi pnxi is offline
Registered User
 
Join Date: Sep 2003
Last Activity: 10 November 2003, 8:39 PM EST
Location: Austrailia
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
network address and broadcast address?

say I have a IP address which is 10.0.0.12, and subnet mask is 255.255.255.240, what is the network address and what is the broadcast address which host lives on?
And could you explain how to get the answer?
thanx in advance!
Sponsored Links
    #2  
Old 11-09-2003
norsk hedensk norsk hedensk is offline Forum Advisor  
Registered User
 
Join Date: Jul 2002
Last Activity: 26 May 2006, 8:38 PM EDT
Location: new york
Posts: 1,025
Thanks: 0
Thanked 1 Time in 1 Post
see the output of the command:
'ifconfig'

if it dosnt work as a regular user, either su to root or try:
'/sbin/ifconfig'
Sponsored Links
    #3  
Old 11-10-2003
pnxi pnxi is offline
Registered User
 
Join Date: Sep 2003
Last Activity: 10 November 2003, 8:39 PM EST
Location: Austrailia
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
hi

thanx, by the way, what the rule for find out the network address and broadcast address, if in this case, the IP address is class A, is it the 10.0.0.0 for network address, and 10.0.0.255 for broadcast address? what is the rule for that?
Thanx for help
    #4  
Old 11-10-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 24 October 2014, 3:06 PM EDT
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 437 Times in 261 Posts
There is something wrong here. A broadcast of 10.0.0.255 is wrong for a subnet mask of 255.255.255.240 and an address of 10.0.0.12.


The best way to see what's going on is to convert the subnet mask to binary:
11111111.11111111.11111111.11111000

This results in a string of 1's followed by a string of 0's. That will always be the case. Where we have 1's, the bits are the network number. Where we have 0's the bits are the host number.

In this case the host number can range from 0 to 15. But you can't use 0, that's the network. And you can't use 15, that's the broadcast address. So 1 - 14 are available as host numbers. So your broadcast address should be 10.0.0.15.

A broadcast address of 10.0.0.255 would be the default for a class A and this implies that your netmask is 255.255.255.0 which is also the default for a class A. So maybe your host is misconfigured. Or maybe your information about what the subnet mask should be is wrong. 255.255.255.240 is an odd choice for a class A.

A couple more examples to illustrate a confusing point. Let's say that your mask is 255.255.255.240 and your address is 10.37.55.12. It probably won't be too mush of a surprise that your broadcast address will be 10.37.55.15.

But what if your mask is 255.255.255.240 and your address is 10.0.0.204? Here your host number is still 12 but the network number has dribbled into the final octet. That 204 comes from 128 + 64 +12. Now the broadcast would be 10.0.0.207.
Sponsored Links
    #5  
Old 11-10-2003
pnxi pnxi is offline
Registered User
 
Join Date: Sep 2003
Last Activity: 10 November 2003, 8:39 PM EST
Location: Austrailia
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Hammer & Screwdriver a more query

Hi, thanx, Perderabo! your comment are really helpful for me!
oh, just one more query which I am a little be confused, for
Quote:
In this case the host number can range from 0 to 15
Why the host number can range from 0 to 15, could you be kind to clearify this for me, thanx again
Sponsored Links
    #6  
Old 11-10-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 24 October 2014, 3:06 PM EDT
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 437 Times in 261 Posts
Look at the binary representation of the netmask. You only have 3 bits for the host number. A three bit number can only range from 0 to 15. Can you think of a way to get a larger number in 3 bits?

Eek! I see that that I said: "255.255.255.0 which is also the default for a class A." Actually the default mask for a class A is 255.0.0.0.
Sponsored Links
    #7  
Old 11-10-2003
pnxi pnxi is offline
Registered User
 
Join Date: Sep 2003
Last Activity: 10 November 2003, 8:39 PM EST
Location: Austrailia
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
MySQL thanx again

a ha, I see, thanx for clearify that, I have another little be query,
Quote:
This results in a string of 1's followed by a string of 0's. That will always be the case. Where we have 1's, the bits are the network number. Where we have 0's the bits are the host number.
how about the case, 11111111.11111111.11111111.11010100, so the rule for that is wether we count from the first left most 0 bit
or how many 0 bits or the position of 0 bits for the host number?
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shell script to give broadcast and network address bloodclot Shell Programming and Scripting 3 10-18-2010 05:14 PM
network and broadcast address scofiled83 Shell Programming and Scripting 4 11-09-2008 07:55 AM
bge card and broadcast address csaunders Solaris 1 04-14-2005 12:01 PM
Broadcast IP Address PBNOSGT IP Networking 4 03-11-2002 08:43 PM
broadcast address 98_1LE IP Networking 1 02-06-2001 01:54 PM



All times are GMT -4. The time now is 02:19 AM.