Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zebra: Add CLI to display SRv6 SIDs allocated #16836

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Commits on Sep 15, 2024

  1. lib: Add ifindex to SRv6 SID ctx

    When daemons allocate End.X SIDs they should also pass the interface
    index.
    
    Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
    cscarpitta committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    f83dca6 View commit details
    Browse the repository at this point in the history
  2. isisd: Pass ifindex when allocate End.X SIDs

    When isisd allocates an End.X SID it should also pass the interface
    index down to zebra.
    
    Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
    cscarpitta committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    16a5cfd View commit details
    Browse the repository at this point in the history
  3. zebra: Add function to show SRv6 SID information

    Add a function to show SRv6 SID information: zclients, behavior, SID context.
    
    Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
    cscarpitta committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    a647efc View commit details
    Browse the repository at this point in the history
  4. zebra: Add function to show SRv6 SIDs detailed info

    Add a function to show detailed SRv6 SIDs information.
    
    ```
    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
    ```
    
    Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
    cscarpitta committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    f56d753 View commit details
    Browse the repository at this point in the history
  5. zebra: Add function to show SRv6 SIDs detailed information

    Add a function to show detailed SRv6 SIDs information in json format.
    
    ```
    [
      {
        "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)"
      }
    ]
    ```
    
    Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
    cscarpitta committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    43809ec View commit details
    Browse the repository at this point in the history
  6. zebra: Add function to show SRv6 SIDs information

    Add a function to show SRv6 SIDs information.
    
    ```
     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)
    ```
    
    Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
    cscarpitta committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    8cdead6 View commit details
    Browse the repository at this point in the history
  7. zebra: Add function to show SRv6 SIDs information

    Add a function to show SRv6 SIDs information in json format.
    
    ```
    [
      {
        "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)"
      }
    ]
    ```
    
    Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
    cscarpitta committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    ea7ccbe View commit details
    Browse the repository at this point in the history
  8. zebra: Add CLI to show SRv6 SIDs

    Add a command to show SRv6 SIDs allocated.
    
    Output 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)"
      }
    ]
    ```
    
    Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
    cscarpitta committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    680c82c View commit details
    Browse the repository at this point in the history
  9. zebra: Install SRv6 show SIDs CLI under VIEW_NODE

    Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
    cscarpitta committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    e59997a View commit details
    Browse the repository at this point in the history
  10. zebra: do not display non formatted json when json is used

    Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
    pguibert6WIND authored and cscarpitta committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    efe49c8 View commit details
    Browse the repository at this point in the history
  11. zebra: generalise detail keyword for 'show segment-routing srv6 sid'

    Extend the usage of the detail keyword to display locator and allocation
    type when needed.
    Now, the locator and the allocation type is also displayed when using
    the json format.
    
    > ubuntu2204hwe# show segment-routing srv6 sid
    >  SID               Behavior    Context          Daemon/Instance
    >  ----------------  ----------  ---------------  -----------------
    >  2001::40:0:0:1    End         -                isis(0)
    >  2001::41:0:0:1    End.DT4     VRF 'default'    bgp(0)
    >
    > ubuntu2204hwe# show segment-routing srv6 sid  detail
    >  SID               Behavior    Context          Daemon/Instance  Locator  AllocationType
    >  ----------------  ----------  ---------------  ------------------------------------------
    >  2001::40:0:0:1    End         -                isis(0)          AV       dynamic
    >  2001::41:0:0:1    End.DT4     VRF 'default'    bgp(0)           AV       dynamic
    >
    > ubuntu2204hwe# show segment-routing srv6 sid 2001::40:0:0:1
    >  SID               Behavior    Context    Daemon/Instance
    >  ----------------  ----------  ---------  -----------------
    >  2001::40:0:0:1    End         -          isis(0)
    >
    > ubuntu2204hwe# show segment-routing srv6 sid 2001::40:0:0:1 detail
    >  SID               Behavior    Context    Daemon/Instance
    >  ----------------  ----------  ---------  -----------------
    >  2001::40:0:0:1    End         -          isis(0)
    >
    >   Locator: AV
    >   Allocation type: dynamic
    > ubuntu2204hwe# show segment-routing srv6 sid 2001::40:0:0:1 json
    > [
    >   {
    >     "sid":"2001::40:0:0:1",
    >     "behavior":"End",
    >     "context":"-",
    >     "daemons":"isis(0)"
    >   }
    > ]
    > ubuntu2204hwe# show segment-routing srv6 sid 2001::40:0:0:1 detail json
    > [
    >   {
    >     "sid":"2001::40:0:0:1",
    >     "behavior":"End",
    >     "context":"-",
    >     "daemons":"isis(0)",
    >     "locator":"AV",
    >     "allocationType":"dynamic"
    >   }
    > ]
    > ubuntu2204hwe# show segment-routing srv6 sid json
    > [
    >   {
    >     "sid":"2001::40:0:0:1",
    >     "behavior":"End",
    >     "context":"-",
    >     "daemons":"isis(0)"
    >   },
    >   {
    >     "sid":"2001::41:0:0:1",
    >     "behavior":"End.DT4",
    >     "context":"VRF 'default'",
    >     "daemons":"bgp(0)"
    >   }
    > ]
    > ubuntu2204hwe# show segment-routing srv6 sid detail json
    > [
    >   {
    >     "sid":"2001::40:0:0:1",
    >     "behavior":"End",
    >     "context":"-",
    >     "daemons":"isis(0)",
    >     "locator":"AV",
    >     "allocationType":"dynamic"
    >   },
    >   {
    >     "sid":"2001::41:0:0:1",
    >     "behavior":"End.DT4",
    >     "context":"VRF 'default'",
    >     "daemons":"bgp(0)",
    >     "locator":"AV",
    >     "allocationType":"dynamic"
    >   }
    > ]
    >
    
    Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
    pguibert6WIND authored and cscarpitta committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    db91e9c View commit details
    Browse the repository at this point in the history
  12. doc: Add documentation for show SIDs command

    Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
    cscarpitta committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    46d43fe View commit details
    Browse the repository at this point in the history
  13. doc: Add example for show SIDs command

    Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
    cscarpitta committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    a18ea96 View commit details
    Browse the repository at this point in the history
  14. doc: Add example for show SIDs detaili command

    Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
    cscarpitta committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    ed66380 View commit details
    Browse the repository at this point in the history
  15. doc: Add example for show SIDs json command

    Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
    cscarpitta committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    cdbd4bf View commit details
    Browse the repository at this point in the history