LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   need help with finding a router that I am connected to (https://www.linuxquestions.org/questions/linux-newbie-8/need-help-with-finding-a-router-that-i-am-connected-to-948704/)

jzoudavy 06-05-2012 06:21 PM

need help with finding a router that I am connected to
 
Hi all

I have a quick question. I have a linux machine that is connected to a router.

I am trying to find out the ip of that router. I did ifconfig and got a whole bunch of IPs. But is there a way to know which of them is the ip of the router?

As for the distro of linux, it is some kind of corporate modified version of suse, not entirely sure.

Thanks everyone
Davy

below is my output, I have removed a few that's obviously not it, such as loopback and broadcast:

Proc_m1_s1# ifconfig
eth0
inet addr:172.16.8.129 Bcast:172.16.255.255 Mask:255.255.248.0

eth1
inet addr:172.16.0.129 Bcast:172.16.255.255 Mask:255.255.248.0


eth2
inet addr:10.118.118.88 Bcast:10.255.255.255 Mask:255.255.255.128


tipct0
inet addr:172.16.32.129 Mask:255.255.248.0

tipct1
inet addr:172.16.39.254 Mask:255.255.248.0

AwesomeMachine 06-05-2012 07:08 PM

Home-networking routers have outward facing IPs and inward facing IPs. Commercial routers just keep track of routes with a routing table. Addresses are given out by a DHCP server.

kbp 06-05-2012 07:20 PM

The router will %99.9999 of the time be your default gateway, try
Code:

netstat -nr
or
Code:

ip route

frankbell 06-05-2012 09:12 PM

This site will give you your outward facing ip:

http://www.whatismyip.com/

The router's local ip is most likely 172.16.0.1. x.x.x.1 is by convention the gateway (router) address in a home network.

This is without a doubt the best online tutorial on subnetting I've ever read. Don't be fooled by the HTML 3 format. It's well-written, clear, and easy to read: http://www.ralphb.net/IPSubnet/index.html

jzoudavy 06-12-2012 09:31 AM

thanks guys
 
hey guys

thanks for all your help, the netstat -nr helped quite a bit.

Thanks


All times are GMT -5. The time now is 05:00 AM.