cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
635
Views
0
Helpful
3
Replies
Highlighted
Beginner

onePK get all routers/switches in my network

Hi everybody,

does anybody know, if it is possible to get a list of all routers and switches in my network, without knowing the IP-Address or the Hostname, with onePK?

I already searched for it in our community, but i didn't find anything.

P.S.: I am using the onePK Java SDK.

Kind regards

Florian

1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Cisco Employee

Re: onePK get all routers/switches in my network

While you don't have to know any IP address a priori, you would have to know credentials for onePK AND onePK would need to be configured on all routers in your network.

The easiest approach assuming this were the case would be to try and connect to the default gateway of the host on which your onePK app is running.  From there, as David said, use the Topology APIs to walk the network.

View solution in original post

3 REPLIES 3
Cisco Employee

Re: onePK get all routers/switches in my network

I've moved this forum post to the onePK community space so that developers following that space can reply.

Beginner

Re: onePK get all routers/switches in my network

As far as I know, no. I believe the closest thing would be to use the Topology class, but even that requires connecting to a known network element in order to return info about its neighbors.  For sample code, you’ll find it in tutorials/topology/ TopologyTutorial.java.

Dave

Hall of Fame Cisco Employee

Re: onePK get all routers/switches in my network

While you don't have to know any IP address a priori, you would have to know credentials for onePK AND onePK would need to be configured on all routers in your network.

The easiest approach assuming this were the case would be to try and connect to the default gateway of the host on which your onePK app is running.  From there, as David said, use the Topology APIs to walk the network.

View solution in original post

Content for Community-Ad
August's Community Spotlight Awards
This widget could not be displayed.