LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-30-2015, 12:58 AM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 11
Post How can I find default Gateway of a remote IP?


Hello.
Can I find default gateway of a remote IP in Local network?

Tnx.
 
Old 11-30-2015, 03:54 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Interesting question. Possible answers: http://stackoverflow.com/questions/2...y-without-dhcp.

EDIT: To discover what routers are on the network, use https://en.wikipedia.org/wiki/ICMP_R...overy_Protocol and the rdisc daemon. This won't tell you, though, which router serves which IP address.

MORE EDIT: You can install OSPF software like Quagga to figure this out, but I guess it's not an easy task.

Last edited by berndbausch; 11-30-2015 at 04:06 AM.
 
1 members found this post helpful.
Old 11-30-2015, 09:25 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,973

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Do you mean the actual configured gateway address that the network uses in linux or do you mean a physical gateway?
 
Old 01-27-2016, 12:32 PM   #4
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 349

Rep: Reputation: 60
Just do a traceroute to the ip you want. you are likely to see its gateway in the last hop just before the trace reaches its destination.

Hope that helps.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding default gateway and aditional gateway veru.naresh Linux - Networking 1 06-13-2012 07:34 AM
normal default gateway reapperas with openvpn redirect-gateway jonnytabpni Linux - Networking 2 04-23-2009 02:11 PM
Default gateway dooda5555 Linux - Networking 1 06-17-2005 11:43 AM
HELP default gateway MrSavage Linux - Newbie 2 01-10-2005 07:46 AM
What's a default gateway and do I need one? Travis86 Linux - Newbie 8 05-25-2003 05:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration