?
Solved

Parent Router

Posted on 2001-06-15
11
Medium Priority
?
266 Views
Last Modified: 2010-04-02
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
Comment
Question by:ramrocket
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 6196789
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
 

Author Comment

by:ramrocket
ID: 6197010
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
 
LVL 32

Accepted Solution

by:
jhance earned 800 total points
ID: 6197249
>>>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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:ramrocket
ID: 6204140
jhance, will these traceroute work with NT?  Can you give a url to download the source?
0
 
LVL 32

Expert Comment

by:jhance
ID: 6204509
0
 

Author Comment

by:ramrocket
ID: 6206761
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
 
LVL 32

Expert Comment

by:jhance
ID: 6207154
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
 

Author Comment

by:ramrocket
ID: 6208226
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
 
LVL 1

Expert Comment

by:Moondancer
ID: 6451128
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
 
LVL 11

Expert Comment

by:griessh
ID: 6819161
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
 

Expert Comment

by:ComTech
ID: 6837614
Accepted recommendation by:

ComTech
CS Admin @ EE
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question