LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-24-2012, 10:47 AM   #1
jangulasion
LQ Newbie
 
Registered: Dec 2010
Posts: 5

Rep: Reputation: 0
Question How to discover IP of a device on a local network?


I have a linux box (BeagleBone) that connects to my local network and picks up an IP address from my router using DHCP. It runs a simple HTTP server.

To fine out what that IP address is, I have to check the router's DCHP clients list.

The idea is to give this board to a none-expert user who can plug it into his/her home router and begin browsing the website hosted by the board.

Is there any way to find out what the board's IP is without having to look it up on the router?

The board runs linux Angstrom, I can install Ubuntu on it if need be. I can install almost any package.
 
Old 04-24-2012, 11:42 AM   #2
yhcheang
LQ Newbie
 
Registered: Mar 2011
Distribution: Slackware
Posts: 16

Rep: Reputation: 7
How about setting a static Ip for your box? so that its Ip remains permanently.
 
Old 04-24-2012, 01:00 PM   #3
jangulasion
LQ Newbie
 
Registered: Dec 2010
Posts: 5

Original Poster
Rep: Reputation: 0
I can not do that. Because I don't know what kind of setup each user has. I want the user just take it home, plug it in and surf the website running of the board of the their phone or desktop.
 
Old 04-24-2012, 01:45 PM   #4
sirius12
LQ Newbie
 
Registered: Apr 2012
Posts: 9

Rep: Reputation: Disabled
what about nslookup hostname? Maybe i didn't understand your requirement. If the answer is stupid, just forget it ...
 
Old 04-24-2012, 02:00 PM   #5
jangulasion
LQ Newbie
 
Registered: Dec 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Im not familar with nslookup. Documentation says it "Queries a name server for a host or domain lookup."

I don't have a DNS running anywhere. do you I need one?

My need is very streight forward. Let's say you are in a local network and your machines IP is 192.168.1.5 . A new webserver on a linux box is also running on the same network but you dont know its IP address to reach it. What is the simplest way to find the IP of the server?

- You dont know the setup of the network. It could be 10.10.1.1 or 192.168.200.1 ,...
- You dont want the user to install something on their machine. They should just open the browser and reach the machine.

I am suspecting I should run a DNS server locally somewhere to keep track of the IP addresses. ?!!
 
Old 04-24-2012, 02:17 PM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,546
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
The classic solutions are fixed IP address or dynamic DNS working in conjunction with the DHCP server.

If you don't like either of those then you can scan the LAN address range for IPs with nmap -sP 192.168.0.1-254, substituting 192.168.0 with your local network values.
 
Old 04-24-2012, 02:39 PM   #7
jangulasion
LQ Newbie
 
Registered: Dec 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by catkin View Post
The classic solutions are fixed IP address or dynamic DNS working in conjunction with the DHCP server.

If you don't like either of those then you can scan the LAN address range for IPs with nmap -sP 192.168.0.1-254, substituting 192.168.0 with your local network values.
Thx, nmap is very helpful. But my goal is to minimize asking user to do anything special as much as possible.

Dynamic DNS is an option. I can have the board update the DNS with its IP. The problem with this setup is that the network must be connected to the Internet.

Is there any software I can run on the board (linux box) that can help? I can load up the board with whatever I want before handing it to a user to take it home.
 
Old 04-24-2012, 09:40 PM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,546
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by jangulasion View Post
Is there any software I can run on the board (linux box) that can help? I can load up the board with whatever I want before handing it to a user to take it home.
Whatever you put on your board, the problem remains that your user(s) don't know the IP address of your board so would be unable to connect with any services running on it except by using some sort of broadcasting technique to find it. Which OSes will the clients be running?
 
Old 04-24-2012, 11:05 PM   #9
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Your router probably maintains a table of hosts that have been assigned assesses. You may even be able to fix the IP address assigned to a device with the corresponding MAC address.

You can also use nmap to scan your LAN, and discover the address of your new device.
 
  


Reply

Tags
dhcp, ip


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot activate network device eth0 e1000 device saraja Linux - Newbie 1 09-12-2011 03:56 AM
[SOLVED] Creating simultaneous network connections to a VPN and local area network. Reactor89 Linux - Networking 2 06-03-2010 12:52 AM
CUPS unable to discover an HP 1022n Network Printer xasanchez Linux - Software 9 03-12-2009 09:38 AM
two network cards - one for local network, one for http/vsftpd server scottster Linux - Networking 1 01-20-2005 08:52 PM
Cannot resolve local addresses on local network danielgrenyer Linux - Networking 6 01-14-2004 11:03 AM


All times are GMT -5. The time now is 03:06 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration