Find Origin of Route/MAC
========================

Commands
========
    - netq [<hostname>] show macs origin
    - netq [<hostname>] show ip routes origin
    - netq [<hostname>] show ipv6 routes origin

Usage
=====
Netq can be used to provide insight into the origin of dynamic routes in the
network. This can help identify conditions with overlapping subnets,
incorrectly redistributed networks or tracking down problematic hosts.
With MACs, you can use this feature to find the originating node of a MAC
address.

A node is considered to be originating a route if the route is a kernel,
connected, or static route on a node. A node is considered to be the origin
of a MAC if the MAC is owned by an interface on that node or the node is the
edge of the NetQ world and the MAC has been learnt on a port on that node.

     cumulus@torc-21:mgmt-vrf:~$ netq show ip routes 3.0.0.0/26 origin
     Matching IP route records are:
     Origin Table            IP               Node             Nexthops       Last Changed
     ------ ---------------- ---------------- ---------------- -------------- ------------
     1      DataVrf1080      3.0.0.0/26       torc-11          VlanA-1.100    13h ago
     1      DataVrf1080      3.0.0.0/26       torc-12          VlanA-1.100    13h ago
     1      DataVrf1080      3.0.0.0/26       torc-21          VlanA-1.100    19s ago
     cumulus@torc-21:mgmt-vrf:~$

In the example above, we see that there are three nodes originating the route
for 3.0.0.0/26. If this is an error it can be caught quite easily. The above
output also shows that torc-21 started advertising the route only recently,
19s ago. So, this is most likely an error.

Thus a check for duplicate route origins is as simple as:

    cumulus@torc-21:mgmt-vrf:~$ netq show ip routes 3.0.0.0/26 origin count
    Count of matching routes: 3
    cumulus@torc-21:mgmt-vrf:~$
