Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Mar 27, 2017 1:47 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: IP addresses to MAC addresses association
PostPosted: Thu Aug 11, 2011 4:55 am 
Offline

Joined: Thu Jul 14, 2011 1:55 am
Posts: 10
Hi guys,

I had a problem with mactrack for IP addresses to MAC addresses association. I have added to mactrack a router which know all the IP of my network and some switches. The stuff was that for the router, all the MAC address entries got their IP address associated, but the switch didn't. Even so the mac address was the same. So when I did a search by IP for exemple, mactrack told me that this IP was connected to the router (which is normal because my router know ALL the IP). But for me, I need to know on what switch this IP is connected. Actually there is a trick, i can search the IP in the IP address tab, then copy the associated MAC, go to the MAC tab, filter the results with the MAC address and I finnaly find the switch, but...It's not optimal at all.

So I figured out that there is some code in "poller_mactrack.php" which normally do this association, but it doesn't work in my configuration. So I have modified some piece of code in "poller_mactrack.php" and it currently work very well now.

So now when I search an IP I have :
- if the IP (so the MAC as well) is known by the router but there is no switch which actually know this MAC, mactrack tell me that this machine is connected to the router -> good.
- if the IP (so the MAC as well) is known by the router and there is a switch which know this MAC, mactrack tell me that this machine is connected to this switch -> good.
- I have all my MAC entries associated with an IP for all my switches -> good

I join my "poller_mactrack.txt" in case other people have the same problem, you could tell me if it works for you as well ?
Rename it "poller_mactrack.php" (the forum doesn't allow upload of php files).

My configuration :
- cacti 0.8.7g installed on a CentOS distribution
- cacti plugin architecture v2.8
- mactrack v2.9


Attachments:
poller_mactrack.txt [29.95 KiB]
Downloaded 594 times
Top
 Profile  
 
 Post subject: Re: IP addresses to MAC addresses association
PostPosted: Wed Aug 17, 2011 5:46 am 
Offline

Joined: Wed Jul 19, 2006 10:52 am
Posts: 6
Uhm, nice. :)

...just took your poller.php and now I'll give it a try. Report if it's working like a charm... :)


//

Yeah, it does! Really great...

...but it seems just to work for new devices (or old devices moved to another switch port).
Just flushed the scan results and give it a damn new try. :)

Thank you for this patch!


Top
 Profile  
 
 Post subject: Re: IP addresses to MAC addresses association
PostPosted: Fri Sep 02, 2011 3:20 am 
Offline

Joined: Wed Jul 19, 2006 10:52 am
Posts: 6
Syntax, sorry for hijacking your thread.. :) but perhaps it's about nearly the same issue!?

We'll see... :)

Attachment:
ScreenShot001.jpg
ScreenShot001.jpg [ 31.97 KiB | Viewed 8511 times ]


..this is the "IP addresses" tab... the records on the screenshot show that they are connected to the Layer3 backbone switch.
All IP addresses (over 400) are shown as being connected to it.

Of course... only the router / L3 switch does have an arp / mac table.

But... for me it's important to see which IP is connected to which switch (L2).


The second is... the "ED DNS Hostname" is not filled... but as we can see... under the "MAC address" tab all DNS is filled up correctly.

Attachment:
ScreenShot004.jpg
ScreenShot004.jpg [ 37.82 KiB | Viewed 8511 times ]



So... under "IP address" tab... why does it show the IPs connected to the backbone switch(L3) while they are connected to different L2 switches at the same "site".
And we is the field "ED DNS" not filled up while it's filled in the "MAC address" tab correctly!?


Any suggestion from your side?


Top
 Profile  
 
 Post subject: Re: IP addresses to MAC addresses association
PostPosted: Thu Sep 08, 2011 1:30 pm 
Offline

Joined: Thu Jul 14, 2011 1:55 am
Posts: 10
For me the Tabs "IP adresses" and "MAC adresses" aren't named correctly, I would name them "L3" and "L2".
I mean the "IP adresses" tab will show you the IP and Mac which are present in the ARP table of a L3 device as the "MAC adresses" tab will show you the MAC (so the IP as well by association with the ARP table of the L3 device) which are present in the MAC table of a L2 device.

So if you want to see which IP is connected to which switch, go to the "MAC adresses" table (I know, its a bit confusing :lol: ).

For your DNS issue, I have no clue, sorry :(


Top
 Profile  
 
 Post subject: Re: IP addresses to MAC addresses association
PostPosted: Mon Oct 03, 2011 6:03 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
Can someone open a bug at http://bugs.cacti.net Under the Project 'Cacti Plugins' and attach the modified file. Otherwise, I'll never remember to apply it.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Re: IP addresses to MAC addresses association
PostPosted: Tue Jun 12, 2012 6:16 pm 
Offline

Joined: Tue Jun 12, 2012 5:30 pm
Posts: 3
I am still seeing this. Should this be fixed in 2.9-1?


Top
 Profile  
 
 Post subject: Re: IP addresses to MAC addresses association
PostPosted: Fri Oct 02, 2015 6:20 am 
Offline

Joined: Mon Sep 07, 2015 6:31 am
Posts: 2
I have this problem with my 08.8b.

attempted to install the poller and everything failed, as its probably not updated.

all my ip's are listed with the port number on my router even if its attached to other switch.

so any new changes here that can help me associate the ip with the mac?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group