Question

Locked

Ping a range from IOS

By i2_k5 ·
Hi,
Is there a way to scan a range if IP addresses, like a whole subnet, from within Cisco router IOS?
I want to scan which hosts are alive on a subnet that I only have a Cisco router on it, and don't want the System Admin to do it for me everytime.

This conversation is currently closed to new comments.

16 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Answers

Collapse -

sh arp?

by TobiF In reply to Ping a range from IOS

Can't you just read the ARP cache?

Collapse -

Not showing all

by i2_k5 In reply to sh arp?

"show arp" command lists only live hosts within the arp TTL time. If u hav a live host that had no communication for a while, will not be displayed..

Collapse -

show mac-address-table?

by TobiF In reply to Not showing all

What about show mac-address-table

Collapse -

Two reasons

by i2_k5 In reply to show mac-address-table?

First, mac-address-table also have a time to live, after that time the entry will be removed from the list
Second, Unfortunately not all cisco routers IOSs support this command (even some new IOSs do not)
Thanks

Collapse -

Ehhm

by TobiF In reply to Two reasons

In your initial question, you kind of wanted to ping machines, so I figured you're only after what machines are currently on the network.

I'd suggest you try to ping the ip subnet you're after from your own computer, then go and read the MAC or ARP table (your choice depending on TTL etc.) There would be a chance that your activity will update the entries.
Maybe there's some smart command to ask all hosts on a physical network to chime in, to update some routing tables. But, since I don't have any Cisco routers to play with, I can't help you much more in that direction.

Oh, do you, by chance, have access to any DHCP database?
Hm. Talking about DHCP, if you can shorten the lease time on DHCP to be less than the routing cache time, then you should always have fresh data for DHCP clients available on the routing caches :)

Collapse -

Ur suggestions r nice

by i2_k5 In reply to Ehhm

Telnetting two hops to reach the mentioned Cisco router, so my pc in a different subnet, routing is disabled (on purpose)between my pc subnet and target subnet, so I cant run any Ip scanners from my pc.
DHCP is not an option in my case.
Asking the SysAdmin to do an IP scan on a machine within that subnet is valid, I used to ask him, but I thought there may be a way I can do myself.
There is another reply to this question, pinging the broadcast address.. but not accurate..
:)

Collapse -

What about

by TobiF In reply to Ur suggestions r nice

Is it possible to ping (or quickly send one small udp packet from the intermediate host you telnet to? (i.e. do you have any useful rights on the first telnet destination?)

EditAdd: Worst case - you could have a script that would try to initiate telnet-sessions from your "second hop", as a way to refresh ARP data. (But then you'd probably need to set a longer TTL for ARP...)

Collapse -

To continue this part of the thread, you need to reply on the level above

by TobiF In reply to Ur suggestions r nice

i2_k5 sent me a private message:
"Hi, I tried to reply but it gives me "You have reached your maximum message level" message !!?"

When you've reached the max nesting level, the trick is to reply on the message one level above.

Collapse -

:) to be displayed

by i2_k5 In reply to Ur suggestions r nice

:) It is a ncie brainstorming session(s)..
I enjoyed it, even though it seems "pinging a range on Cisco router" is not available yet...

Collapse -

:)

by i2_k5 In reply to Ehhm

It is a ncie brainstorming session(s)..
I enjoyed it, even though it seems "pinging a range on Cisco router" is not available yet...

Back to Networks Forum
16 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums