LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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


Reply
  Search this Thread
Old 12-05-2003, 05:18 PM   #1
costasm
Member
 
Registered: Dec 2002
Posts: 71

Rep: Reputation: 15
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
 
Old 12-05-2003, 05:43 PM   #2
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
/24 means "netmask has 24 bits to 1", i.e. it's the same as 255.255.255.0
 
Old 12-06-2003, 10:36 AM   #3
JordanH
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: Reputation: 30
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.
 
Old 12-06-2003, 04:30 PM   #4
costasm
Member
 
Registered: Dec 2002
Posts: 71

Original Poster
Rep: Reputation: 15
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
 
Old 12-06-2003, 04:55 PM   #5
JordanH
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: Reputation: 30
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.
 
Old 12-06-2003, 04:57 PM   #6
chort
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: Reputation: 75
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.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is someone on my network?! ::ffff:192.168.0.10:ssh ::ffff:192.168.0.:38201 ESTABLISHE ming0 Linux - Security 4 04-12-2005 01:04 AM
192.168.2.1 network with 192.168.0.1? Micro420 Linux - Networking 2 02-27-2005 06:59 AM
Iptables is converting -s 192.168.1.0/8 into 192.0.0.0/8 why !? qwijibow Linux - Security 2 01-26-2005 09:57 AM
192.168.0.# and webserver. Is it possible? woranl Linux - Networking 16 06-02-2003 12:16 PM
192.168.0.0/25 ? Firew Linux - Networking 1 04-12-2001 01:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:19 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration