LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-13-2008, 08:05 AM   #1
XavierOnassis
LQ Newbie
 
Registered: Jan 2003
Location: Midwest US
Distribution: Ubuntu Feisty Fawn and Dapper Drake
Posts: 14

Rep: Reputation: 0
Discovering IP address


I have a WRT54GL set up as a wireless bridge (with DD-WRT) to a WRTP 54G plugged into a four port SMC firewall/router.

I know the IP of both the SMC and the WRTP54G but I cannot remember the IP address of the wireless bridge.

Nothing I've tried (or can think of.. arp -n, tracert, etc) has revealed the IP address for this router.
What can I do to discover it's IP address?
 
Old 02-13-2008, 08:08 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
If you know in what subnet it is in, you could (with a script maybe) try trough all the IPs - about two and a half hundred at maximum. Probably you'll hit the address sooner; if the address wasn't set completely randomly, try starting at the beginning and the end of the address space.

And if you are connected and send packets trough all the devices and trace their route, shouldn't that reveal the IP or am I missing something?
 
Old 02-13-2008, 09:02 AM   #3
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
Go to the WRTP54G via browser, probably 192.168.1.1 and check the connected clients status page. Should reveal the WRT54GL.
If you're connected through wifi, just do: traceroute www.google.com
 
Old 02-13-2008, 09:24 AM   #4
XavierOnassis
LQ Newbie
 
Registered: Jan 2003
Location: Midwest US
Distribution: Ubuntu Feisty Fawn and Dapper Drake
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by b0uncer View Post
If you know in what subnet it is in, you could (with a script maybe) try trough all the IPs - about two and a half hundred at maximum. Probably you'll hit the address sooner; if the address wasn't set completely randomly, try starting at the beginning and the end of the address space.
This is another point that's confusing me.
The first router's IP 192.168.15.1 with 249 addresses starting at 192.168.15.100. But I can access it using 192.168.15.1 or 192.168.2.14 (the SMC is 192.168.2.1)
The three machines on the bridge are 192.168.15.101, .102. and .103
So the bridge ought to be within the .100 to .249 range?


Quote:
And if you are connected and send packets trough all the devices and trace their route, shouldn't that reveal the IP or am I missing something?
That's what I thought but running traceroute against the router (which is of course, on the other side of the firewall) show it's IP as the first hop but doesn't show the firewall at all.

Last edited by XavierOnassis; 02-13-2008 at 09:53 AM.
 
Old 02-13-2008, 09:31 AM   #5
XavierOnassis
LQ Newbie
 
Registered: Jan 2003
Location: Midwest US
Distribution: Ubuntu Feisty Fawn and Dapper Drake
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by makuyl View Post
Go to the WRTP54G via browser, probably 192.168.1.1 and check the connected clients status page. Should reveal the WRT54GL.
If you're connected through wifi, just do: traceroute www.google.com
Traceroute times out on the first hop:
1 * * *

the second hop is the address of the firewall then it ignores the first router then - out to the WAN.
The router is 192.168.15.1 and the SMC is 192.168.2.1 - I don't get why the first router isn't shown.
 
Old 02-13-2008, 04:20 PM   #6
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
If you have boxes connected to the wifi router a "route -n" on one of them should show the gateway.
Cut off power to one router at a time and see what route and ping gives you.
 
Old 02-14-2008, 07:14 AM   #7
XavierOnassis
LQ Newbie
 
Registered: Jan 2003
Location: Midwest US
Distribution: Ubuntu Feisty Fawn and Dapper Drake
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by makuyl View Post
If you have boxes connected to the wifi router a "route -n" on one of them should show the gateway.
Cut off power to one router at a time and see what route and ping gives you.
Yeah, it's showing the gateway - the first router - but not the bridge.

I've been meaning to get around to learning about bash scripting - this looks like a good time to do it.

I can't quite imagine what the script would do... ping each possible IP?
 
Old 02-14-2008, 02:07 PM   #8
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
Ping should do it unless you've dropped icmp on the bridge.
Might be as easy to just reset the device to factory settings which should set it to 192.168.1.1. Should have a microswitch in a hole somewhere. You would of course have to set it up again.
Why not just connect only the bridge to your box and nmap or ping an IP range to find it, or can't you lose the wifi momentarily for that?
If you disconnect the router-bridge wire, "route -n" on a connected box should show it as gateway, not the router.

EDIT: No need to write a script unless you want to, plenty on google like this one:
http://larsen-family.us/bash_scripts...ipts.html#scan

Last edited by makuyl; 02-14-2008 at 02:13 PM. Reason: Added link
 
Old 02-14-2008, 03:24 PM   #9
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Don't re-invent the wheel, Scan the subnet with a nmap Ping scan.

nmap -sPR 192.168.1.0/24

That should return all pingable hosts from 192.168.0.1-192.168.0.254, and resolve their names if possible.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Method to discovering blocks linux_10_1 Linux - Newbie 5 01-04-2006 11:27 AM
Discovering sambaSID Tagge Linux - Software 3 03-21-2005 03:15 PM
discovering hosts splat Linux - Networking 1 09-24-2003 08:58 AM
Discovering your IP address for the internet TrashCanMan Linux - Newbie 3 07-13-2003 07:23 AM
Discovering your version... Stephanie Linux - General 4 01-09-2002 08:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:46 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration