network address and broadcast address?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers network address and broadcast address?
# 1  
Old 11-09-2003
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  
Old 11-09-2003
see the output of the command:
'ifconfig'

if it dosnt work as a regular user, either su to root or try:
'/sbin/ifconfig'
# 3  
Old 11-10-2003
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 helpSmilie
# 4  
Old 11-10-2003
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  
Old 11-10-2003
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 againSmilie
# 6  
Old 11-10-2003
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  
Old 11-10-2003
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?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

C program to detect duplicate ip address if any after assigning ip address to ethernet interface

Hi , Could someone let me know how to detect duplicate ip address after assigning ip address to ethernet interface using c program (3 Replies)
Discussion started by: Gopi Krishna P
3 Replies

2. IP Networking

Network address translation

How would one approach the problem of determining the NAT tables of a router without knowing the userid and password. The only password holder died. I know the internal ip address of the router is 192.168.2.1, and also ports 80 or 8080 and 3389 are open. (5 Replies)
Discussion started by: jgt
5 Replies

3. Shell Programming and Scripting

Shell script to give broadcast and network address

Hello, I am running a post script in autoyast where I am trying to set the broadcast and network address. I have the ip address and netmask already (reading from a file).. I saw the post from fpmurphy but it is using ksh which isn't an option in autoyast. Thanks in advance! (3 Replies)
Discussion started by: bloodclot
3 Replies

4. UNIX for Dummies Questions & Answers

fake network address....

Good morning! Why would having a fake network device be useful? Thanks in advance Bigben (0 Replies)
Discussion started by: bigben1220
0 Replies

5. UNIX for Dummies Questions & Answers

Panic kernal-mode address fault on user address 0x14

:) Firstly Hi all!!, im NEW!! and on here hoping that someone might be able to offer me some help... i have a server that keeps crashing every few days with the error message: PANIC KERNAL-MODE ADDRESS FAULT ON USER ADDRESS 0X14 KERNAL PAGE FAULT FROM (CS:EIP)=(100:EF71B5BD) EAX=EF822000... (10 Replies)
Discussion started by: Twix
10 Replies

6. Solaris

ifconfig - making netmask & broadcast address permanent?

hi, I am trying to configure one of my interfaces, but after reboot - i lose the changes to the netmask & broadcast address. I have added an entry in /etc/netmasks, but it doesnt pick up the new settings. any ideas - much appreciated. before reboot: eri0:... (3 Replies)
Discussion started by: badoshi
3 Replies

7. Shell Programming and Scripting

network and broadcast address

Hi Suppose You have two computers. One named kenny which has an IP address of 192.168.0.7. kenny lives on a subnet with a subnet mask of 255.255.255.240. The second computer is called zathras, which has an IP address of 192.168.0.17, zathras lives on a network with the same subnet mask. i)... (4 Replies)
Discussion started by: scofiled83
4 Replies

8. AIX

NETWORK IP ADDRESS on HACMP

Hi, I try to understand how to configure my ethernet network in a hacmp cluster. I have 2 nodes, 3 lan port on each node, and 1 service ip to cluster. I don't have any serial o iscsi heartbeat. Do you suggest me a possibile ip address configuration? I've many error whene I verify it from hacmp... (3 Replies)
Discussion started by: hacmp
3 Replies

9. Solaris

bge card and broadcast address

I have a bge1 card and a bge0 card, i want the broadcast addresses to match, ifconfig shows this lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 ... (1 Reply)
Discussion started by: csaunders
1 Replies

10. IP Networking

broadcast address

What is the significance of the broadcast address? (1 Reply)
Discussion started by: 98_1LE
1 Replies
Login or Register to Ask a Question