Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

There is less than 12 hours left to vote in the 2015 LinuxQuestions.org Members Choice Awards. Click here to go to the polls. Vote now and make sure your voice is heard!

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

Click Here to receive this Complete Guide absolutely free.

I was wondering if there is some sort of a freeware program to help with learning about networks... I have seen such programs for electronic circuits but couldnīt find anything. I am having problems understanding exactly how to use subnet masks and then calculate how many hosts you could have with the mask even though I have read quite a few articles which are supposed to explain it.

There are IP calculators...just google ip calc and you will find tons of them.

If you want to know how many hosts you can have with a given netmask then take the count the number of bit positions with corresponding zeros represented by 'n', raise two to that number and subtract '2':

255.255.255.224
=
11111111.11111111.11111111.11100000 (five zeros)
=
2^5 - 2 (raise 2 to the number of zeros - 2)
=
32 - 2
=
30

To do the number of networks it is the exact opposite. Instead of using the number of zeros you use the number of ones. And you don't subtract two, but that depends on if you are doing classfull or classless ip addressing. I will use classless since that is what everyone uses nowadays. Read up on RFC1519.

Take class of address:
First octet rule -
0-127 Class A Default Netmask 255.0.0.0
128-171 Class B Default Netmask 255.255.0.0
127-223 Class C Default Netmask 255.255.255.0

Number of bits subnetted:
IPADDR=10.0.0.0
NETMASK=255.255.0.0

Default netmask since the IPADDR starts with 10 would be 255.0.0.0
Therefore, you borrowed 8 bits to get the 255.255.0.0.

To do the number of networks it is the exact opposite. Instead of using the number of zeros you use the number of ones. And you don't subtract two, but that depends on if you are doing classfull or classless ip addressing. I will use classless since that is what everyone uses nowadays. Read up on RFC1519.

Take class of address:
First octet rule -
0-127 Class A Default Netmask 255.0.0.0
128-171 Class B Default Netmask 255.255.0.0
127-223 Class C Default Netmask 255.255.255.0

Number of bits subnetted:
IPADDR=10.0.0.0
NETMASK=255.255.0.0

Default netmask since the IPADDR starts with 10 would be 255.0.0.0
Therefore, you borrowed 8 bits to get the 255.255.0.0.

2^8 =
256 subnets possible

Hi,

There are 2 different approach in IP adressing i think. One says that B Class is between 128-191 and other is as u say 128-171. Which one is right?

Class 'A' networks are 0-127 in the first octet defined bitwise:

0xxxxxxx

Class 'B' networks are 128-191 in the first octet defined bitwise:

10xxxxxx

Class 'C' networks are 192-223 in the first octet defined bitwise:

110xxxxx

Therefore, it must be this way. No other scheme.

Cheers,

Justin

Well actually i agree with this one already but;

Quote:

Originally Posted by jcookeman

To do the number of networks it is the exact opposite. Instead of using the number of zeros you use the number of ones. And you don't subtract two, but that depends on if you are doing classfull or classless ip addressing. I will use classless since that is what everyone uses nowadays. Read up on RFC1519.

Take class of address:
First octet rule -
0-127 Class A Default Netmask 255.0.0.0
128-171 Class B Default Netmask 255.255.0.0
127-223 Class C Default Netmask 255.255.255.0

Number of bits subnetted:
IPADDR=10.0.0.0
NETMASK=255.255.0.0

Default netmask since the IPADDR starts with 10 would be 255.0.0.0
Therefore, you borrowed 8 bits to get the 255.255.0.0.

2^8 =
256 subnets possible

u say "128-171 Class B" i didnt understand this one. Also i found this spesification in some other sources (very few). What is the point of this spesification?

u say "128-171 Class B" i didnt understand this one. Also i found this spesification in some other sources (very few). What is the point of this spesification?

Thanx again

I was drunk when I posted that. Obviously, I made a typo, but I don't remember as it was quite long ago.

LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.