Solved

Find a host with specific IP address.

Posted on 2013-11-04
5
633 Views
Last Modified: 2013-11-04
Hi
I got a very large network about 5000 users and I need to find a host where it’s located I only have ip address how can I find the host or the switch host is connected to.
Please advice
0
Comment
Question by:ciscosupp
  • 2
  • 2
5 Comments
 
LVL 14

Expert Comment

by:Giovanni Heward
ID: 39621995
You can resolve addresses to hostname via ping, tracert, or nslookup (among others):

ping -4 -a -n 1 192.168.1.1

Open in new window

tracert -4 192.168.1.1

Open in new window

nslookup 192.168.1.1

Open in new window


Use trace route to determine the nearest hop to the target IP address.  If you have access to that hop (e.g. router, switch stack, etc.), you can obtain the MAC address.  Use the MAC to identify the port.  Also with the MAC, you can determine the manufacturer of the NIC ( though this may be easily spoofed) via IEEE OUI lookup.  Once you have the port you can trace the line.

http://standards.ieee.org/develop/regauth/oui/public.html

If you use Cisco switches with CDP enabled, it's possible you could run this script I wrote on the target PC, to self-identify and report it's port.  Modify 127.0.0.1\c$ to reflect a central share.

@echo off
setlocal enabledelayedexpansion
rem Requires WinDump @ http://www.winpcap.org/windump/install/
rem        + WinPcap @ http://www.winpcap.org/install/default.htm
rem   OR
rem          TCPDUMP @ http://www.microolap.com/products/network/tcpdump/
echo Cisco CDP Port-ID Identifier v1.0 by Giovanni
set app=windump
set output=\\?\UNC\127.0.0.1\c$\PortID.txt
for /f "tokens=4" %%i in ('route print -4 0.*^|find "0.0.0.0"') do (
	if not [%%i]==[Default] (
		for /f "tokens=3 delims=," %%s in ('wmic nicconfig get IPAddress^,SettingID /format:csv^|findstr "%%i"') do (
			for /f "delims=." %%i in ('!app! -D^|findstr "%%s"') do (	
				!app! -i %%i -nn -v -s 1500 -c 1 ether[20:2] == 0x2000 | findstr "Device-ID Address Port-ID Platform"
			)>!output!
		)
	)
)
if exist !output! type !output!

Open in new window


Additionally, you can scan the IP address using a port scanner (such as Nmap) in an attempt to identify services and banners, to further identify the system.

nmap -sS -sU -T4 -A -v -Pn 192.168.1.1

Open in new window

0
 

Author Comment

by:ciscosupp
ID: 39622032
thanks for info.
How can i find the mac address when i only have ip
0
 
LVL 14

Assisted Solution

by:Giovanni Heward
Giovanni Heward earned 250 total points
ID: 39622082
You can check your ARP table, after initiating communication to the target IP.
arp -a|find "192.168.1.1"

Open in new window


If that fails you'll need to read and follow the instructions above.
Use trace route to determine the nearest hop to the target IP address.  If you have access to that hop (e.g. router, switch stack, etc.), you can obtain the MAC address.

If you have access to the nearest hop, provide the make/model of the router and we can provide the commands to issue on the router to identify the MAC address and port.
0
 
LVL 24

Accepted Solution

by:
Ken Boone earned 250 total points
ID: 39622090
So what you can do is login to the layer 3 default gateway devices.  Most likely a set of core switches in a network that size.  From there ping the ip address in question.  If you can ping it from the core switch, you can then look in the core switch's arp table.

For instance you ping 10.100.1.5

Then issue this command

show arp | i 10.100.1.5

If you successfully pinged it from the layer 3 device that is on that network, the arp table will show you the mac address.

Once you have the mac address you can issue this command:

show mac address-table address xxxx.xxxx.xxxx

where xxxx.xxxx.xxxx is the mac address.  This will show you what port that mac address is being learned on.  At first this will probably be a port that another switch is connected to.  If so go to that switch and enter the same command.  Do that until you get to the final switch, and then the result will be the port that that device is on.

Hope that helps.
0
 

Author Closing Comment

by:ciscosupp
ID: 39622168
thanks guys
:-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Radius Debug Error 16 54
Failing ALG SIP test for new VoIP phone system 4 49
Router assigned IP addresses 18 70
nexus filter logs 3 28
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now