Solved

Retrieve IP addresses from Cisco Switch Ports

Posted on 2004-10-07
6
11,987 Views
Last Modified: 2013-11-13
Looking to get the corresponding ip address of the switch port.
I run show ip arp and show mac address table on the switches and save results in seperate text files.
I then run a perl script on these files to retrieve the ip address, machine names , vlan etc.
problem is however not all ports are outputting arp details so only getting info on some ports
Does anyone know of a workaround to this problem
0
Comment
Question by:mulpeter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 27

Expert Comment

by:pseudocyber
ID: 12247922
You're only going to get ARP details matching an IP address to a port if in fact IP is running on the port in question.  In some cases, it might not be.
0
 
LVL 43

Expert Comment

by:JFrederick29
ID: 12248051
Entries will only be in the Mac Address table if a machine is connected to the port and is turned on and communicating on the network.  The entries age out so if a machine is turned off, its ARP/MAC entries will eventually age out and be removed from the tables.
0
 
LVL 10

Expert Comment

by:ngravatt
ID: 12248813
Typically you would need to find it on one of your machine's arp tables.  If there is a router in your network, this is usually the most central place to gather that type of info.  On a cisco router, the command is "show arp" - it will give you a listing of the MAC addresses and their corresponding IP address.  On a windows box, from a DOS prompt you can type "arp -a" to see similar output.
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 10

Expert Comment

by:ngravatt
ID: 12248837
i forgot to say.  switches (most) only work at layer 2, so they never see IP addresses. Routers work at Layer 3, so they learn IP addresses for use in the routing tables and such.
0
 
LVL 79

Expert Comment

by:lrmoore
ID: 12248897
If you have a router and a switch, you can use the ARP cache of the router.
Switch holds mac-address to switchport mapping - get the mac table
Router holds mac-address to IP address mapping - compare arp table to switch mac table
WINS/DNS holds IP address to NetBios host/user mapping - resolve IP's to netbios/host names

You need to use all three in concert to keep tabs on who's on first.

Take a look a Solarwinds switchport mapper. Free 30 day eval just to see how it works:
http://www.solarwinds.net
0
 
LVL 11

Accepted Solution

by:
PennGwyn earned 250 total points
ID: 12260400
Machines will appear in the ARP table only if they have sent traffic seen by this device within the timeout period.  When I'm faced by a similar challenge, I begin with a broadcast ping (your equipment might not propagate that, and so you might need to do a fast ping scan instead).  Every device that wants to answer the ping must arp for its origin first, and that gets their MAC address into the switch arp table if it had timed out.

0

Featured Post

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

Suggested Solutions

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

751 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