Community discussions

MikroTik App
 
mmediaman
just joined
Topic Author
Posts: 7
Joined: Sun Apr 12, 2015 11:27 pm

Can The Dude use MAC only to discover devices?

Sun Apr 12, 2015 11:35 pm

Firstly, my apology if this question has been answered before, but I did search and couldn't find any relevant answer.

I would like to know if there is any way to tell The Dude to discover devices on the network based on MAC address only for the Network Map?

If the network has devices using DHCP, from one week to the next it is possible for the same device to show up more than once with one or more of it's previous connections shown as being down. This seems to result in quite a mess.

Thanks for any reply.
 
mmediaman
just joined
Topic Author
Posts: 7
Joined: Sun Apr 12, 2015 11:27 pm

Re: Can The Dude use MAC only to discover devices?

Mon Apr 13, 2015 4:04 pm

So apparently the MAC Lookup feature in a device setting parameters is supposed to accomplish this... specifically, the "mac to ip" option. However, does anyone know why when this is selected, the IP Addresses field blanks out. Where to find more information about exactly how to set this up?
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Can The Dude use MAC only to discover devices?

Mon Apr 13, 2015 5:54 pm

The mac address is only available by Address Resolution Protocol (ARP) on the locally connected segment, meaning if you are not on the subnet that you are trying to get the mac address from you would have to ask the router for the mac address table that the router is keeping. Then you could parse the table to find what MAC address is connected to what IP address.

Address Resolution Protocol is a broadcast, broadcasts do not cross router boundaries. To find a MAC address of a computer an ARP is sent to the local network to recover the MAC address tied to the IP address. Packets can't be crafted to find a MAC address directly in another segment.

The Dude grabs entire ARP tables from routers which have MAC addresses cached for fast correlation. So the Dude can determine an IP address from a MAC address only if it can reach a router with SNMP that is connected to the subnet that has the target MAC/IP.

I do not believe that there is a function in the Dude to acquire unknown MAC addresses and save their IP address then try to auto-discover said device.
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Can The Dude use MAC only to discover devices?

Mon Apr 13, 2015 6:02 pm

A quick way to think of how this works is source and destination mac addresses change at every hop, IP addresses do not.

When I create a packet for www.google.com my computer does a DNS lookup to find the IP address for Google. It does not create an ARP request since the address for Google is not on the local segment. Therefore when I send Google a packet the destination MAC address is the next hop (my router) and when my router forwards the packet the source mac becomes my router and destination MAC becomes the next hop out from my router. So each hop has new source and destination mac addresses but the source and destination IP addresses have not changed.
 
mmediaman
just joined
Topic Author
Posts: 7
Joined: Sun Apr 12, 2015 11:27 pm

Re: Can The Dude use MAC only to discover devices?

Mon Apr 13, 2015 7:52 pm

Thanks for the reply @lebowski

What I get from your comment is that the Dude can only get MAC info from a router in the LAN. My environment is a home network, so there is no network segments separated across routers etc. I do have 2 routers, one of which is acting more like a switch or AP. In any event, I still don't understand why if the Dude shows MAC address after discovering a device via IP, it can't keep the record of the device consistent based on the MAC it has registered.

