On Tue, 8 Nov 2022 11:23:32 +0100 (CET) "FOUR Ludovic (EXT)" firstname.lastname@example.org wrote:
I hope everyone is doing well
Hi there, same to you!
I'm trying to setup voice vlans for Juniper on nav conf. For some reasons, I don't want to activate VoIP on all ports, but just activate it for specific ports through portadmin page.
I've declared voice_vlans in /etc/nav/portadmin/portadmin.conf but it seems it is only working with Cisco devices.
There are two modes of VoIP in PortAdmin: A generic mode, and a Cisco specific mode.
The generic mode doesn't use any vendor specific configuration commands, but instead sets up 802.1Q trunking on ports that are configured as VoIP ports. IIRC, it sets up the trunk with the access VLAN as the native VLAN, and the selected voice VLAN as a tagged VLAN.
The typical scenario this was designed for was VoIP phone sets that can connect to a trunk port, running its VoIP traffic on the tagged VLAN, while simultaneously allowing a ccomputer to be daisy-chained and pass through the native VLAN traffic to it. And, if a client computer is connected directly to the same switch port, it doesn't need to understand 802.1Q, it can still access the native VLAN.
In other words, Cisco specific commands will only be used if you set `cisco_voice_vlan` to `true` in `portadmin.conf`. Otherwise, the mode described above is used.
Is there a way to make it work for Juniper or within netplan ?
I don't know what netplan is.
The Juniper use-case has not been raised by anyone before, so I have no idea what (if any) Juniper-specific commands exist for VoIP. There are therefore currently no plans to implement it.
Can we add specific netconf commands or it's internal builtin ?
Vendor-specific backends implement PortAdmin's ManagementHandler interface:
This base class has a generic `set_interface_voice_vlan` implementation, which enables the trunk mode mentioned above, through calling `set_trunk` on the same handler:
The Juniper-specific ManagementHandler (which uses Napalm/PyEZ, which is more or less NETCONF) does not override the `set_interface_voice_vlan` implementation, meaning enabling voice vlans here should operate in the same way:
If Juniper specific commands are needed for some Juniper VoIP control, `set_interface_voice_vlan` needs to be overridden in the `Juniper` class to do this.