![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Obtaining IP address from both my network interface | citiz3n | IP Networking | 2 | 05-27-2008 11:57 PM |
| NETWORK IP ADDRESS on HACMP | hacmp | AIX | 3 | 05-21-2008 12:30 AM |
| bge card and broadcast address | csaunders | SUN Solaris | 1 | 04-14-2005 09:01 AM |
| Broadcast IP Address | PBNOSGT | IP Networking | 4 | 03-11-2002 06:43 PM |
| broadcast address | 98_1LE | IP Networking | 1 | 02-06-2001 11:54 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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! |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
see the output of the command:
'ifconfig' if it dosnt work as a regular user, either su to root or try: '/sbin/ifconfig' |
|
#3
|
|||
|
|||
|
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
|
||||
|
||||
|
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
|
|||
|
|||
|
Hi, thanx, Perderabo! your comment are really helpful for me!
oh, just one more query which I am a little be confused, for Quote:
|
|
#6
|
||||
|
||||
|
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
|
|||
|
|||
|
a ha, I see, thanx for clearify that, I have another little be query,
Quote:
or how many 0 bits or the position of 0 bits for the host number? |
|||
| Google The UNIX and Linux Forums |