getip and gethostbyname (?) - Solaris

This is a discussion on getip and gethostbyname (?) - Solaris ; hi, i'm a solaris 9 newbie. I'll need a shell command to recover my local ip address (the same as hostname -i in linux) and another command to recover ip address given hostname (the same as getip name in HP-UX) ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: getip and gethostbyname (?)

  1. getip and gethostbyname (?)

    hi,
    i'm a solaris 9 newbie.
    I'll need a shell command to recover my local ip address (the same as
    hostname -i in linux) and another command to recover ip address given
    hostname (the same as getip name in HP-UX)
    Can you help me?
    thank you


  2. Re: getip and gethostbyname (?)

    marcodepe@tiscali.it wrote:
    > hi,
    > i'm a solaris 9 newbie.
    > I'll need a shell command to recover my local ip address (the same as
    > hostname -i in linux) and another command to recover ip address given
    > hostname (the same as getip name in HP-UX)
    > Can you help me?
    > thank you
    >


    netstat -r
    netstat -rn
    ifconfig -a

    will give you address and interfaces.
    /jörgen

  3. Re: getip and gethostbyname (?)


    Jorgen Moquist ha scritto:

    > marcodepe@tiscali.it wrote:
    > > hi,
    > > i'm a solaris 9 newbie.
    > > I'll need a shell command to recover my local ip address (the same as
    > > hostname -i in linux) and another command to recover ip address given
    > > hostname (the same as getip name in HP-UX)
    > > Can you help me?
    > > thank you
    > >

    >
    > netstat -r
    > netstat -rn
    > ifconfig -a
    >
    > will give you address and interfaces.
    > /jörgen


    thank for your help but i need to know a ip address of a remote host
    given name

    For example under HP
    # getip hpiv115
    172.16.174.213
    without having to look /etc/hosts file or call DNS server


  4. Re: getip and gethostbyname (?)

    marcodepe@tiscali.it writes:
    >
    >thank for your help but i need to know a ip address of a remote host
    >given name
    >
    >For example under HP
    ># getip hpiv115
    >172.16.174.213
    >without having to look /etc/hosts file or call DNS server
    >


    getent hosts hpiv115


    -Greg
    --
    ::::::::::::: Greg Andrews ::::: gerg@panix.com :::::::::::::
    I have a map of the United States that's actual size.
    -- Steven Wright

  5. Re: getip and gethostbyname (?)

    >> -Greg wrote:
    >> getent hosts hpiv115




    Thank you very much -)))))))))))))))))))))))))))))))))))


+ Reply to Thread