Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Cisco > Determine the device is a router or switch given the Device IP

Reply
Thread Tools

Determine the device is a router or switch given the Device IP

 
 
kiranreddyd@gmail.com
Guest
Posts: n/a
 
      12-22-2004
Hello,

Device IP is given. My task is to determine whether the device IP
is that of router or switch or some other device. How can I do that?

Basically I need to know the type of the device from the IP
through some means like snmp, telnet etc....
Any help?

Thanks in Advance

Regards
Kiran

 
Reply With Quote
 
 
 
 
Brendon Caligari
Guest
Posts: n/a
 
      12-22-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hello,
>
> Device IP is given. My task is to determine whether the device IP
> is that of router or switch or some other device. How can I do that?
>
> Basically I need to know the type of the device from the IP
> through some means like snmp, telnet etc....
> Any help?
>
> Thanks in Advance
>
> Regards
> Kiran
>



If you have a unix box (and root privileges) try 'nmap'

[root@lithium root]# nmap -O 192.168.0.2

Starting nmap V. 3.00 ( www.insecure.org/nmap/ )
Interesting ports on (192.168.0.2):
(The 1599 ports scanned but not shown below are in state: closed)
Port State Service
23/tcp open telnet
79/tcp open finger
Remote operating system guess: Cisco IOS 11.3 - 12.0(11)

Nmap run completed -- 1 IP address (1 host up) scanned in 17 seconds



[root@lithium root]# nmap -O a.b.c.d

Starting nmap V. 3.00 ( www.insecure.org/nmap/ )
Interesting ports on (a.b.c.d):
(The 1600 ports scanned but not shown below are in state: closed)
Port State Service
1720/tcp open H.323/Q.931
Remote operating system guess: Cisco 801/1720 running 12.2.8

Nmap run completed -- 1 IP address (1 host up) scanned in 8 seconds


Brendon
++++
 
Reply With Quote
 
 
 
 
kiranreddyd@gmail.com
Guest
Posts: n/a
 
      12-22-2004
Hi,
Thanks for ur quick response.

But device containing Cisco IOS can also be switch...that is my actual
problem....I have an IP address and OS running on it but I dont know
which is Router or switch...I need to the know which IPs r routers.
Regards
Kiran

 
Reply With Quote
 
Steve
Guest
Posts: n/a
 
      12-22-2004
On 22 Dec 2004 03:00:27 -0800, (E-Mail Removed) wrote:

>Hi,
>Thanks for ur quick response.
>
>But device containing Cisco IOS can also be switch...that is my actual
>problem....I have an IP address and OS running on it but I dont know
>which is Router or switch...I need to the know which IPs r routers.
>Regards
>Kiran


Hi Kiran,

If SNMP is permissible, just snmpget system.sysDescr.0 eg:

bash:/usr/home/bob$snmpget -v 1 switchname public system.sysDescr.0
system.sysDescr.0 = Cisco Internetwork Operating System Software
IOS (tm) Catalyst 4000 L3 Switch Software (cat4000-IS-M), Version
12.1(23)E, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2004 by cisco Systems, Inc.

Above was for a 4507R

bash:/usr/home/bob$snmpget -v 1 routername public system.sysDescr.0
system.sysDescr.0 = Cisco Internetwork Operating System Software
IOS (tm) 3700 Software (C3725-IS-M), Version 12.2(15)T2, RELEASE
SOFTWARE (fc2)
TAC Support: http://www.cisco.com/tac
Copyright (c) 1986-2003 by cisco Systems, Inc.
Compiled Wed 30-Apr-03 23:52 by nmasa

Above for a 3725

HTH
Steve
 
Reply With Quote
 
kiranreddyd@gmail.com
Guest
Posts: n/a
 
      12-22-2004
Hi Steve,

Thanks for the reply.

The actual problem is I need to get a list of all routers in our
network...using nmap I can get all device IPs and OS running on
it...with that information how do I know which IP is a router and which
one switch.

Is there any other way to get all the routers in the network?
Thanks in Advance

Regards
Kiran

 
Reply With Quote
 
Steve
Guest
Posts: n/a
 
      12-22-2004
