LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Closed Thread
 
LinkBack Search this Thread
Old 11-08-2008, 10:37 PM   #1
scofiled83
Member
 
Registered: Nov 2008
Posts: 70

Rep: Reputation: 15
network, broadcast addr


Hello there

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) When kenny sends packets to zathras, do they need to go through a router?

ii) What is the network and broadcast address for the network that zathras lives on?
 
Old 11-08-2008, 10:44 PM   #2
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 475

Rep: Reputation: 73
i) yes
kenny == 192.168.0.1 - 192.168.0.14 network
zathraa == 192.168.0.17 - 192.168.0.30 network

ii) network == 192.168.0.16; broadcast == 192.168.0.31
 
Old 11-08-2008, 10:48 PM   #3
scofiled83
Member
 
Registered: Nov 2008
Posts: 70

Original Poster
Rep: Reputation: 15
Could u plz explain the solution?
 
Old 11-09-2008, 08:54 AM   #4
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 475

Rep: Reputation: 73
Talking

Quote:
Originally Posted by scofiled83 View Post
Could u plz explain the solution?
8 bits per octect (2^8 == 256; less 1 because we start count at 0 == 255)

(for simplicity) IP range: 0-255.0-255.0-255.0-255

your subnet mask of 255.255.255.240 borrows from the last octet which in binary is
11111111.11111111.11111111.11110000
since we know the first 3 octets are 255 we'll focus on the last only

time to get out your ol' binary conversion skills

[code]
d: 128 64 32 16 8 4 2 1
b: 1 1 1 1 0 0 0 0
[code]
128+64+32+16 = 240 (your subnet mask)
that leaves us with only 4 bits left (fields 8, 4, 2, and 1)
8+4+2+1=15
of those 15 possible, the first is the network and the last is the broadcast

we know that kenny has a .7 IP so he falls in the 0-15 network which allows us 1-14 IP for use.
since zathras has a .17 IP we know it is greater than the alotted 14 IPs in the first network (kenny's network) so it must be in another subnet. in this case it just happened to be the next in line. 16-31 (IPs for use 17-30).

I'm sure there are much better explanations out there but that's my 5 minute explanation.
 
Old 11-10-2008, 04:02 AM   #5
scofiled83
Member
 
Registered: Nov 2008
Posts: 70

Original Poster
Rep: Reputation: 15
thanks a lot for this nice explanation.
one last thing
for kenny why 1-14 IPrange is allowed
and not (0-15).
Why dont we use ip 0 and 15?

and again for zathras why IPs for use 17-30 and not 16-31
why dont we use ip 16 and 31

Last edited by scofiled83; 11-10-2008 at 04:44 AM.
 
Old 11-10-2008, 07:00 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,344

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
oh good grief, please don't help people out with homework. you know he's just cut and paste all your work into his assignment and handed it in, don't you?

Thread closed.
 
  


Closed Thread


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
dhclient: no working leases. Wicd cannot obtain ip addr. Unencrypted college network. Romanus81 Slackware 10 09-01-2008 10:44 PM
REDHAT DHCP SERVER is not able to assign IP addr on a different network daemon8008 Linux - Server 1 03-25-2008 06:31 AM
broadcast computer name on network? vdemuth Linux - Networking 5 11-10-2005 03:39 PM
Obtain IP addr. from MAC addr? Ryand833 Linux - Wireless Networking 3 06-30-2005 01:59 PM
how to broadcast tv over an ip network? andrewlkho Linux - General 5 08-10-2003 09:46 AM


All times are GMT -5. The time now is 03:34 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration