• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 274
  • Last Modified:

Parent Router

Is their a way to programatically find the parent router of an ip address.  I am writing a program that requires a ping or to know the parent router for a given ip address.  I would like to see some code or sample.

Thanks in advance

0
ramrocket
Asked:
ramrocket
1 Solution
 
jhanceCommented:
Get the source code for TRACEROUTE.  It's in every Linux or FreeBSD distribution out there.  There is no guarantee that a "parent" router is always the same since routing is a dynamic thing and packets can take different paths at different times.  But using the technique in traceroute, you will get _A_ route from A to B.  For any IP in the list, the next one will be a "parent".
0
 
ramrocketAuthor Commented:
hance, that is the problem, routing is dynamic however that is ok with my requirements.  Where do I get traceroute?  What do you mean the next one will be a parent?
0
 
jhanceCommented:
>>>Where do I get traceroute?  

It's in every Linux or FreeBSD distribution out there.  

>>What do you mean the next one will be a parent?

TRACEROUTE gives you a list of IP addresses, one after the other in sequence.  That is the ROUTE to the endpoint.

Try it, you'll see.  If you have Windows NT or 2000 there is TRACERT that does the same thing.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
ramrocketAuthor Commented:
jhance, will these traceroute work with NT?  Can you give a url to download the source?
0
 
ramrocketAuthor Commented:
jhance, this code does not compile using vc6.0 under winnt2000.  

>>>If you have Windows NT or 2000 there is TRACERT that does the same thing.

can you point me where the source to tracert.  I need this to work on an nt machine.  I am not doing development under unix or its flavor.

0
 
jhanceCommented:
Sorry.  You expanded the scope of this question well beyond its original parameters.  You asked for an explanation of HOW to do this and for a source code sample and I've provided both!  

Now you want a complete VC++ 6.0 application for Windows 2000.

0
 
ramrocketAuthor Commented:
jhance, I apologize for the misunderstanding.  I am not requiring a complete vc6.0 app for win2k.  Like I said in my original query, I am writing a program that need to incorporate this functionality.  The source code that you point me to is not integratable with my program and therefore is useless to me.  Please work with me on this.  I am willing to increase the points but I need something that is usable.

0
 
MoondancerCommented:
ramrocket,

You logged in recently.  This appears to have been overlooked, or perhaps due to some of the system problems we had for a brief time with Email notifications, your last comments may not have been received by the participating experts.  PLEASE RETURN here and accept/grade this if it helped you or provide additional information to ensure that the need still exists today and nothing further has changed to get you what you need as quickly as possible.

This remains open today, awaiting your next action.

Thanks,

Moondancer
Community Support Moderator @ Experts Exchange
0
 
griesshCommented:
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to accept "jhance" comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points.
The link to the Community Support area is: http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
ComTechCommented:
Accepted recommendation by:

ComTech
CS Admin @ EE
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now