LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how do i find my gateway address on eth0? (http://www.linuxquestions.org/questions/linux-networking-3/how-do-i-find-my-gateway-address-on-eth0-83484/)

seth 08-19-2003 08:53 AM

how do i find my gateway address on eth0?
 
just as the topic says how do I find out what my cable internet company has set my gateway to:Pengy:
thanks a bunch

cnjohnson 08-19-2003 09:32 AM

As root do this:

netstat -nr

You should see the gateway address.

seth 08-19-2003 09:45 AM

thank you.

seth 08-19-2003 11:30 AM

i get this when i do that
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
24.100.238.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 24.100.238.1 0.0.0.0 UG 0 0 0 eth0
now my problem is I assumed 24.100.238.1 is the gateway that my cable is using but for some reason it says it can not route to it so I could not run this command.
route add -net 192.168.10.0 netmask 255.255.255.0 gw XXX.XXX.XXX.XXX dev eth1
the xxx being the gateway address.
anyone have any idea?

seth 08-19-2003 11:31 AM

that table did not turn out well but I have to go to lunch if anyone can figure it out cool it not when I come back I will type out the table properly.
thanks.

raylpc 08-19-2003 11:41 AM

24.100.238.1

seth 08-19-2003 04:18 PM

kinda what I though but it didn't go.

rlwilen 10-09-2008 03:50 AM

Quote:

Originally Posted by cnjohnson (Post 432039)
As root do this:

netstat -nr

You should see the gateway address.

thank you that help a lot thank you

++nick++ 09-30-2009 11:27 AM

In addition to the above , you could also try,

Code:

route -nee

123.236.216.0  0.0.0.0        255.255.248.0  U    1      0        0 eth0    0    0      0
0.0.0.0        123.236.216.1  0.0.0.0        UG    0      0        0 eth0    0    0 


ip route show

default via 123.236.216.1 dev eth0  proto static


dfowensby 03-20-2010 03:30 PM

that ip looks suspiciously like cox cable's windows/mac autoconfig download app address.....

devwatchdog 03-21-2010 03:42 AM

I just realized after glancing back at this thread, that our own dear dfowensby has decided to take it upon him/herself to make off-topic replies to old threads. Nice.

I see a gateway address already assigned to a system that appears to have a functional routing table.

Why are you trying to assign another gateway? Unless you're doing advanced routing, there should be no need to do so. The way you have your system configured now, when network activity that cannot be satisfied with the various routes you have assigned, that request is then forwarded to the default gateway.

It appears your system isn't working properly. What is the problem?

If I were to guess, I would think that IP forwarding isn't configured. Check out this site and see if you have it enabled:

http://www.ducea.com/2006/08/01/how-...ding-in-linux/

If that is configured correctly, let us know what the issue is.


All times are GMT -5. The time now is 09:38 AM.