LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 08-02-2012, 05:00 PM   #1
pradiptart
Member
 
Registered: Sep 2007
Posts: 102

Rep: Reputation: 12
How to use nmap to scan all the network if I know my IP and net mask?


My ip is suppose 10.23.200.11,and my network mask is 255.255.240.0.Then my Network prefix is

10.23.200.11
255.255.240.0
-----------------(bitwise and)
10.23.192.0

Is ,This is correct .Then can you tell me by giving this IP (10.23.192.0) am I able to get all the device connected to my network by using nmap as follows.

Code:
nmap 10.23.192.0/20
Is the above command correct,to scan all the device attach to my network under the same router,if not can you tell me how find the network address and use that to find all the device attached by nmap. I have doubt ,I got 10.23.192.1 as my default gateway(router) then I am confused what is the address I have to use to find all the device connected to the network.

I have following doubts also,kindly tell some answer to clear my fundamental networking concepts...

we are 4 friends staying in a room and have a connection from a network provider.

They given us a wireless device which get connected to a switch and from that switch we are having 4 connections.

so now when I am connected to the internet ,I have one private IP (10.23.200.11) ,my other friends also having ip like :10.23.202.12, 10.23.198.25.

But when I am searching in google what is my IP it shows 13.193.112.91.

my doubt is how this all happening and also my dhcp server IP is
something different like 13.193.12.16

what is this all, can any one kindly tell me some thing about these concepts.

What is happening from the ISP to my PC what are the stages and how the IPs are given to us.

where is the DHCP present and where is the router

what is that wireless device ,they given to us by which we are getting connection.

Thanks
 
Old 08-03-2012, 12:32 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by pradiptart
They given us a wireless device which get connected to a switch and from that switch we are having 4 connections.

so now when I am connected to the internet ,I have one private IP (10.23.200.11) ,my other friends also having ip like :10.23.202.12, 10.23.198.25.

But when I am searching in google what is my IP it shows 13.193.112.91.

my doubt is how this all happening and also my dhcp server IP is
something different like 13.193.12.16

what is this all, can any one kindly tell me some thing about these concepts.

What is happening from the ISP to my PC what are the stages and how the IPs are given to us.

where is the DHCP present and where is the router
Either your wireless AP device or your switch (or both) are performing NAT for you and your peers.

http://en.wikipedia.org/wiki/Network...ss_translation

You're on private (RFC 1918) IP space, and the NAT device is allowing all of you to masquerade as the publicly-routable IP 13.193.112.91.

http://en.wikipedia.org/wiki/Private_network

In effect, you can reach hosts out on the 'net through your NAT device, but they cannot reach you (except through TCP/UDP conversations you've initiated, and/or except where you've set up port forwarding explicitly).

Please read the Wikipedia articles.

As for your nmap(1) questions, please read its documentation (online or its manpages).
 
1 members found this post helpful.
Old 08-06-2012, 12:29 AM   #3
pradiptart
Member
 
Registered: Sep 2007
Posts: 102

Original Poster
Rep: Reputation: 12
hi anomie,thanks for your valuable information.

ok,Now I am using nmap with the network address to discover all the node but it showing some error as follows

1.I am trying to get all the device details of in the network as above calculation,and using nmap to do it but getting some error at a perticular IP and when I am trying to ping it ,it showing some error but when I am trying to ping my Ip it is working fine.

Quote:
[root@vivekv-thinkpad-r400 ~]# nmap -O 10.0.0.0/21

Starting Nmap 6.01 ( http://nmap.org ) at 2012-08-06 11:01 IST
nexthost: failed to determine route to 10.0.3.254
QUITTING!
[root@vivekv-thinkpad-r400 ~]# ping 10.0.3.254
connect: No buffer space available


[root@vivekv-thinkpad-r400 ~]# ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.073 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.199 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.304 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.088 ms

[1]+ Stopped ping 127.0.0.1
[root@vivekv-thinkpad-r400 ~]# ping 10.0.3.254
connect: No buffer space available
[root@vivekv-thinkpad-r400 ~]#

Last edited by pradiptart; 08-06-2012 at 12:35 AM.
 
Old 08-06-2012, 05:23 AM   #4
Gleylancer
LQ Newbie
 
Registered: Aug 2012
Distribution: Slackware+RHEL
Posts: 24

Rep: Reputation: Disabled
127.0.0.1 is not "your IP" in that sense, it is localhost. The complete 127.0.0.0/8 IP space is reserved for that and will never ever be routed by any machine. It's always the machine itself that will answer.

"nexthost: failed to determine route to 10.0.3.254" means that your network does not know any route to the specified network. You're probably trying to get somewhere completely outside your local network range.

I still fail to see the purpose behind doing all this. Could you explain what you want to do and supply some more details and basic configuration of your machines/router.

Last edited by Gleylancer; 08-06-2012 at 05:24 AM.
 
1 members found this post helpful.
  


Reply



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
LXer: Learn how to use nmap, and nmap GUI, a great port scan tool LXer Syndicated Linux News 0 01-03-2008 09:10 AM
nmap scan sucram2g Linux - Security 2 03-18-2006 02:21 AM
nmap scan results juanb Linux - Security 5 11-16-2004 02:31 AM
scan my network with nmap. amer_58 Linux - Networking 3 06-17-2004 12:11 AM
nmap scan loganwva Linux - Security 5 02-25-2003 07:16 PM

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

All times are GMT -5. The time now is 08:21 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