frr icon indicating copy to clipboard operation
frr copied to clipboard

zebra: Add CLI to display SRv6 SIDs allocated

Open cscarpitta opened this issue 1 year ago • 1 comments

Add a CLI to display the information regarding SRv6 local SID(s) allocated from a given locator.

Usage examples:

router# show segment-routing srv6 sid

 SID                Behavior    Context                Daemon/Instance
 -----------------  ----------  ---------------------  -----------------
 fc00:0:1::         uN          -                      isis(0)
 fc00:0:1:fe00::    uDT6        VRF 'vrf10'            bgp(0)
 fc00:0:1:fe01::    uDT6        VRF 'vrf20'            bgp(0)
 fc00:0:1:e000::    uA          Interface 'eth-sw1'    isis(0)
 fc00:0:1:e001::    uA          Interface 'eth-sw1'    isis(0)
router# show segment-routing srv6 sid fc00:0:1:e000:: detail
 SID                Behavior    Context                Daemon/Instance
 -----------------  ----------  ---------------------  -----------------
 fc00:0:1:e000::    uA          Interface 'eth-sw1'    isis(0)

  Locator: loc1
  Allocation type: dynamic
router# show segment-routing srv6 sid json
[
  {
    "sid":"fc00:0:1::",
    "behavior":"uN",
    "context":"-",
    "daemons":"isis(0)"
  },
  {
    "sid":"fc00:0:1:fe00::",
    "behavior":"uDT6",
    "context":"VRF 'vrf10'",
    "daemons":"bgp(0)"
  },
  {
    "sid":"fc00:0:1:fe01::",
    "behavior":"uDT6",
    "context":"VRF 'vrf20'",
    "daemons":"bgp(0)"
  },
  {
    "sid":"fc00:0:1:e000::",
    "behavior":"uA",
    "context":"Interface 'eth-sw1'",
    "daemons":"isis(0)"
  },
  {
    "sid":"fc00:0:1:e001::",
    "behavior":"uA",
    "context":"Interface 'eth-sw1'",
    "daemons":"isis(0)"
  }
]

cscarpitta avatar Sep 15 '24 21:09 cscarpitta

I think the json should have the daemon name and the instance name as separate entities not combined

donaldsharp avatar Sep 17 '24 12:09 donaldsharp

Hi @cscarpitta , any updates on this?

pguibert6WIND avatar Jan 09 '25 15:01 pguibert6WIND

Can we also add status field something like Allocated (by zebra) and Installed (into kernel) in the above show command.

raja-rajasekar avatar Mar 26 '25 18:03 raja-rajasekar

frrbot complains. please fix it, so that we can merge it.

pguibert6WIND avatar Apr 10 '25 07:04 pguibert6WIND

I addressed all comments. The PR is ready for merge.

cscarpitta avatar Apr 22 '25 11:04 cscarpitta