Sorting VRRP output and showing available VRID

Hi. I can’t find any VRRP operational commands to do as the title says so I’m sharing the command that, mind you, prompted with Google’s Gemini to achieve those.

I’m not sure if the latest VyOS versions already have the options.

Sort VRRP groups by VRID for VyOS 1.4

sh vrrp | grep -v “Name\s*Interface” | grep -v – “----------” | sort -k 3n

Show available VRID for VyOS 1.4

sh vrrp | awk '
    NR > 2 { used[$3] = 1 } 
    END { 
        for (i = 1; i <= 255; i++) { 
            if (!(i in used)) { 
                print i 
            } 
        } 
    }'

If this is somewhat a valuable command, maybe someone can create a PR for it.

Completely useless for others command.

I don’t think any vendor has it as well. It is on user and/or automation tool to get next vrid, VLAN or BGP neighbor :slight_smile:

Got it. Just sharing here in case this can be added.