cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
280
Views
0
Helpful
4
Replies
Highlighted
Beginner

Meraki unable to get vlan info

I am just trying to use Meraki SDK to retrieve vlan information using the sandbox, but get error when run the code. Any advice will be appreciated.

When I run postman to inquiry the vlan information, I got return error says "Vlans are not enabled for this network", I thought may be it is the reason, but when login to sandbox, vlan 1 is there.

Here is the code.

from meraki_sdk.meraki_sdk_client import MerakiSdkClient
import json
from pprint import pprint

token = '6bec40cf957de430a6f1f2baa056b99a4fac9ea0'
meraki = MerakiSdkClient(token)
orgs = meraki.organizations.get_organizations()

for org in orgs :
if org['name'] == 'DevNet Sandbox' :
orgId = org['id']

params = {}
params['organization_id'] = orgId
networks = meraki.networks.get_organization_networks(params)
pprint(networks)
for network in networks :
if network['name'] == 'DevNet Sandbox Always on READ ONLY' :
netId = network['id']

vlans = meraki.vlans.get_network_vlans(netId) 

 Here is the error.

Traceback (most recent call last):
File "C:/Users/user/PycharmProjects/Meraki/Meraki_SDK1.py", line 30, in <module>
vlans = meraki.vlans.get_network_vlans(netId)
File "C:\Users\user\PycharmProjects\Meraki\venv\lib\site-packages\meraki_sdk\controllers\vlans_controller.py", line 60, in get_network_vlans
self.validate_response(_context)
File "C:\Users\user\PycharmProjects\Meraki\venv\lib\site-packages\meraki_sdk\controllers\base_controller.py", line 94, in validate_response
raise APIException('HTTP response not OK.', context)
meraki_sdk.exceptions.api_exception.APIException: HTTP response not OK.

4 REPLIES 4
Highlighted
Beginner

Re: Meraki unable to get vlan info

 
{
    "errors": [
        "VLANs are not enabled for this network"
    ]
}

I too had this same problem. I tried sending a request using the dashboard API and got this error for the same network. I tried this on other networks as well and got the same error but not on fake made up networks. The made-up ones gave no response.

So I guess the VLANs are not enabled.

Also, I found this to enable VLANs: 

https://documentation.meraki.com/MX/Networks_and_Routing/Configuring_VLANs_on_the_MX_Security_Appliance#:~:text=Enable%20VLANs%20on%20the%20Dashboard,-VLANs%20are%20disabled&text=They%20can%20be%20enabled%20from,were%20disabled%20will%20be%20deleted.

However, this isn't working for me in the sandbox.

Highlighted
Beginner

Re: Meraki unable to get vlan info

I found it is easier to create your own meraki account and play with it instead of using the always on lab.

Once you are familiar with all the settings, then use their reserve lab to play with device.

Highlighted
Beginner

Re: Meraki unable to get vlan info

Each SSID needs to be configured separately with the bridging and VLAN information dqfansurvey.

Highlighted
Beginner

Re: Meraki unable to get vlan info

If you make a guest vlan on the MX it will automatically be routable sonic survey

This widget could not be displayed.