Crazy customer of mine gave Meraki a block of IP addresses to assign that overlaps IP space already in use in their data center (gave Meraki a 10/8 to hand out /24). By some miracle, Merkai has not yet assigned one of the overlapping /24 to a store. I have talked to Meraki Support and they do not believe they have an API that can query for this information.
This information must be saved somewhere in a Meraki database, otherwise Meraki itself, would reassign a subnet it had already assigned. Does anyone know a way, short of going to each site, to determine what i[ addresses have been assigned, and, hopefully, what IP are active within each scope????
Solved! Go to solution.
Thanks, and I'll take that python script when you find it.
The mx routing table shows the active subnet that are used. Non vpn subnets can be the same
Good answer. Sort of kicking myself for not thinking of this. Add this to the list of what my customer is doing wrong--they are allowing all 3500 spokes to elarn every other spoke's IPs, even though the MX450s are advertsing a 0/0.
Though, I do wish Meraki had a better API to display the DHCP info....
This V1 API call for vpnStatuses will pull the VPN subnets.
vpnstatuses = dashboard.appliance.getOrganizationApplianceVpnStatuses(organization_id, total_pages='all')
Simple loop to get all in use subnets by location. I may have a sample python script that does just that if you need it.
{'deviceSerial': 'Q2PN-****-****',
'deviceStatus': 'online',
'exportedSubnets': [{'name': 'Office', 'subnet': '10.21.180.0/24'},
{'name': 'DMZ', 'subnet': '10.21.181.0/24'},
{'name': 'Wireless', 'subnet': '10.21.182.0/24'}],
'merakiVpnPeers': [{'networkId': 'N_*****************',
'networkName': 'Datacenter********1',
'reachability': 'reachable'},
{'networkId': 'N_*************************',
'networkName': 'Datacenter***********2',
'reachability': 'reachable'},
{'networkId': 'N_******************************',
'networkName': 'Datacenter*************3',
'reachability': 'reachable'}],
'networkId': 'L_***************************',
'networkName': 'Remote Location **********1',
'thirdPartyVpnPeers': [],
'uplinks': [{'interface': 'wan1', 'publicIp': '198.###.###.###'},
{'interface': 'wan2', 'publicIp': '47.###.###.###'}],
'vpnMode': 'spoke'}
Thanks, and I'll take that python script when you find it.
Didn't find the one that writes to a csv filem, but this will dump to the screen and be pretty close for pulling into excel.