Is there a protocol to find gateway? - Redhat

This is a discussion on Is there a protocol to find gateway? - Redhat ; Hi, Is there a protocol which will determine gateway? My problem arises when I have a system which is configured with static IP address. However I don't want to specify the gateway. It would be nice if there is a ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Is there a protocol to find gateway?

  1. Is there a protocol to find gateway?

    Hi,

    Is there a protocol which will determine gateway? My problem arises
    when I have a system which is configured with static IP address.
    However I don't want to specify the gateway. It would be nice if there
    is a protocol which can determine gateway information for my system.

    Thanks,

  2. Re: Is there a protocol to find gateway?

    Atit wrote:
    > Hi,
    >
    > Is there a protocol which will determine gateway? My problem arises
    > when I have a system which is configured with static IP address.
    > However I don't want to specify the gateway. It would be nice if there
    > is a protocol which can determine gateway information for my system.
    >
    > Thanks,


    But the gateway is something you _want_ to choose. If you want to see
    what has happened fortuitously, you can look with netstat. Normally, if
    you have a dial-up (ppp*) connection, that is it. But it might not be
    what you want.

    trillian:jdbeyer[~]$ netstat -rn
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    12.34.56.78 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
    192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
    192.168.1.0 0.0.0.0 255.255.255.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 12.34.56.79 0.0.0.0 UG 0 0 0 ppp0

    may help you. Look for the line with destination 0.0.0.0; the next
    column is the IP address of the gateway machine and the Iface (in this
    case, ppp0) is the interface device.

    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ Registered Machine 241939.
    /( )\ Shrewsbury, New Jersey http://counter.li.org
    ^^-^^ 14:25:00 up 5 days, 10:40, 3 users, load average: 4.09, 4.11, 4.05


+ Reply to Thread