09-20-2023 02:10 AM - edited 09-20-2023 06:50 AM
Dear community,
I'm currently configuring a cluster of FTD 3120 with FDM running version 7.2.5. Using the REST API I'm trying to push an snmp configuration but I'm getting a strange error when I specify UDP port 161 instead of 162. Below the JSON config I'm trying:
{
"version": null,
"name": "snmpv2-host",
"description": null,
"managerAddress": {
"version": "bz3l66jx3vyn3",
"name": "SNMP_SRV",
"id": "546eaf59-5789-11ee-935e-1384687f42af",
"type": "networkobject"
},
"udpPort": 161,
"pollEnabled": true,
"trapEnabled": false,
"securityConfiguration": {
"community": "Cisco123",
"type": "snmpv2csecurityconfiguration"
},
"interface": {
"version": "ktvt2jciheggh",
"name": "diagnostic",
"id": "03a2b781-3d4f-11ee-b62e-cfdbafb0cf5d",
"type": "physicalinterface"
},
"id": null,
"type": "snmphost"
}
And the result:
{
"error": {
"severity": "ERROR",
"key": "Validation",
"messages": [
{
"description": "VAL.snmpUdpPortCannotBePassed",
"code": "snmpUdpPortCannotBePassed",
"location": ""
}
]
}
}
Strangely, If I change 161 for the default value 162, the configuration is accepted and the snmp configuration is created. Using any other port triggers the issue.
Anyone having an idea of what can cause this ?
Thanks!
09-20-2023 04:57 AM
- I though 161 was the default value ; could you just remove that line :
"udpPort": 161,
M.
09-20-2023 05:10 AM
Hi,
thanks for your reply. 162 is actually the default port which is applied when we don't specify "udpPort": Below the Response body without specifying a UDP port:
{
"version": "f3l2qhbhorsfo",
"name": "snmpv2-host",
"description": null,
"managerAddress": {
"version": "bz3l66jx3vyn3",
"name": "SNMP_SRV",
"id": "546eaf59-5789-11ee-935e-1384687f42af",
"type": "networkobject"
},
"udpPort": 162,
"pollEnabled": true,
"trapEnabled": false,
"securityConfiguration": {
"community": "*********",
"type": "snmpv2csecurityconfiguration"
},
"interface": {
"version": "ktvt2jciheggh",
"name": "diagnostic",
"hardwareName": "Management1/1",
"id": "03a2b781-3d4f-11ee-b62e-cfdbafb0cf5d",
"type": "physicalinterface"
},
"id": "384a8de9-57ae-11ee-935e-d7f3a7b081f7",
"type": "snmphost",
"links": {
"self": "https://10.29.113.108/api/fdm/v6/object/snmphosts/384a8de9-57ae-11ee-935e-d7f3a7b081f7"
}
}
The snmp host is created, but with UDP 162. That's why I'm trying to force the use of 161 but I have the error above.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide