LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-14-2003, 03:22 PM   #1
spank
Member
 
Registered: Aug 2003
Location: Romania
Distribution: Ubuntu 6.06
Posts: 278

Rep: Reputation: 30
netmask


what is this netmask... 255.255.255.0 Can somebody explain it to me ?
If i scan with nmap -sP 192.168.0.0/24 what does /24 mean.
thanx
 
Old 12-14-2003, 03:31 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,568

Rep: Reputation: 164Reputation: 164
/24 and /255.255.255.0 are the same. When you use 192.168.0.0 it means: all adresses befinning with 192.168.0. with all possible fourth octet (8 bits what means 0 to 255).
/24 means a number of '1' in the mask (counted from the beginning, so it's 11111111.11111111.11111111.00000000 <- 24 '1's ).
255.255.255.0 is counted differently. You have every octet separate and then you write the mask in bits. Then you multiply the '0' or '1' by the value position. The values are 128,64,32,16,8,4,2,1. Example
Code:
    1     1     1      1     1     1     1     1 
1*128+ 1*64+ 1*32+ 1*16+  1*8+  1*4+  1*2+  1*1
So you get 255. You do the same with all four octets.

Last edited by Mara; 12-14-2003 at 03:34 PM.
 
Old 12-14-2003, 03:40 PM   #3
spank
Member
 
Registered: Aug 2003
Location: Romania
Distribution: Ubuntu 6.06
Posts: 278

Original Poster
Rep: Reputation: 30
so 192.168.0.x with the netmask 255.255.255.0 mean all the ips starting with 192.168.0 ?
 
Old 12-15-2003, 10:12 AM   #4
captainstorm
Member
 
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Rep: Reputation: 30
192.168.0.0 ~ 192.168.0.255
 
  


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
netmask problem ??? John Micheal Solaris / OpenSolaris 2 06-08-2005 08:47 PM
rtrive netmask vasdia Programming 0 02-25-2005 01:24 PM
Netmask? muppski Linux - Networking 5 01-30-2005 05:09 PM
netmask ray5_83 Linux - Networking 1 09-12-2004 12:20 PM
PPP netmask RHrulz Linux - Networking 3 02-04-2003 12:53 PM


All times are GMT -5. The time now is 12:25 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration