-   Linux - Networking (
-   -   how do i find my gateway address on eth0? (

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 U 0 0 0 eth1 U 0 0 0 eth0 U 0 0 0 eth1 U 0 0 0 lo UG 0 0 0 eth0
now my problem is I assumed 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 netmask 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.

raylpc 08-19-2003 11:41 AM

seth 08-19-2003 04:18 PM

kinda what I though but it didn't go.

rlwilen 10-09-2008 03:50 AM


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,


route -nee  U    1      0        0 eth0    0    0      0        UG    0      0        0 eth0    0    0 

ip route show

default via 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:

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

All times are GMT -5. The time now is 02:57 PM.