Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Community Member

Ping Sweep On IP Range

Hello!

I have a question concerning Ping Sweep On IP Range function in LMS 3.1, Common Services-Device Discovery-Device settings.

I´m trying to shrink the IP-range by doing like the following example, i have made a "Discovery In File/ From File to use; 10.xx.xx.1-15|255.255.255.240

Is this possible to do, it doesn´t seem to work for me, any other suggestion/ solutions to this function, please let me know!

Regards Mats

8 REPLIES

Re: Ping Sweep On IP Range

If I recall correct you just mention any IP address in the range and then provide the right mask to provide the range.

Cheers,

Michel

Community Member

Re: Ping Sweep On IP Range

Ok, thank you!

I´ll try this later on.

So if i specify for example xx.xx.xx.5|255.255.255.240 it will give me the range of 16 possible devices, i´m only interested in the ip-adress range 5-10?

It´s better to use .248 mask, 8 possible devices within the range?

//Mats

Re: Ping Sweep On IP Range

5-10 doesn't sound right to me

0-7 (1-6) , 8-15(9-14)  mask 248 or   0-15 (1-14) mask 240

So somethin like this

10.xx.xx.5 | 255.255.255.240

Would seem ok to me.

Cheers,

Michel

Community Member

Re: Ping Sweep On IP Range

True, do you know if there is a limitation, application or system performance, how large this "in file" can be? I think my file reached about 800 rows with command; xx.xx.xx.5|255.255.255.240

The reason for that is to avoid unnecessary ping sweep, i´ve specified concerned networks.

//Mats

Re: Ping Sweep On IP Range

No, I have never used it that much.

Usualy CDP is on and used as the main discovery protocol.

Only for a few exceptions for DMZ areas where CDP was off I used the ping sweep

800 ranges does seem like a lot to me.RSI hazzard to configure.

I assume you have a very large network (5K devices).

Why do you need to use ping sweep so much?

Cheers,

Michel

Community Member

Re: Ping Sweep On IP Range

Large network with service provider in between, no cdp enabled on routers, i´ll get hold of the switches.

Community Member

Re: Ping Sweep On IP Range

I just read this post and realized that this is exactly the same situation I have.

My solution is to do a discover with both ping and cdp.

For CDP you configure "Use DCR as seed list".

That means that you only have to hit one switch in each subnet with the ping-sweep.

The rest of the subnet is discovered with CDP.

So if you always have a switch at x.x.x.5 then you could do 10.0.0.5|255.255.255.255 (I haven't tried host mask myself

Or use 10.0.0.4|255.255.255.252 to hit a few more switches if the first don't answer.

The ping timeout can be tweaked for faster sweeping. Depending on the round-trip times in your network you could enter a value of 500 ms or 300 ms.

I can't see how you could tweak more than that.

800 lines is no problem as I have seen.

Here is a PERL-script you can use to make the file.

(But with 800 lines you probably have some kind of a script already)

#!Perl

# Generate the following table:
#
#10.252.0.0|255.255.255.240
#10.252.1.0|255.255.255.240
#  ...
#10.252.255.0|255.255.255.240
#
#10.253.0.0|255.255.255.240
#10.253.1.0|255.255.255.240
#  ...
#10.253.127.0|255.255.255.240
#
#10.253.128.0|255.255.128.0
#
#10.254.0.0|255.255.255.240
#10.254.1.0|255.255.255.240
#  ...
#10.254.253.0|255.255.255.240
#
#10.254.254.0|255.255.254.0
#
#10.255.0.0|255.255.255.240
#10.255.1.0|255.255.255.240
#  ...
#10.255.255.0|255.255.255.240
#

use strict;

my $outputfile = "result.txt";

open OUTFILE, ">", $outputfile;

for ( my $n=0 ; $n<=255 ; $n++) {
  print OUTFILE ("10.252.$n.0|255.255.255.240\n");
}

for ( my $n=0 ; $n<=127 ; $n++) {
  print OUTFILE ("10.253.$n.0|255.255.255.240\n");
}

print OUTFILE ("10.253.128.0|255.255.128.0\n");

for ( my $n=0 ; $n<=253 ; $n++) {
  print OUTFILE ("10.254.$n.0|255.255.255.240\n");
}

print OUTFILE ("10.254.254.0|255.255.254.0\n");

for ( my $n=0 ; $n<=255 ; $n++) {
  print OUTFILE ("10.255.$n.0|255.255.255.240\n");
}

close OUTFILE;

system "notepad $outputfile";

Community Member

Re: Ping Sweep On IP Range

Thank's for the reply!

We´ve reached further now since this was a couple of weeks ago and it works fine now. We´ve used both Ping and CDP.

Your script will be helpful anyway.

Thank you again!

Regards

Mats

1938
Views
0
Helpful
8
Replies
CreatePlease to create content