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
Sep 23 2019
3:43 AM
Should you be using the same vlan on those SSIDs?
... 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 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
My Accepted Solutions
Subject | Views | Posted |
---|---|---|
4852 | May 20 2019 3:04 PM | |
7223 | May 9 2019 9:48 AM |
My Top Kudoed Posts
Subject | Kudos | Views |
---|---|---|
2 | 11264 | |
2 | 16781 | |
1 | 6572 | |
1 | 5668 | |
1 | 3114 |