Obtain session's IP address

Platform: NCR Unix 3555

When I access our Unix system through a dial-in line,
my session will be assigned an IP address, is
there a command I can issue to find out the IP address
I'm currently assigned to??
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Use the command netstat -rn to display the routing table...
you'll see something like

Routing Table:
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------               UH       0      0  lo0               UH       0   3088  lo0         U        2    105  le0
default              UG       0    671  

One interface should be ipdpt0 or tun0 or something like that, that is the modem (ppp) interface, the IP address you have been
assigned is the one belonging to that interface (under the
gateway header).


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mindlessAuthor Commented:

Here's what I got when running "netstat -rn" from my dial-in

Routing tables
Destination          Gateway              Flags    Refcnt Use        Interface
142.205.224        U        0      89730541   en4
142.205.180        U        0      8921107    en3
142.205.116        U        0      0          en2         U        0      11923103   en0        U        0      0          en5
142.205.12          U        0      29665263   en1
default             UG       0      2650630    en0              UH       0      10         lo0      

When I said "dial-in", it was actually a dial-in and connect to
the company's LAN first, then telnet to the Unix box.  Would that
make a different?? Is that why I didn't see any lines from above
indicating "modem"??  Any way to determine which one is
my IP address??

which IP address you want to know? Are you dialing in from a Unix box or from a Windows machine? Are you connecting to a Unix Box or to a Win system?
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

which IP address you want to know? Are you dialing in from a Unix box or from a Windows machine? Are you connecting to a Unix Box or to a Win system?
mindlessAuthor Commented:
I'm dialing in from a Win95 machine to the company's
network, once connected to the LAN, I then
issue "telnet 123.456.78.90" to logon to that Unix
server.  Since I'm trying to use xterm via a dial-in line, I'll
need to obtain the dynamic IP address assigned
to this particular session in order to set the
DISPLAY value.  
Then you should issue the netstat command at the Win95 box. I think it should tell you something similar to what the Unix box does.  I'll try it later, but for now just open a ms-dos command window and try the command. Good luck.


mindlessAuthor Commented:

I tried to run the command from Win95 MS-DOS prompt after
got connected but nothing got returned,
Try the following:
  telnet to the unix box as usual, then:

$ last | head

you should be currently logged in and it should show where you're comming from. If a name appears and not an ip address, you can use:

$ nslookup host.domain.name

 to find out the IP address.



It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.