I found a few more articles, one of which you commented further (http://forum.mikrotik.com/viewtopic.php?t=48399). However even then, it seems there is no certain way to get this working, or whether it really works in a way that makes sense as described in the clear example f the 48399 thread.

The following article also seems to state that the intent of the feature is to do just what me and the other user @PontiacCZ wants; http://wiki.mikrotik.com/wiki/Manual:Th ... C_mappings but somehow I must still not understand how this works.
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Can The Dude use MAC only to discover devices?

Tue Apr 14, 2015 4:47 pm

I assume you are using auto-discover. It is supposed to work if you set it up "mac to IP".

If you tried this and it keeps adding a 2nd object with a new ip address and the same mac address you could keep this from happening by giving everything a much longer lease or a reservation in DHCP so they always have the same IP address.
 
mmediaman
just joined
Topic Author
Posts: 7
Joined: Sun Apr 12, 2015 11:27 pm

Re: Can The Dude use MAC only to discover devices?

Tue Apr 14, 2015 6:17 pm

I assume you are using auto-discover. It is supposed to work if you set it up "mac to IP".
What does "set it up" mean? It seems the only thing to do is go into the Device Setting (properties) and choose "mac to ip" instead of "ip to mac" or "none".

When I choose "mac to ip", the IP address field label turns red and the IP it had there goes away. Dropping down the selector shows 0.0.0.0. OK button for the dialog goes gray and so nothing can be saved at that point.
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Can The Dude use MAC only to discover devices?

Tue Apr 14, 2015 10:38 pm

I think the MAC address and Lookup sections are for after the device is discovered. Yes, I mean set "mac to IP" in the device settings for a single device after it is discovered.

Supposedly if you have already discovered an object and have it configured with "mac to IP" selected instead of adding a 2nd copy of the object with the same mac address and a different IP address the already discovered object would change IP addresses.


I would just set the DHCP server timeout to be very long like 1 month then objects will not be changing IP addresses.

Earlier I stated that the dude gets the mac addresses from the router if the devices are on a different network. If you do not have SNMP working between the dude and the router this will not work.

You said you have a router connected to another router, are they 2 different networks? If router 2 is connected by the "wan" port to router 1 then they are probably 2 different networks. You can flatten your network so that the dude can learn MAC addresses directly by connecting router 2 by the "switch" port to router 1. You also need to make sure DHCP is disabled on router 2 since router 1 will handle this, this could be the reason you have devices changing IP addresses.
 
mmediaman
just joined
Topic Author
Posts: 7
Joined: Sun Apr 12, 2015 11:27 pm

Re: Can The Dude use MAC only to discover devices?

Wed Apr 15, 2015 1:15 am

Supposedly if you have already discovered an object and have it configured with "mac to IP" selected instead of adding a 2nd copy of the object with the same mac address and a different IP address the already discovered object would change IP addresses.
This is what I mean by there being no reliable way to get this configured. It shouldn't be so hard. If a new object is discovered, why can't the Dude recognize that if the MAC value is the same, it is one device with an updated IP? After all, it can't possibly be 2 devices with the same MAC.

I would just set the DHCP server timeout to be very long like 1 month then objects will not be changing IP addresses.
This is a fair idea I suppose. However after a month, there is still a chance to map object duplicates.

You said you have a router connected to another router, are they 2 different networks? If router 2 is connected by the "wan" port to router 1 then they are probably 2 different networks. You can flatten your network so that the dude can learn MAC addresses directly by connecting router 2 by the "switch" port to router 1. You also need to make sure DHCP is disabled on router 2 since router 1 will handle this, this could be the reason you have devices changing IP addresses.
Single network in a single family home. Router 2 is connected to Router 1 via the switch port and only one router is giving DHCP leases.
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Can The Dude use MAC only to discover devices?

Fri Apr 17, 2015 1:04 am

So either set a long lease time or put reservations for every computer. I agree it should be easier. I never us auto discover and I use "name to IP" but I have a DNS server where I can manually add and move things around. Anyhow there is another problem you will run into with auto discover since it will also add a duplicate cloud (network) with links to devices.

I wanted to like auto discover but I am happier with manually adding each object.. if you make auto discover work the way you hope I think that would be awesome but everyone has different requirement. So if you really need auto discover you might have to consider a different product.
 
mmediaman
just joined
Topic Author
Posts: 7
Joined: Sun Apr 12, 2015 11:27 pm

Re: Can The Dude use MAC only to discover devices?

Fri Apr 17, 2015 6:17 am

I only need Auto Discover to initially or periodically discover things connected to my network. I don't mind changing or copying them to being manually created objects afterwards.

Perhaps you can provide a bit more detail on your method.
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Can The Dude use MAC only to discover devices?

Fri Apr 17, 2015 9:11 pm

Almost everything I monitor has a static IP address or a reservation. If you just give everything a DHCP reservation your network is much more predictable. I am not monitoring desktops. I mostly monitor server and lots of network gear. Anything that is added is added manually and probes are added manually also. So everything I am monitoring is not moving around and should always be there.

For your home network I would configure SNMP on the computers and routers that you want to monitor. Set DHCP reservations for every object that is going to be monitored. Set a bunch of fake reservations to have a artificial boundary.
Configure Autodiscovery to only include the range of addresses that are not set as reservations.

For example your home network router is 192.168.1.1.
Set DHCP to give out addresses from 192.168.1.100 to 192.168.1.254. Put all your real reservations in starting at address 100. Put in a bunch of fake reservations to use up the rest of the address up to 192.168.1.127. There you have 27 static addresses and those devices will always stay those addresses. The artifical boundary will be 192.168.1.128. So now in auto discover set the range to discover to be 192.168.1.128/25. Which will only automatically add devices from addresses above 127 that are not reserved.

For the devices that you put static reservations in you can auto discover that range one time to add them... auto discover 192.168.1.100-192.168.1.127. then disable auto discover for this range.

Now you will only discover "new" devices in address space that is not reserved. You can move new devices into one of your 27 static addresses.

If you need more than 27 addresses you can increase those static addresses by allowing lower addresses to be reserved. So now nothing you care about is changing or being re-discovered, you can put the 128-254 auto discover on a sub map and not have it junk up your top map.

Lebowski
 
mmediaman
just joined
Topic Author
Posts: 7
Joined: Sun Apr 12, 2015 11:27 pm

Re: Can The Dude use MAC only to discover devices?

Sat Apr 18, 2015 5:15 am

Great!. Thanks for the thorough reply @lebowski. I will try it. Perhaps MikroTik will see this thread and realize they could have saved us all a lot of work by making Autodiscover smarter. Then again, the Dude is free, so can't complain too much :D

Who is online

Users browsing this forum: Amazon [Bot] and 76 guests