Page MenuHomeVyOS Platform

Allow any character to be used in the SNMP community field
Open, LowPublicFEATURE REQUEST

Description

According to the net-snmp source and RFC1157, SNMP community field has type OCTET STRING / char, so it may contain any of char symbols.
In the current CLI, a community name can use only the limited list of characters: https://github.com/vyos/vyos-1x/blob/846e306700af191d22dc874992bbf5f04d2799c4/interface-definitions/snmp.xml.in#L16.

We should review the possibility to extend it to the full set of supported characters

Details

Version
-
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Feature (new functionality)

Event Timeline

c-po subscribed.

What would be the "full set" up supported characters? If I remember correctly this regex is inherited from VyOS 1.1

erkin renamed this task from Allow to use in SNMP community all characters to Allow any character to be used in the SNMP community field.Aug 29 2021, 1:33 PM
erkin set Issue type to improvement.
erkin removed a subscriber: Global Notifications.
dmbaturin set Issue type to Feature (new functionality).Nov 8 2024, 10:50 AM

It looks like the regex is currently:

^[a-zA-Z0-9\-_]{1,100}$

Based on some quick research, it looks like most vendors allow for up to 32-character community strings, with a mix of upper-case, lower-case, numbers, and some special characters.

According to stack overflow (https://stackoverflow.com/questions/34901469/snmp-v2-community-string-rules), Cisco's policy is: "The name can contain up to 32 characters and can contain any combination of alphanumeric characters, hyphens (-), and underscore characters (_)"

@zsdc - What additional characters are you looking for, and what is the platform on the other end?