Solved

Parent Router

Posted on 2001-06-15
11
247 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
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 200 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
 

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now