Commit graph

667 commits

Author SHA1 Message Date
Donald Sharp e54261e20d lib, zebra: TABLE_NODE is not used
No-one is using this, remove

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-24 16:05:54 -04:00
Donald Sharp d97c535c1e *: Create termtable specific temp memory
When trying to track down a MTYPE_TMP memory leak
it's harder to search for it when you happen to
have some usage of ttable_dump.  Let's just give
it it's own memory type so that we can avoid
confusion in the future.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-01 13:07:46 -04:00
Donald Sharp 0c72a78930 zebra: Allow for initial deny of installation of nhe's
Currently the FRR code will receive both kernel and
connected routes that do not actually have an underlying
nexthop group at all.  Zebra turns around and creates
a `matching` nexthop hash entry and installs it.
For connected routes, this will create 2 singleton
nexthops in the dplane per interface (v4 and v6).
For kernel routes it would just create 1 singleton
nexthop that might be used or not.

This is bad because the dplane has a limited amount
of space available for nexthop entries and if you
happen to have a large number of interfaces then
all of a sudden you have 2x(# of interfaces) singleton
nexthops.

Let's modify the code to delay creation of these singleton
nexthops until they have been used by something else in the
system.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-30 08:23:48 -04:00
Donald Sharp c10cdcd79a zebra: Display afi of the nexthop hash entry
Let's display the afi of the nexthop hash entry.  Right
now it is impossible to tell the difference between v4 or
v6 nexthops, especially since it is important for the kernel.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-29 14:49:36 -04:00
Donald Sharp 184dccca60 zebra: Move prefix lookup to outside re loop
Move the prefix lookup/comparison to outside the re loop
and into the rn loop, since that is where the code should
actually be.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-28 13:18:00 -04:00
Donald Sharp 266b061994 zebra: Properly note that a nhg's nexthop has gone down
Current code when a link is set down is to just mark the
nexthop group as not properly setup.  Leaving situations
where when an interface goes down and show output is
entered we see incorrect state.  This is true for anything
that would be checking those flags at that point in time.

Modify the interface down nexthop group code to notice the
nexthops appropriately ( and I mean set the appropriate flags )
and to allow a `show ip route` command to actually display
what is going on with the nexthops.

eva# show ip route 1.0.0.0
Routing entry for 1.0.0.0/32
  Known via "sharp", distance 150, metric 0, best
  Last update 00:00:06 ago
  * 192.168.44.33, via dummy1, weight 1
  * 192.168.45.33, via dummy2, weight 1

sharpd@eva:~/frr1$ sudo ip link set dummy2 down

eva# show ip route 1.0.0.0
Routing entry for 1.0.0.0/32
  Known via "sharp", distance 150, metric 0, best
  Last update 00:00:12 ago
  * 192.168.44.33, via dummy1, weight 1
    192.168.45.33, via dummy2 inactive, weight 1

Notice now that the 1.0.0.0/32 route now correctly
displays the route for the nexthop group entry.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-03 09:34:55 -04:00
vivek b5682ffbf0 *: Add and use option for graceful (re)start
Add a new start option "-K" to libfrr to denote a graceful start,
and use it in zebra and bgpd.

zebra will use this option to denote a planned FRR graceful restart
(supporting only bgpd currently) to wait for a route sync completion
from bgpd before cleaning up old stale routes from the FIB. An optional
timer provides an upper-bounds for this cleanup.

bgpd will use this option to denote either a planned FRR graceful
restart or a bgpd-only graceful restart, and this will drive the BGP
GR restarting router procedures.

Signed-off-by: Vivek Venkatraman <vivek@nvidia.com>
2024-07-01 13:02:52 -07:00
Louis Scalbert 85eb60ffd6 zebra: fix show route memory consumption
When displaying a route table in JSON, a table JSON object is storing
all the prefix JSON objects containing the prefix information. This
results in excessive memory allocation for JSON objects, potentially
leading to an out-of-memory error on the machine with large routing
tables.

To Fix the memory consumption issue for the "show ip[v6] route [vrf XX]
json" command, display the prefixes one by one and free the memory of
each JSON object after it has been displayed.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-06-07 10:13:32 +02:00
Louis Scalbert cb440058f2 zebra: fix show route vrf all memory consumption
0e2fc3d67f ("vtysh, zebra: Fix malformed json output for multiple vrfs
in command 'show ip route vrf all json'") has been reverted in the
previous commit. Although the fix was correct, it was consuming too muca
memory when displaying large route tables.

A root JSON object was storing all the JSON objects containing the route
tables, each containing their respective prefixes in JSON objects. This
resulted in excessive memory allocation for JSON objects, potentially
leading to an out-of-memory error on the machine.

To Fix the memory consumption issue for the "show ip[v6] route vrf all
json" command, display the tables one by one and free the memory of each
JSON object after it has been displayed.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-06-07 10:13:32 +02:00
Louis Scalbert 0c6f14ec14 Revert "vtysh, zebra: Fix malformed json output for multiple vrfs in command 'show ip route vrf all json'"
This reverts commit 0e2fc3d67f.

This fix was correct but not optimal for memory consumption at scale.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-06-07 10:12:42 +02:00
Mark Stapp d6835df9cc zebra: include route source set by route-map in show output
Include the prefix source address when set by a route-map in
show output for routes, in various formats.
Add some debugs when encoding netlink route messages with
a source address.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-05-14 10:28:17 -04:00
Igor Ryzhov 58a8ebc1fc lib: rework northbound RPC callback
Change input/output arguments of the RPC callback from lists of
(xpath/value) tuples to YANG data trees.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-04-22 16:36:22 +03:00
Donatas Abraitis ca13121849 zebra: Fix JSON output for show route summary json
Before:
```
{
  "routes":[
    {
      "fib":1,
      "rib":1,
      "fibOffLoaded":0,
      "fibTrapped":0,
      "type":"connected"
    },
    {
      "fib":1,
      "rib":1,
      "fibOffLoaded":0,
      "fibTrapped":0,
      "type":"local"
    },
    {
      "fib":2,
      "rib":2,
      "fibOffLoaded":0,
      "fibTrapped":0,
      "type":"static"
    }
  ],
  "routesTotal":4,
  "routesTotalFib":4
}
{
  "routes":[
    {
      "fib":2,
      "rib":2,
      "fibOffLoaded":0,
      "fibTrapped":0,
      "type":"connected"
    },
    {
      "fib":2,
      "rib":2,
      "fibOffLoaded":0,
      "fibTrapped":0,
      "type":"local"
    },
    {
      "fib":2,
      "rib":2,
      "fibOffLoaded":0,
      "fibTrapped":0,
      "type":"static"
    }
  ],
  "routesTotal":6,
  "routesTotalFib":6
}
```

After:
```
{
  "ISR":{
    "routes":[
      {
        "fib":1,
        "rib":1,
        "fibOffLoaded":0,
        "fibTrapped":0,
        "type":"connected"
      },
      {
        "fib":1,
        "rib":1,
        "fibOffLoaded":0,
        "fibTrapped":0,
        "type":"local"
      },
      {
        "fib":2,
        "rib":2,
        "fibOffLoaded":0,
        "fibTrapped":0,
        "type":"static"
      }
    ],
    "routesTotal":4,
    "routesTotalFib":4
  },
  "default":{
    "routes":[
      {
        "fib":2,
        "rib":2,
        "fibOffLoaded":0,
        "fibTrapped":0,
        "type":"connected"
      },
      {
        "fib":2,
        "rib":2,
        "fibOffLoaded":0,
        "fibTrapped":0,
        "type":"local"
      },
      {
        "fib":2,
        "rib":2,
        "fibOffLoaded":0,
        "fibTrapped":0,
        "type":"static"
      }
    ],
    "routesTotal":6,
    "routesTotalFib":6
  }
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-03-30 23:04:10 +02:00
Piotr Suchy 0e2fc3d67f vtysh, zebra: Fix malformed json output for multiple vrfs in command 'show ip route vrf all json'
Command 'show ip route vrf <vrf_name> json' returns a valid json object,
however if instead of <vrf_name> we specify 'all', we get an invalid json
object, like:

{//vrf1 routes}{//vrf2 routes}{vrf3 routes}

After the fix:

{"vrf1":{//vrf1 routes},"vrf2:{//vrf2 routes},"vrf3":{//vrf3 routes}}

Which is a valid json object, that can be parsed effectively using built-in
modules. The rest of the commands remains unaffected and behave the same.

Signed-off-by: Piotr Suchy <psuchy@akamai.com>
2024-03-29 14:01:21 +01:00
Donald Sharp b2ade8e3d2 zebra: When reinstalling a NHG, set REINSTALL flag
The current code is unsetting the fact that the
NHG is installed.  It is installed but we are
reinstalling it.  Let's note this in the code
appropriately as REINSTALL and not remove the
INSTALLED FLAG.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-02-08 12:32:26 -05:00
Donald Sharp b9130ab51b zebra: Remove helper function if_nhg_dependents_is_empty
Let's just let the function figure this out.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-02-08 11:49:08 -05:00
Igor Ryzhov 3900813298 zebra: convert to mgmtd
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov 741d1d0090 zebra: convert vrf configuration output to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov 86855aed78 zebra: convert table range command to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov 2117faf1cf zebra: convert resolve-via-default commands to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov 1f2b7c1058 zebra: fix vni NB conversion
- unnecessary command duplication
- usage of oper data during validation
- unnecessary checks for things that can't happen

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Igor Ryzhov 218b5017ee zebra: convert interface configuration output to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-28 23:28:40 +02:00
Russ White 0a79e117d6
Merge pull request #12600 from donaldsharp/local_routes
*: Introduce Local Host Routes to FRR
2023-12-05 11:00:44 -05:00
Donald Sharp 6de9f7fbf5 *: Move distance related defines into their own header
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-07 06:47:51 -05:00
Donald Sharp 7e1b56ba98 zebra: When using Nexthop groups, use v6 RR semantics
The nexthop group route replace operation was made consistent
across all versions of the kernel.  A v6 route replacement
does not need to do a delete than add when using nexthop
groups

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-06 08:56:50 -05:00
Donald Sharp 7fe9333dd7 zebra: Move v6_rr_semantics to be part of zrouter structure
Move global variable v6_rr_semantics from a global data structure
into the zrouter data structure.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-06 08:42:30 -05:00
Donald Sharp 4e996e98ec zebra: Add v6_rr_semantics status to show zebra
The v6_rr_semantics variable was being set but never
reported and had to be inferred from watching netlink
messages to the kernel.  Let's add a bit of code
to `show zebra` so that we can know how it is being
used.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-06 08:12:04 -05:00
Donald Sharp d4aa24ba7d *: Introduce Local Host Routes to FRR
Create Local routes in FRR:

S   0.0.0.0/0 [1/0] via 192.168.119.1, enp39s0, weight 1, 00:03:46
K>* 0.0.0.0/0 [0/100] via 192.168.119.1, enp39s0, 00:03:51
O   192.168.119.0/24 [110/100] is directly connected, enp39s0, weight 1, 00:03:46
C>* 192.168.119.0/24 is directly connected, enp39s0, 00:03:51
L>* 192.168.119.224/32 is directly connected, enp39s0, 00:03:51
O   192.168.119.229/32 [110/100] via 0.0.0.0, enp39s0 inactive, weight 1, 00:03:46
C>* 192.168.119.229/32 is directly connected, enp39s0, 00:03:46

Create ability to redistribute local routes.

Modify tests to support this change.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-01 17:13:06 -04:00
Donatas Abraitis d02fae5836 zebra: Show NHT resolve via default status on/off
```
donatas-laptop# show ip nht
VRF default:
 Resolve via default: on
192.168.10.123
 resolved via connected
 is directly connected, wlp82s0 (vrf default)
 Client list: bgp(fd 21)
donatas-laptop# show ip nht json
{
  "default":{
    "ipv4":{
      "resolveViaDefault":true,
      "192.168.10.123":{
        "nhtConnected":false,
        "clientList":[
          {
            "protocol":"bgp",
            "socket":21,
            "protocolFiltered":"none"
          }
        ],
        "nexthops":[
          {
            "flags":3,
            "fib":true,
            "directlyConnected":true,
            "interfaceIndex":3,
            "interfaceName":"wlp82s0",
            "vrf":"default",
            "active":true
          }
        ],
        "resolvedProtocol":"connected"
      }
    }
  }
}
donatas-laptop# show ip nht vrf all

VRF default:
 Resolve via default: on
192.168.10.123
 resolved via connected
 is directly connected, wlp82s0 (vrf default)
 Client list: bgp(fd 21)
donatas-laptop# show ip nht vrf all json
{
  "default":{
    "ipv4":{
      "resolveViaDefault":true,
      "192.168.10.123":{
        "nhtConnected":false,
        "clientList":[
          {
            "protocol":"bgp",
            "socket":21,
            "protocolFiltered":"none"
          }
        ],
        "nexthops":[
          {
            "flags":3,
            "fib":true,
            "directlyConnected":true,
            "interfaceIndex":3,
            "interfaceName":"wlp82s0",
            "vrf":"default",
            "active":true
          }
        ],
        "resolvedProtocol":"connected"
      }
    }
  }
}
donatas-laptop#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-08-17 21:45:55 +03:00
Donald Sharp 1f5611c06d zebra: Allow zebra cli to accept v6 routes with v4 nexthops
add --v6-with-v4-nexthop cli to zebra to allow operator to
specify that this functionality is allowed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-08-03 08:25:20 -04:00
Sindhu Parvathi Gopinathan 1c67c0951b zebra: non pretty json output for show ip route
Currently, json output of show ip route command are no pretty format.
This is an extremely expensive operation at high scale
(with high number of routes with many paths).

Zebra json non-pretty command support added:

```
show ip route json
```

Ticket:#3513256

Issue:3513256

Testing: UT done

Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com>
2023-07-21 10:15:11 -07:00
anlan_cs f8d94e8a62 zebra: remove unnecessary check for default vrf
The default vrf is generally non-NULL, except when shutdown. So, most
of the time it is not necessary to check if it is NULL, we should
remove the useless checks for it.

Searched them with exact match:
```
grep -rI "zebra_vrf_lookup_by_id(VRF_DEFAULT)" | wc -l
31
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2023-07-12 17:00:27 +08:00
Donald Sharp 9a7d1e7427 zebra: Use zebra_vrf_lookup_by_id when we can
Let's make this as consistent as is possible.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-28 15:49:50 -04:00
Donald Sharp 5f6eaa9b96 *: Convert a bunch of thread_XX to event_XX
Convert these functions:

thread_getrusage
thread_cmd_init
thread_consumed_time
thread_timer_to_hhmmss
thread_is_scheduled
thread_ignore_late_timer

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24 08:32:17 -04:00
Russ White 12906cb1c8
Merge pull request #12798 from donaldsharp/rib_match_multicast
Rib match multicast
2023-02-21 11:40:36 -05:00
Donald Sharp 8383d53e43
Merge pull request #12780 from opensourcerouting/spdx-license-id
*: convert to SPDX License identifiers
2023-02-17 09:43:05 -05:00
Donald Sharp e6174ae2cb doc: Add show ipv6 rpf X:X::X:X command to docs
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-16 07:52:35 -05:00
Donald Sharp 312e29b060 zebra: Remove code duplication for v4 and v6 versions of rib_match_multicast
a) Consolidate v4 and v6 versions of rib_match_multicast
b) Improve debug to show what we matched against as well.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-16 07:52:35 -05:00
Olivier Dugeon e2b958ecbc
Merge pull request #12494 from louis-6wind/ext_admin_group
lib,zebra,isisd: add support for extended admin group RFC7308
2023-02-15 09:42:03 +01:00
Stephen Worley 24acbd9c7f zebra: make next-hop svd command hidden for now
The `show evpn next-hop svd *` command doesn't provide much
for users right now. Make it hidden so we can still debug
the tables with it.

Also remove SVD output from `show evpn next-hop vni all`.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2023-02-13 18:12:05 -05:00
Stephen Worley d44fc240a8 zebra: add show commands for SVD global neigh table
Add some show commands and expand some already existing
commands so we can get debug info from the SVD global
neigh table inside zebra.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2023-02-13 18:12:05 -05:00
Stephen Worley 4645cb6bc2 lib,zebra,bgpd,staticd: use label code to store VNI info
Use the already existing mpls label code to store VNI
info for vxlan. VNI's are defined as labels just like mpls,
we should be using the same code for both.

This patch is the first part of that. Next we will need to
abstract the label code to not be so mpls specific. Currently
in this, we are just treating VXLAN as a label type and storing
it that way.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2023-02-13 18:12:05 -05:00
Sharath Ramamurthy 4a08e69746 zebra: Bug fixes in vtysh doc string, mcast group handling and vni deletion handling with single vxlan device
This patch addresses following bug fixes

- Fix vtysh doc string in "show evpn access-vlan..." command
- Multicast group handling was little complex. This change avoids calling
  multiple functions and directly calls the zebra_vxlan_if_update_vni for
  mcast group updates.
- When a vlan-vni map is removed, the removed vni deletion was happening
  in FRR with SVD config. This was resulting in stale vni and not
  resulting propagation of the vni deletion.
  During vni cleanup (zebra_vxlan_if_vni_clean) zebra_vxlan_if_vni_del
  was called for vni delete which is not correct. We should be calling
  zebra_vxlan_if_vni_entry_del for the given vni entry.

Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
2023-02-13 18:12:04 -05:00
Sharath Ramamurthy 239b26f932 zebra: multiple vlan aware bridge data structure and related changes
Multiple vlan aware bridge data structure changes and its corresponding bridge
handling changes.
A new vlan-table is maintained for each bridge which records the zebra_l2_bridge_vlan
entry. zebra_l2_bridge_vlan maps vlan to access_bd associated to this bridge.

Existing zebra_evpn_access_bd structure is vlan aware which is now modified to be
(vlan, bridge) aware.

Whenever a new access_bd is instantiated, a corresponding entry is also recorded
in the zebra l2 bridge for the vlan.
When the access_bd is dereferenced or whenever a bridge is deleted, the
association is cleaned up.

Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
2023-02-13 18:12:04 -05:00
Louis Scalbert ae251b8684 lib,zebra: add affinity-map configuration hooks
Add affinity-map hooks to check the utilization of affinity-map in
link-params before its deletion and to update link-params when the
affinity-map bit-position is updated.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-10 13:52:01 +01:00
Louis Scalbert 05a12619dd lib,yang,zebra: add affinity-map support
Add the affinity-map global command to zebra. The syntax is:

> affinity-map NAME bit-position (0-1023)

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-09 15:48:21 +01:00
David Lamparter acddc0ed3c *: auto-convert to SPDX License IDs
Done with a combination of regex'ing and banging my head against a wall.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
Donald Sharp a98701f053 zebra: Add missing enums to switch statements
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-01-31 15:15:42 -05:00
Pooja Jagadeesh Doijode 553c804846 zebra: fix JSON fields for "show ip/ipv6 nht"
1. Renamed "gates" to "nexthops"
2. Displaying afi of the nexthops being dispalyed in place of
   "nexthops" JSON object in the old JSON output
3. Calling show_route_nexthop_helper() and show_nexthop_json_helper()
   instead of print_nh() inorder to keeps the fields in "nexthops"
   JSON object in sync with "nexthops" JSON object of
   "show nexthop-group rib json".

Updated vtysh:
    r1# show ip nht
    192.168.0.2
     resolved via connected
     is directly connected, r1-eth0 (vrf default)
     Client list: static(fd 28)
    192.168.0.4
     resolved via connected
     is directly connected, r1-eth0 (vrf default)
     Client list: static(fd 28)

Updated JSON:
    r1# show ip nht json
    {
      "default":{
        "ipv4":{
          "192.168.0.2":{
            "nhtConnected":false,
            "clientList":[
              {
                "protocol":"static",
                "socket":28,
                "protocolFiltered":"none"
              }
            ],
            "nexthops":[
              {
                "flags":3,
                "fib":true,
                "directlyConnected":true,
                "interfaceIndex":2,
                "interfaceName":"r1-eth0",
                "vrf":"default",
                "active":true
              }
            ],
            "resolvedProtocol":"connected"
          }
        }
      }
    }

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
2023-01-24 18:15:36 -08:00
Sindhu Parvathi Gopinathan 3cff8acb33 zebra: Adding FRR support for show vrf vrf-id vni
cli & json support extended for show vrf vrf-id vni

commands:

 - existing: show vrf vni
 - show vrf <vrf-name> vni
 - show vrf all vni
 - show vrf <vrf-name> vni json
 - show vrf all vni json

Before:
```
tor-1# show vrf vni
VRF                                   VNI        VxLAN IF
L3-SVI               State Rmac
default                               100        None
None                 Down  None
sym_1                                 8888       vxlan99
vlan490_l3           Up    44:38:39:ff:ff:25
sym_2                                 8889       vxlan99
vlan491_l3           Up    44:38:39:ff:ff:25
sym_3                                 8890       vxlan99
vlan492_l3           Up    44:38:39:ff:ff:25
sym_4                                 8891       vxlan99
vlan493_l3           Up    44:38:39:ff:ff:25
sym_5                                 8892       vxlan99
vlan494_l3           Up    44:38:39:ff:ff:25
tor-1#
```

After:
```
tor-1# show vrf default vni json
{
  "vrfs":[
    {
      "vrf":"default",
      "vni":100,
      "vxlanIntf":"None",
      "sviIntf":"None",
      "state":"Down",
      "routerMac":"None"
    }
  ]
}

tor-1# show vrf default vni
VRF                                   VNI        VxLAN IF
L3-SVI               State Rmac
default                               100        None
None                 Down  None
tor-1#

tor-1# show vrf all vni
VRF                                   VNI        VxLAN IF
L3-SVI               State Rmac
default                               100        None
None                 Down  None
sym_1                                 8888       vxlan99
vlan490_l3           Up    44:38:39:ff:ff:25
sym_2                                 8889       vxlan99
vlan491_l3           Up    44:38:39:ff:ff:25
sym_3                                 8890       vxlan99
vlan492_l3           Up    44:38:39:ff:ff:25
sym_4                                 8891       vxlan99
vlan493_l3           Up    44:38:39:ff:ff:25
sym_5                                 8892       vxlan99
vlan494_l3           Up    44:38:39:ff:ff:25
tor-1#
tor-1#

tor-1#
tor-1#
tor-1#
tor-1# show vrf all vni json
{
  "vrfs":[
    {
      "vrf":"default",
      "vni":100,
      "vxlanIntf":"None",
      "sviIntf":"None",
      "state":"Down",
      "routerMac":"None"
    },
    {
      "vrf":"sym_1",
      "vni":8888,
      "vxlanIntf":"vxlan99",
      "sviIntf":"vlan490_l3",
      "state":"Up",
      "routerMac":"44:38:39:ff:ff:25"
    },
    {
      "vrf":"sym_2",
      "vni":8889,
      "vxlanIntf":"vxlan99",
      "sviIntf":"vlan491_l3",
      "state":"Up",
      "routerMac":"44:38:39:ff:ff:25"
    },
    {
      "vrf":"sym_3",
      "vni":8890,
      "vxlanIntf":"vxlan99",
      "sviIntf":"vlan492_l3",
      "state":"Up",
      "routerMac":"44:38:39:ff:ff:25"
    },
    {
      "vrf":"sym_4",
      "vni":8891,
      "vxlanIntf":"vxlan99",
      "sviIntf":"vlan493_l3",
      "state":"Up",
      "routerMac":"44:38:39:ff:ff:25"
    },
    {
      "vrf":"sym_5",
      "vni":8892,
      "vxlanIntf":"vxlan99",
      "sviIntf":"vlan494_l3",
      "state":"Up",
      "routerMac":"44:38:39:ff:ff:25"
    }
  ]
}
tor-1#
```

Ticket:#3260835
Issue:3260835

Testing: UT done

Signed-off-by: Sindhu Parvathi Gopinathan <sgopinathan@nvidia.com>
2023-01-13 13:49:21 -08:00