Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to get the Ip and gateway and mac address of the machine the user is working.

Posted on 2013-06-14
4
Medium Priority
?
836 Views
Last Modified: 2013-06-20
How to get the IP address/ MAC address and gateway of the machine.
0
Comment
Question by:searchsanjaysharma
4 Comments
 
LVL 2

Expert Comment

by:Pat-XP
ID: 39247927
Hi searchsanjaysharma,

Open up a command prompt,
Start,
Run,
CMD

Type in, ipconfig /all

All the information will show up in the results.

http://www.net.tufts.edu/images/Image23.gif

Regards,
Pat
0
 
LVL 31

Expert Comment

by:farzanj
ID: 39247928
What machine?  Linux?  Using Java?

In Linux you can issue command
ifconfig
OR
ip a

This shows you the information you requested.

For Windows try
ipconfig
on DOS prompt
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 1000 total points
ID: 39247972
How to get the IP address/ MAC address and gateway of the machine.
How would that help you? The ip address will be private (and therefore useless outside the lan). The mac address is also (normally) useless outside the lan. You can get the public facing ip of the gateway by doing

http://technojeeves.com/joomla/index.php/free/88-what-is-my-ip-java
0
 

Author Closing Comment

by:searchsanjaysharma
ID: 39265063
tx
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question