Community Record
39
Posts
14
Kudos
2
Solutions
Badges
Jun 7 2022
12:13 PM
There is python code I found here--> https://developer.cisco.com/codeexchange/github/repo/johshea/export_Mpolicy_objects He wrote a routine that will allow you to pull network objects and groups from the portal into a JSON formatted file. I had to modify the code some to work in our environment, but it worked great.
... View more
Jan 24 2020
6:35 AM
1 Kudo
Hello, So I think I've done it. I tested it on 3 networks and it worked. See the code below: import csv from datetime import datetime import os import meraki # Either input your API key below by uncommenting line 10 and changing line 15 to api_key=api_key, # or set an environment variable (preferred) to define your API key. The former is insecure and not recommended. # For example, in Linux/macOS: export MERAKI_DASHBOARD_API_KEY=093b24e85df15a3e66f1fc359f4c48493eaa1b73 api_key = 'xxx' def updateNetworkVlan(self, networkId: str, vlanId: str, **kwargs): csv_file = open('TestScript.csv') csv_reader = csv.reader(csv_file, delimiter=',') # csv_reader stocheaza id retea si subnet print(csv_reader) for NetworkID, Subnet, IP in csv_reader: print(NetworkID, Subnet, IP) collect = {} network_id = NetworkID collect[NetworkID] = network_id vlan_id = '1' collect['vlan_id'] = vlan_id update_network_vlan = UpdateNetworkVlanModel() update_network_vlan.name = 'Agentii' update_network_vlan.subnet = Subnet update_network_vlan.appliance_ip = IP update_network_vlan.dhcp_handling = DhcpHandlingEnum.ENUM_RUN_A_DHCP_SERVER update_network_vlan.dhcp_lease_time = DhcpLeaseTimeEnum.ENUM_1_DAY update_network_vlan.dhcp_boot_options_enabled = False update_network_vlan.dhcp_boot_next_server = 'null' update_network_vlan.dhcp_boot_filename = 'null' update_network_vlan.dns_nameservers = 'google_dns' collect['update_network_vlan'] = update_network_vlan result = vlans_controller.update_network_vlan(collect) One more question tough, after I run it I would like to get a print back that everythong was OK or if I got any errors on any networks. How can I do that? Really appreciate the guidance !!
... View more
Jan 20 2020
12:45 PM
4 Kudos
This screams Node-Red to me. Google "Node-Red Meraki". There are several pre-made dashboards available. You could start with one of those and modify it. Meraki's Cory Guynn has also done a training video on it if you like what you see. https://www.brighttalk.com/webcast/17628/380935 You can also check out Meraki's blog on it. https://meraki.cisco.com/blog/2019/10/take-the-work-out-of-programming/ It is also on the developer web site. https://developer.cisco.com/docs/meraki-dashboard-api-node-red-node/
... View more
Dec 6 2019
2:04 PM
1 Kudo
FYI team, we just released a complete update of the Python SDK/library. You can find more details here on this post in the Early Access Developer Program: https://community.meraki.com/t5/Developer-Early-Access-Resources/Python-SDK-entirely-revamped-amp-updated-package/ba-p/69842
... View more
Oct 1 2019
10:24 AM
@MerakiDave do you know if this will be added to the Python module at some point in the near future?
... View more
Sep 23 2019
3:43 AM
Should you be using the same vlan on those SSIDs?
... View more
Jun 7 2019
12:04 PM
Correct, the option in the switch settings page counts for every switch unless overridden. So you could have omitted it from the switches if you had set in in switch settings.
... View more
Jun 4 2019
11:51 AM
Well, if you're able to use 40 MHz if the channel plan allows for it. Then you will have the advantage of using it because even though you cap the througput of every client to 25 Mbps, they will need less time on the air to actually transmit that 25Mbps of traffic. Because if 40MHz is possible, the potential datarate per device can go up and you could potentially have more efficient use of the airtime. However if the channel plan doesn't allow it because you get co-channel interference from a distant AP on the same channel and then you need to fall back to 20 MHz. This is one of the main reasons to keep your celsizes on the small side and avoid putting AP's in corridors.
... View more
Jun 3 2019
3:34 PM
5 Kudos
Congratulations to our contest winners, @Franzman and @nbentsendk!👏👏👏🎉
... View more
May 28 2019
5:14 AM
Remove the Vlan ID and scan all Vlans for that client.
... View more
May 17 2019
4:02 PM
By the way, check out this post about applying Group Policies and changing names. It only seems to apply to Wireless clients. https://community.meraki.com/t5/Dashboard-Administration/Update-Client-Name-using-API/td-p/41755
... View more
@SoCalRacer You have to contact Meraki support to disable 802.11k. They do it on a per MR and per SSID basis. You can reference my case number so they have some context: 03790307 The test RingCentral wants me to try is to determine if this is iOS or RC app specific. I would have to call support to have them "break it" again and then run to iOS devices at the same time while waiting for the RC app call to interrupt. Then see if it happens on a different voip app, Dialpad is the one I am planning to test with. You can see why I don't have time for this 😉
... View more
May 13 2019
4:03 PM
1 Kudo
For whatever reason, it does not like Version 2 when I run the code. I changed it to run on Version 3 and it worked. Using VSC and the code runner you are utilizing. Try running the following Commands to determine what version it is using to execute to script: import sys
print(sys.version_info) If you are using Code Runner on VSC, you want to add the following to the settings.json file: "code-runner.executorMap": {
"python": "<fully qualified path to version 3>"
} This will change the default python version for Code Runner to Version 3. I usually use Atom and didn't have any problems. I installed VSC and tried it with Code Runner and immediately had issues. I had already pointed Atom to use python3, when I used other methods to run it on 2 I got the same error message.
... View more
May 13 2019
2:12 PM
Ok, the issue is that you can't have your script in the same folder as meraki.py. I took a look at the code and the reason it failed the first time when you put it in the same folder as meraki.py is that the code assumes the remainder of the modules are under the meraki folder. By running your script on the same folder as meraki.py file then that means you are in the meraki folder and therefore the path of the script starts there. So you would have to change the path in order for it to work, because it references the folder it is in. Or you can just run it outside the folder. (I would recommend this so you don't have to change anything in the modules). That is why it failed and you get the error "No module named 'meraki.decorators'". Apologies, oversight on my part. Another thing I noticed when it did work for you, you are importing the file "meraki.py". What you really want to import is the Class object "Meraki" it is case sensitive. So you have to import it as: from meraki.meraki import Meraki the first meraki tells the folder, the second tells the File name, the import functions states that it wants to import something from the file. And the "Meraki" states what you want to import. Try running this in your testsdk.py: from meraki import meraki
x_cisco_meraki_api_key = 'x_cisco_meraki_api_key' ##CHANGE this to your Meraki API key
client = Meraki(x_cisco_meraki_api_key)
organization_id = 'organizationId' ##CHANGE this to an OrganizationID you are using to test
admins_controller = client.admins
result = admins_controller.get_organization_admins(organization_id)
print (result)
##You will see the admins of the Organization printed in a Dictionary format. It will fail because the import is not correct. In order to utilize it in your "testsdk.py" script you will have to change the following line client = Meraki(x_cisco_meraki_api_key) to client = meraki.Meraki(x_cisco_meraki_api_key) since you need to call the Class Object in that file in order to create this variable. And anytime you utilize it you will have to call it with "meraki." leading that call. As shown above. it is easier if you just use the following to import: from meraki.meraki import Meraki so you don't have to call "meraki.Meraki" every time you call the Meraki object. It is a matter of preference. Try the following with the corrected import: from meraki.meraki import Meraki
x_cisco_meraki_api_key = 'x_cisco_meraki_api_key' ##CHANGE this to your Meraki API key
client = Meraki(x_cisco_meraki_api_key)
organization_id = 'organizationId' ##CHANGE this to an OrganizationID you are using to test
admins_controller = client.admins
result = admins_controller.get_organization_admins(organization_id)
print (result)
##You will see the admins of the Organization in a Dictionary format. You will see the admins of the organization. It'll be easier getting the "organizationId" from postman. Let me know if you have any other questions, sorry for the error earlier. I didnt realize the imports assumed it was being called from a different folder.
... View more
May 13 2019
12:52 PM
2 Kudos
@Naimro You can do the above as everyone has stated. Set the Wireless SSID to Meraki DHCP and create the SSID that way. Meraki will do all the work for you and assign a subnet for the guests, you will not have any input as to what subnet you can use except that it will be in the Class A subnet of 10.0.0.0/8. This will not allow any communication within the members of this VLAN, but they will be allowed to talk to anything on your wired LAN if you permit, you can go into the SSID Firewall settings and edit its access as you require. Note that if you require the clients to have access to things such as a chromecast or apple tv for presentations this will probably not be a route for you. If you want more control then it will be a bit more work on your end. You can create the VLAN and restrict any local LAN access, or allow depending on your firewall settings. Utilizing this method will allow you to choose a more specific VLAN and add other devices to that VLAN that your Guests will require access to. Here's an example to block a particular VLAN (this allows access within the VLAN but not to my local network): Furthermore, if you need to change the access of the wireless clients by denying specific content per your company policy. You can do that on a per SSID basis under "Firewall & traffic shaping" in Wireless section and it will work on that Guests SSID without affecting the rest of your network, if you do it on the "Security & SD-WAN" it will apply to your entire network traffic, not on a per SSID basis. Basically, if you require more control and have to implement other devices into the Guest VLAN then I would recommend creating a VLAN for this Guest Network applying all firewall rules to segregate the traffic. Otherwise if you just require them to be on a segregated network without impacting your local network, go with the Meraki DHCP option, it's easy and simple to deploy and you can tie in additional layer 7 rules.
... View more
Apr 28 2019
9:49 PM
2 Kudos
One Possible Solution is for them to have a personnel account on their own Network that does not have any lockout. I have two accounts one for my personnel home Org and another for MSP for work. Both my work and personnel accounts are registered under my Home Org as admins. Whenever I get locked out of my work account I login to my personnel Org and unlock the work account. If you have a main Org (your personnel environment for example) and they are all added there you can just unlock them there. That way you don't have to go hunt doen the Orgs they are associated with. You should be able to unlock from any Org they are associated with.
... View more
Apr 28 2019
9:05 PM
Bummer, thanks. Was hoping their would be a submit form.
... View more
My Accepted Solutions
Subject | Views | Posted |
---|---|---|
4483 | May 20 2019 3:04 PM | |
6620 | May 9 2019 9:48 AM |
My Top Kudoed Posts
Subject | Kudos | Views |
---|---|---|
3 | 6145 | |
2 | 10778 | |
2 | 3926 | |
2 | 15725 | |
1 | 4862 |