On 22 Dec 2004 03:58:12 -0800, (E-Mail Removed) wrote:

>Hi Steve,
>
>Thanks for the reply.
>
>The actual problem is I need to get a list of all routers in our
>network...using nmap I can get all device IPs and OS running on
>it...with that information how do I know which IP is a router and which
>one switch.
>
>Is there any other way to get all the routers in the network?
>Thanks in Advance
>
>Regards
>Kiran


Sorry if I'm missing something here, but if you've got a list of IPs
to feed to nmap, why not just feed them to snmpget instead?

Steve

 
Reply With Quote
 
Brendon Caligari
Guest
Posts: n/a
 
      12-22-2004
(E-Mail Removed) wrote:
> Hi,
> Thanks for ur quick response.
>
> But device containing Cisco IOS can also be switch...that is my actual
> problem....I have an IP address and OS running on it but I dont know
> which is Router or switch...I need to the know which IPs r routers.
> Regards
> Kiran
>


I haven't used any myself (maybe it's about time i should) but you may
try to find some "NETWORK DISCOVERY" tool (or if you don't find anything
suitable write one and open source it

It's got to be a mixture of techniques to determine what is what on a
network. Ping, traces, OS fingerprinting, port scanning.......

Operating systems like Linux and even less capable platforms like Win2k
can do routing between interfaces. An unmanaged switch may not even
have an IP, and a layer 3 switch may be doing routing.


Brendon
 
Reply With Quote
 
lex van der lugt
Guest
Posts: n/a
 
      12-22-2004
(E-Mail Removed) wrote:
> Hello,
>
> Device IP is given. My task is to determine whether the device IP
> is that of router or switch or some other device. How can I do that?
>
> Basically I need to know the type of the device from the IP
> through some means like snmp, telnet etc....
> Any help?
>
> Thanks in Advance
>
> Regards
> Kiran
>

Hi Kiran,

Give look@lan a try. It's free and you can download it here:

http://www.lookatlan.com/

It will also do the snmp reads for you.

Lex.
 
Reply With Quote
 
Walter Roberson
Guest
Posts: n/a
 
      12-22-2004
In article <41cc66a6.9502614@10.185.234.23>,
Steve <(E-Mail Removed)> wrote:
:Sorry if I'm missing something here, but if you've got a list of IPs
:to feed to nmap, why not just feed them to snmpget instead?

Suppose you don't know the SNMP community?
--
"Mathematics? I speak it like a native." -- Spike Milligan
 
Reply With Quote
 
Walter Roberson
Guest
Posts: n/a
 
      12-22-2004
In article <(E-Mail Removed). com>,
<(E-Mail Removed)> wrote:
:But device containing Cisco IOS can also be switch...that is my actual
roblem....I have an IP address and OS running on it but I dont know
:which is Router or switch...I need to the know which IPs r routers.

*If* you know the SNMP community then example the sysServices
OID, .1.3.6.1.2.1.1.7.0 . You will find a description of that in
the RFC1213 MIB.

Cat3750 (multilayer switch, aka limited router): 6 (Layer 3 + Layer 2)
720xVXR (router): 6 (Layer 3 + Layer 2)
PIX525 (firewall): 4 (Layer 3)
Nortel 450 switch: 3 (Layer 1 + Layer 2)
Nortel Accelar 1150 (L3 switch): 6 (Layer 3 + Layer 2)
Novell 5.1 (server): 12 (layer 3 + Layer 4)
HP LJ2100 (printer): 64 (layer 7)
--
Rump-Titty-Titty-Tum-TAH-Tee -- Fritz Lieber
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Has thought been given given to a cleaned up C? Possibly called C+. Casey Hawthorne C Programming 385 04-04-2010 02:11 AM
Determine the device is a router or switch given the Device IP via snmp KuttapanPro@gmail.com Cisco 0 11-05-2007 06:24 AM
" Given BACK what was freely GIVEN " 2Barter.net C++ 0 12-13-2006 02:56 AM
Days in a given date range for a given month......... Lord0 Java 1 04-19-2006 04:54 PM
generate all possible strings of given length given a set of characters chiara C Programming 6 10-06-2005 01:43 AM



Advertisments