The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Obtaining IP address from both my network interface citiz3n IP Networking 2 05-28-2008 02:57 AM
NETWORK IP ADDRESS on HACMP hacmp AIX 3 05-21-2008 03:30 AM
bge card and broadcast address csaunders SUN Solaris 1 04-14-2005 12:01 PM
Broadcast IP Address PBNOSGT IP Networking 4 03-11-2002 09:43 PM
broadcast address 98_1LE IP Networking 1 02-06-2001 02:54 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-09-2003
pnxi pnxi is offline
Registered User
  
 

Join Date: Sep 2003
Location: Austrailia
Posts: 14
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!
  #2 (permalink)  
Old 11-09-2003
norsk hedensk norsk hedensk is offline Forum Advisor  
Registered User
  
 

Join Date: Jul 2002
Location: new york
Posts: 1,025
see the output of the command:
'ifconfig'

if it dosnt work as a regular user, either su to root or try:
'/sbin/ifconfig'
  #3 (permalink)  
Old 11-10-2003
pnxi pnxi is offline
Registered User
  
 

Join Date: Sep 2003
Location: Austrailia
Posts: 14
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 (permalink)  
Old 11-10-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,100
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.
  #5 (permalink)  
Old 11-10-2003
pnxi pnxi is offline
Registered User
  
 

Join Date: Sep 2003
Location: Austrailia
Posts: 14
Wink 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
  #6 (permalink)  
Old 11-10-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,100
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.
  #7 (permalink)  
Old 11-10-2003
pnxi pnxi is offline
Registered User
  
 

Join Date: Sep 2003
Location: Austrailia
Posts: 14
Thumbs up 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

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:03 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0