- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Writing a QoS rule
Hi all,
I am struggling with the Meraki API "createNetworkSwitchQosRule" ...
When I send
{'dstPortRange': '20000-64999', 'protocol': 'UDP', 'vlan': 4}
I get the error
'Source port is required when protocol is UDP'
But when I include the SourcePort "None" (I want to have any source)
{'dstPortRange': '20000-64999', 'protocol': 'UDP', 'srcPort': None, 'vlan': 3}
I get the error
"'srcPort' must be an integer"
"None" is what I get when I read the rule from the dashboard.
How do I have to send this request?
Have a great day, Karsten
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to specify any source port, you could try setting the srcPort to a range that covers all possible ports. In most systems, this would be 1-65535.
Please, if this post was useful, leave your kudos and mark it as solved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've never tried it before, but I believe it should work.
Please, if this post was useful, leave your kudos and mark it as solved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, this works. But it can't be the solution if the dashboard can have an "Any" entry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you tried with literally the "Any" argument?
Please, if this post was useful, leave your kudos and mark it as solved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I didn't try "Any" as it is an Integer. I tried zero, but that also gives an error that it has to be greater than zero.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
{"id":"x","vlan":null,"protocol":"UDP","srcPort":null,"dstPortRange":"16384-32766","dscp":-1}
"ANY" from the dashboard is translated to null via the API.
Have you tried it ?
Taking the payload from the 'GET' endpoint and not being able to 'PUT' it is a big issue... I haven't tried it yet. Going to test it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes, I tried that. But in python I can't set the element to null:
newRule["srcPort"]=null
results in
NameError: name 'null' is not defined
I can only set it to Null, but that doesn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
payload = '''{
"vlan":null,
"protocol":"UDP",
"srcPortRange":"16384-32766",
"dstPort":null,
"dscp":-1
}'''
{"errors":["'dstPort' must be an integer"]}
I confirm that you can't 'POST' the result from the 'GET' if srcPort or dstPort == ANY( null)
#broken
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And not only with the result from the GET. It's the same for building the object from scratch.
Having the API is one of the best strengths of Meraki but at the same time the biggest PITA ... 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are on 16.7.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Running 15.22 or something like that and I'm also experiencing the same issues.
Did you open a case ? I did and I got some very funny "answers"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I didn't because I was not sure it would be useful as there is nothing where support can directly assist.
