Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-05-2003, 05:18 PM
|
#1
|
Member
Registered: Dec 2002
Posts: 71
Rep:
|
What does this mean? 192.168.254.32/24
What does the /24 mean when its used with an IP address?
I know it has something to do with the mask. E.g. on my system I use 255.255.255.0
So how does that correlate? Would it be /255?
Thanks
|
|
|
12-05-2003, 05:43 PM
|
#2
|
Member
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394
Rep:
|
/24 means "netmask has 24 bits to 1", i.e. it's the same as 255.255.255.0
|
|
|
12-06-2003, 10:36 AM
|
#3
|
Member
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360
Rep:
|
A more explicit answer is that an ip address is composed of 32 bits. Of those 32 bits, you have the network address and the host address. The net mask defines the break point between the two.
i.e. /24 or 255.255.255.0 are two ways of saying that the network address starts 24 bits from the left... i.e. 192.168.0.?
That means the standard netmasks are
/8=255.0.0.0 example 192.?.?.? (Class A)
/16=255.255.0.0 example 192.168.?.? (Class B)
/24=255.255.255.0 example 192.168.0.? (Class C)
Now... if you want to get into splitting network classes, you'll have to do some math and that requires you understand why 255 is 8 bits. We can go there if you like but I won't bother unless you ask.
|
|
|
12-06-2003, 04:30 PM
|
#4
|
Member
Registered: Dec 2002
Posts: 71
Original Poster
Rep:
|
I think I get it. I know hex math so it helps.
I just wasnt sure what the notation stood for.
I guess if my allowable range of IP addresses is
192.168.254.64 up to 70
That would be a netmask of 255.255.255.248
or use a /29 as the bit notation
Thanks
Costas
|
|
|
12-06-2003, 04:55 PM
|
#5
|
Member
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360
Rep:
|
Correct. And I notice you listed the range of ip's from 64-70, rather than 64-71; Judging by your immediate grasp of addressing you neglected to include 71 because it is the broadcast address. Good stuff.
|
|
|
12-06-2003, 04:57 PM
|
#6
|
Senior Member
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
|
You also need to make sure that a subnet starts on an allowed boundary. You can't just start a block of contigous addresses anywhere. Any network that you're subnetting has to break evenly into subnets. Using /29 subnets (say we are going to subnet 192.168.254.0 into /29 subnets) they would be 192.168.254.0/29, 192.168.254.8/29, 192.168.254.16/29, etc... so yes, with 192.168.254.64 you could use up to .70, using .71 for broadcast.
Also remember the basic rule that one less bit in the mask means twice as big an address range, and one more bit means half as big as previous.
|
|
|
All times are GMT -5. The time now is 06:40 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|