Commit Graph

270 Commits

Author SHA1 Message Date
Russ White
8a86917097
Merge pull request #11024 from anlancs/bgpd-fix-missing-newline
bgpd: fix wrong check for default VRF
2022-04-13 14:56:00 -04:00
anlan_cs
4a5271a56b bgpd: fix wrong check for default VRF
Currently the warning is wrong:
```
root#show bgp vrf default vni
BGP instance for VRF default not foundACC1(config)#
```

Two changes for "show bgp vrf VRFNAME vni [json]":
- Correct the default VRF check
- Add newline for warning

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-04-13 05:00:33 -04:00
anlan_cs
664b6f1851 bgpd: add whitespace after "%%" for prompt
Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-04-01 03:27:27 -04:00
anlan_cs
3b7e8d0f49 bgpd: small simplification for evpn RT commands
Small simplification for evpn RT commands, i.e. both per-VRF
and per-VNI - `bgp_evpn_vrf_rt_cmd` and `bgp_evpn_vni_rt_cmd`.

Just extract the duplicated code as a common code, there are
no functional changes.

Additionally correct one comment for `ecommunity_free()`.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-03-27 13:02:05 +08:00
Anuradha Karuppiah
bb37eabe24 bgpd: add cli for configuring the EVI limit per-ES-frag
The EAD-per-ES route can be fragmented to fit the EVIs on the switch. This
command allows the EVI limit to be configured -

!
router bgp 5556
 !
 address-family l2vpn evpn
  ead-es-frag evi-limit 200
 exit-address-family
 !
!

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2022-03-18 07:37:07 -04:00
Anuradha Karuppiah
7b0db0e43f lib, bgpd: changes for EAD-per-ES fragmentation
The EAD-per-ES route carries ECs for all the ES-EVI RTs. As the number of VNIs
increase all RTs do not fit into a standard BGP UPDATE (4K) so the route needs
to be fragmented.

Each fragment is associated with a separate RD and frag-id -
1. Local ES-per-EAD -
ES route table - {ES-frag-ID, ESI, ET=0xffffffff, VTEP-IP}
global route table - {RD-=ES-frag-RD, ESI, ET=0xffffffff}
2. Remote ES-per-EAD -
VNI route table - {ESI, ET=0xffffffff, VTEP-IP}
global route table - {RD-=ES-frag-RD, ESI, ET=0xffffffff}

Note: The fragment ID is abandoned in the per-VNI routing table. At this
point that is acceptable as we dont expect more than one-ES-per-EAD fragment
to be imported into the per-VNI routing table. But that may need to be
re-worked at a later point.

CLI changes (sample with 4 VNIs per-fragment for experimental pruposes) -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@torm-11:mgmt:~# vtysh -c "show bgp l2vpn evpn es 03:44:38:39:ff:ff:01:00:00:01"
ESI: 03:44:38:39:ff:ff:01:00:00:01
 Type: LR
 RD: 27.0.0.21:3
 Originator-IP: 27.0.0.21
 Local ES DF preference: 50000
 VNI Count: 10
 Remote VNI Count: 10
 VRF Count: 3
 MACIP EVI Path Count: 33
 MACIP Global Path Count: 198
 Inconsistent VNI VTEP Count: 0
 Inconsistencies: -
 Fragments: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  27.0.0.21:3 EVIs: 4
  27.0.0.21:13 EVIs: 4
  27.0.0.21:22 EVIs: 2
 VTEPs:
  27.0.0.22 flags: EA df_alg: preference df_pref: 32767
  27.0.0.23 flags: EA df_alg: preference df_pref: 32767

root@torm-11:mgmt:~# vtysh -c "show bgp l2vpn evpn es-evi vni 1002 detail"
VNI: 1002 ESI: 03:44:38:39:ff:ff:01:00:00:01
 Type: LR
 ES fragment RD: 27.0.0.21:13 >>>>>>>>>>>>>>>>>>>>>>>>>
 Inconsistencies: -
 VTEPs: 27.0.0.22(EV),27.0.0.23(EV)

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

PS: The number of EVIs per-fragment has been set to 128 and may need further
tuning.

Ticket: #2632967

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2022-03-18 07:37:06 -04:00
Anuradha Karuppiah
f4a5218dc6 bgpd: evpn mh changes to advertise EAD routes with user configured export-rt
This is an alternate to EAD route fragmenation and allows the user to limit
the route to a single UPDATE (<4K) independent of the number of EVIs.

Sample config (add one l2-vni RT from each VRF) -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
!
router bgp 5556
 !
 address-family l2vpn evpn
  ead-es-route-target export 5556:1001
  ead-es-route-target export 5556:1004
  ead-es-route-target export 5556:1008
 exit-address-family
!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Sample route
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   Network          Next Hop            Metric LocPrf Weight Path
*> [1]:[4294967295]:[03:44:38:39:ff:ff:01:00:00:01]:[32]:[27.0.0.21]
                    27.0.0.21                          32768 i
                    ET:8 ESI-label-Rt:AA RT:5556:1001 RT:5556:1004 RT:5556:1008
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

When configured, the ead-es-route-target is used instead of
the auto-generated version that includes all associated EVI's RTs.

Ticket: #2632967

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2022-03-18 07:33:12 -04:00
anlan_cs
2b94e4b69e bgpd: fix missing name of default vrf
Before:
(config-router-af)# advertise-all-vni
% Please unconfigure EVPN in VRF (null)

After:
(config-router-af)# advertise-all-vni
% Please unconfigure EVPN in VRF default

Just use `bgp->name_pretty` to make it pretty.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-02-05 19:42:05 -05:00
Russ White
d2dfd26697
Merge pull request #10636 from ton31337/fix/use_get_set_for_communities
bgpd: Reuse get/set helpers for attr->community
2022-02-28 09:52:50 -05:00
anlan_cs
4d4c404bf6 *: Add necessary new line for output of vty_out()
Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-02-27 10:59:19 +08:00
Donatas Abraitis
9a706b42fb bgpd: Reuse get/set helpers for attr->community
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-02-25 10:02:30 +02:00
Donatas Abraitis
1bcf3a96de bgpd: Use get/set helpers for attr->lcommunity
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-02-10 11:04:03 +02:00
Igor Ryzhov
cb3fa0a612
Merge pull request #10124 from ton31337/feature/vty_json 2021-11-29 02:11:29 +03:00
Donatas Abraitis
c48349e346 *: Remove redundand braces for single statement blocks
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-27 11:20:59 +02:00
Donatas Abraitis
75eeda9323 bgpd: Convert vty_out to vty_json for JSON
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-25 17:51:12 +02:00
Donatas Abraitis
67d7e256a3 bgpd: Replace prefix2str for JSON to %pFX
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-25 17:34:17 +02:00
Donatas Abraitis
4e9a98636f *: Remove unused variables
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-18 18:45:41 +02:00
Donatas Abraitis
c949c77101 bgpd: Replace inet_ntop to %pI4/6 for JSON outputs
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-18 11:35:29 +02:00
Aaron Pereira
0a5c5f135e bgpd: Update legend also for evpn_show_route_rd
Signed-off-by: Aaron Pereira <aaronpereira88@gmail.com>
2021-09-15 05:18:50 -07:00
Aaron Pereira
f13b2527cb bgpd: Update route-type-1 legend to match output
Currently the route-type-1 output has the Ethernet Tag printed first and
not the ESI.

However the legend has the opposite format

For eg:
Current legend:
EVPN type-1 prefix: [1]:[ESI]:[EthTag]:[IPlen]:[VTEP-IP]
*> [1]:[0]:[03:44:38:39:ff:ff:01:00:00:01]:[32]:[192.168.100.2]
                    192.168.100.2                          0 65002 i
                    RT:65002:100 ET:8
*> [1]:[0]:[03:44:38:39:ff:ff:01:00:00:01]:[32]:[192.168.100.3]
                    192.168.100.3                          0 65003 i
                    RT:65003:100 ET:8

Signed-off-by: Aaron Pereira <aaronpereira88@gmail.com>
2021-09-14 11:55:17 -07:00
Donald Sharp
192422ef3b bgpd: Fix usage of JSON_C_TO_STRING_NOSLASHESCAPE
The usage of json_object_to_json_string_ext is mean for
generation of output string and returns a `char *` pointer
to the `formatted` output.  Just calling it does nothing
and it's expensive to boot.

Modify the code in bgpd to just output with the NOSLASHESCAPE
when outputting.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-07 09:40:12 -04:00
Igor Ryzhov
a09811ff67 bgpd: fix coverity warning
`oly` is already dereferenced two lines earlier and is always passed to
the function.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-30 22:37:33 +03:00
Donald Sharp
b2c42dda96
Merge pull request #8853 from ton31337/fix/bgp_dest_lock_unlock
bgpd: Make sure we don't miss to unlock for bgp_dest before returning
2021-06-23 07:59:32 -04:00
Patrick Ruddy
fa855f8fa3
Merge pull request #6695 from adharkar/frr-master-gateway_ip
EVPN route type-5 gateway IP overlay Index
2021-06-23 09:23:54 +01:00
Donatas Abraitis
e71ad4b64e bgpd: Make sure we don't miss to unlock for bgp_dest before returning
bgp_node_lookup() increases `lock` which is not decreased on return.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-22 23:14:47 +03:00
Donatas Abraitis
a454d9ab44 bgpd: Drop return for void bgp_evpn_show_routes_mac_ip_es()
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-17 10:14:38 +03:00
Louis Scalbert
96c81f6671 bgpd: add terse display option on show bgp summary
Add a terse option to show bgp summary to shorten output.

Do not show the following information about the BGP
instances: the number of RIB entries, the table version and the used memory.
The "terse" option can be used in combination with the "remote-as", "neighbor",
"failed" and "established" filters, and with the "wide" option as well.

Before patch:

ubuntu# show bgp summary remote-as 123456
IPv4 Unicast Summary (VRF default):
BGP router identifier X.X.X.X, local AS number XXX vrf-id 0
BGP table version 0
RIB entries 3, using 552 bytes of memory
Peers 5, using 3635 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
10.200.200.2    4     123456     81432         4        0 56092    0 00:00:13       572106        0 N/A

Displayed neighbors 1
Total number of neighbors 4

IPv6 Unicast Summary (VRF default):
BGP router identifier X.X.X.X, local AS number XXX vrf-id 0
BGP table version 0
RIB entries 3, using 552 bytes of memory
Peers 5, using 3635 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
% No matching neighbor

Total number of neighbors 5

After patch:

ubuntu# show bgp summary remote-as 123456 terse
IPv4 Unicast Summary (VRF default):
BGP router identifier X.X.X.X, local AS number XXX vrf-id 0

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
10.200.200.2    4     123456     81432         4        0 56092    0 00:00:13       572106        0 N/A

Displayed neighbors 1
Total number of neighbors 4

IPv6 Unicast Summary (VRF default):
BGP router identifier X.X.X.X, local AS number XXX vrf-id 1

% No matching neighbor

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2021-06-08 10:47:35 +02:00
Ameya Dharkar
dc6cef732e bgpd: Add CLI for overlay index recursive resolution
Gateway IP overlay index of the remote type-5 route is resolved
recursively using remote type-2 route. For the purpose of this
recursive resolution, for each L2VNI, we build a hash table of the
remote IP addresses received by remote type-2 routes.
For the topologies where overlay index resolution is not needed, we
do not need to build this remote-ip-hash.

Thus, make the recursive resolution of the overlay index conditional on
"enable-resolve-overlay-index" configuration.

router bgp 65001
 bgp router-id 192.168.100.1
 neighbor 10.0.1.2 remote-as 65002
!
 address-family l2vpn evpn
  neighbor 10.0.1.2 activate
  advertise-all-vni
  enable-resolve-overlay-index----------> New configuration
 exit-address-family

Gateway IP overlay index will be resolved only if this configuration is present.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
2021-06-07 17:59:45 -07:00
Ameya Dharkar
021b659665 bgpd: EVPN route type-5 to type-2 recursive resolution using gateway IP
When EVPN prefix route with a gateway IP overlay index is imported into the IP
vrf at the ingress PE, BGP nexthop of this route is set to the gateway IP.
For this vrf route to be valid, following conditions must be met.
- Gateway IP nexthop of this route should be L3 reachable, i.e., this route
  should be resolved in RIB.
- A remote MAC/IP route should be present for the gateway IP address in the
  EVI(L2VPN table).

To check for the first condition, gateway IP is registered with nht (nexthop
tracking) to receive the reachability notifications for this IP from zebra RIB.
If the gateway IP is reachable, zebra sends the reachability information (i.e.,
nexthop interface) for the gateway IP.
This nexthop interface should be the SVI interface.

Now, to find out type-2 route corresponding to the gateway IP, we need to fetch
the VNI for the above SVI.

To do this VNI lookup effitiently, define a hashtable of struct bgpevpn with
svi_ifindex as key.

struct hash *vni_svi_hash;

An EVI instance is added to vni_svi_hash if its svi_ifindex is nonzero.

Using this hash, we obtain struct bgpevpn corresponding to the gateway IP.

For gateway IP overlay index recursive lookup, once we find the correct EVI, we
have to lookup its route table for a MAC/IP prefix. As we have to iterate the
entire route table for every lookup, this lookup is expensive. We can optimize
this lookup by adding all the remote IP addresses in a hash table.

Following hash table is defined for this purpose in struct bgpevpn
Struct hash *remote_ip_hash;

When a MAC/IP route is installed in the EVI table, it is also added to
remote_ip_hash.

It is possible to have multiple MAC/IP routes with the same IP address because
of host move scenarios. Thus, for every address addr in remote_ip_hash, we
maintain list of all the MAC/IP routes having addr as their IP address.

Following structure defines an address in remote_ip_hash.
struct evpn_remote_ip {
        struct ipaddr addr;
        struct list *macip_path_list;
};

A Boolean field is added to struct bgp_nexthop_cache to indicate that the
nexthop is EVPN gateway IP overlay index.

bool is_evpn_gwip_nexthop;

A flag BGP_NEXTHOP_EVPN_INCOMPLETE is added to struct bgp_nexthop_cache.

This flag is set when the gateway IP is L3 reachable but not yet resolved by a
MAC/IP route.

Following table explains the combination of L3 and L2 reachability w.r.t.
BGP_NEXTHOP_VALID and BGP_NEXTHOP_EVPN_INCOMPLETE flags

*                | MACIP resolved | MACIP unresolved
*----------------|----------------|------------------
* L3 reachable   | VALID      = 1 | VALID      = 0
*                | INCOMPLETE = 0 | INCOMPLETE = 1
* ---------------|----------------|--------------------
* L3 unreachable | VALID      = 0 | VALID      = 0
*                | INCOMPLETE = 0 | INCOMPLETE = 0

Procedure that we use to check if the gateway IP is resolvable by a MAC/IP
route:
- Find the EVI/L2VRF that belongs to the nexthop SVI using vni_svi_hash.
- Check if the gateway IP is present in remote_ip_hash in this EVI.

When the gateway IP is L3 reachable and it is also resolved by a MAC/IP route,
unset BGP_NEXTHOP_EVPN_INCOMPLETE flag and set BGP_NEXTHOP_VALID flag.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
2021-06-07 17:59:45 -07:00
Ameya Dharkar
9daa5d471a bgpd, zebra: Add svi_interface to zebra VNI and bgp EVPN structures
SVI ifindex for L2VNI is required in BGP to perform EVPN type-5 to type-2
recusrsive resolution using gateway IP overlay index.

Program this svi_ifindex in struct zebra_vni_t as well as in struct bgpevpn

Changes include:
1. Add svi_if field to struct zebra_evpn_t
2. Add svi_ifindex field to struct bgpevpn
3. When SVI (bridge or VLAN) is bound to a VxLAN interface, store it in the
zebra_evpn_t structure.
4. Add this SVI ifindex to ZEBRA_VNI_ADD
5. Store svi_ifindex in struct bgpevpn

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
2021-06-07 17:58:23 -07:00
Ameya Dharkar
d4a88de3bb bgpd: CLI to advertise gateway IP overlay index
Adds gateway-ip option to advertise ipv4/ipv6 unicast CLI.

dev(config-router-af)# advertise <ipv4|ipv6> unicast
  <cr>
  gateway-ip      Specify EVPN Overlay Index
  route-map       route-map for filtering specific routes

When gateway-ip is specified, gateway IP field of EVPN RT-5 NLRI is filled with
the BGP nexthop of the vrf prefix being advertised.

No support for ESI overlay index yet.

Test cases:
1) advertise ipv4 unicast
2) advertise ipv4 unicast gateway-ip
3) advertise ipv6 unicast
4) advertise ipv6 unicast gateway-ip
5) Modify from no-overlay-index to gateway-ip
6) Modify from gateway-ip to no-overlay-index
7) CLI with route-map and modify route-map

Author: Sri Mohana Singamsetty <srimohans@gmail.com>
Signed-off-by: Sri Mohana Singamsetty <srimohans@gmail.com>
2021-06-07 17:58:22 -07:00
Louis Scalbert
8c1d4cd512 bgpd: add show bgp summary filter by neighbor or AS
Add ability to filter session on show bgp summary by neighbor or
remote AS:

ubuntu# show bgp summary ?
  neighbor     Show only the specified neighbor session
  remote-as    Show only the specified remote AS session
ubuntu# show bgp summary neighbor ?
  A.B.C.D   Neighbor to display information about
  WORD      Neighbor on BGP configured interface
  X:X::X:X  Neighbor to display information about
ubuntu# show bgp summary remote-as ?
  (1-4294967295)  AS number
  external        External (eBGP) AS sessions
  internal        Internal (iBGP) AS sessions

This patch includes the documentation and the topotest.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2021-05-26 16:16:08 +02:00
Trey Aspelund
e5aee1518a bgpd: always allow no advertise-svi-ip/default-gw
Current behavior has an EVPN_ENABLED check for both standard and 'no'
forms of 'advertise-svi-ip' and 'advertise-default-gw'. This prevents a
user from removing either command from running config if
'advertise-all-vni' is not present.
This commit removes/adjusts the EVPN_ENABLED checks to always allow the
'no' command so config doesn't get stuck.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2021-04-08 07:25:22 +00:00
Trey Aspelund
a111dd975a bgpd: Add 'rd all' keyword to EVPN/L3VPN show cmds
New and improved submission for this commit -- updated to accommodate
changes from 4027d19b0.

Adds support for 'rd all' matching for EVPN and L3VPN show commands.
Introduces evpn_show_route_rd_all_macip().
Cleans up some show commands to use SHOW_DISPLAY string constants.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2021-04-01 01:35:29 +00:00
Lou Berger
10794c494b
Revert "bgpd: Add 'rd all' keyword to EVPN/L3VPN show cmds" 2021-03-30 11:27:07 -04:00
Russ White
7d4fb56b27
Merge pull request #8216 from taspelund/add_rd_all
bgpd: Add 'rd all' keyword to EVPN/L3VPN show cmds
2021-03-30 10:41:08 -04:00
Donald Sharp
4933eaafab bgpd: Figure out rpki validation state earlier
Figure out the rpki validation state earlier and also check
to see if we care about this state or not.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-26 08:23:33 -04:00
Anuradha Karuppiah
090efa2fb7 bgpd: changes for maintaining evpn nexthops and their rmac mapping
In the case of EVPN type-2 routes that use ES as destination, BGP
consolidates the nh (and nh->rmac mapping) and sends it to zebra as
a nexthop add.

This nexthop is the EVPN remote PE and is created by reference of
VRF IPvx unicast paths imported from EVPN Type-2 routes.

zebra uses this nexthop for setting up a remote neigh enty for the PE
and a remote fdb entry for the PE's RMAC.

Ticket: CM-31398

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-03-25 17:12:50 -07:00
Anuradha Karuppiah
58bff4d12e bgpd: re-eval use-l3nhg when a remote ES is [de]activated in a VRF
There are two changes in this commit -

1. Maintain a list of global MAC-IP routes per-ES. This list is maintained
for quick processing on the following events -
a. When the first VTEP/PE becomes active in the ES-VRF, the L3 NHG is
activated and the route can be sent to zebra.
b. When there are no active PEs in the ES-VRF the L3 NHG is
de-activated and -
- If the ES is present in the VRF -
The route is not installed in zebra as there are no active PEs for
the ES-VRF
- If the ES is not present in the VRF -
The route is installed with a flat multi-path list i.e. without L3NHG.
This is to handle the case where there are no locally attached L2VNIs
on the ES (for that tenant VRF).

2. Reinstall VRF route when an ES is installed or uninstalled in a
tenant VRF (the global MAC-IP list in #1 is used for this purpose also).
If an ES is present in the VRF we use L3NHG to enable fast-failover of
routed traffic.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-03-25 17:09:53 -07:00
Anuradha Karuppiah
d656e0aea6 bgpd: Rename macip_path_list to macip_evi_path_list
This is done to clearly indicate what routes are being linked to
the list i.e. MAC-IP routes in the VNI table.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-03-25 17:09:53 -07:00
Trey Aspelund
093d16a23c bgpd: Add 'rd all' keyword to EVPN/L3VPN show cmds
Adds support for 'rd all' matching for EVPN and L3VPN show commands.
Introduces evpn_show_route_rd_all_macip().
Cleanup some show commands to use SHOW_DISPLAY string constants.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2021-03-19 15:24:50 +00:00
Ameya Dharkar
acd1d9bc43 bgpd: Reevaluate es_evi_vtep active state on disable-ead-evi-rx config flap
Update es_evi_vtep active state and add/delete es_vtep accordingly to
zebra for remote ES.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
2021-03-09 16:37:52 -08:00
Anuradha Karuppiah
74be8313d4 bgpd: support for lacp bypass with EVPN MH
When a local ES is in LACP bypass state BGP doesn't advertise
reachability to it i.e. the Type-1/EAD-per-ES routes and Type-4
route for the ES is not advertised. This is the equivalent of
oper-down handling.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2021-02-24 08:11:26 -08:00
Donatas Abraitis
85eeb02915 bgpd: Add show bgp summary wide command
Add LocalAS into wide output and extend Desc to 64 chars instead of 20.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-01-28 16:35:16 +02:00
Patrick Ruddy
b5a9054d76
Merge pull request #7635 from AnuradhaKaruppiah/ead-evi-knobs
bgpd: add config knobs to disable rx and tx of ead-per-evi routes
2021-01-26 17:14:57 +00:00
Anuradha Karuppiah
6c111b51a1 bgpd: add missing type-1 and type-4 route descriptions to the legend
Sample output -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@torm-11:mgmt:~# net show bgp l2vpn evpn route rd 27.0.0.16:3
EVPN type-1 prefix: [1]:[ESI]:[EthTag]:[IPlen]:[VTEP-IP]
EVPN type-2 prefix: [2]:[EthTag]:[MAClen]:[MAC]
EVPN type-3 prefix: [3]:[EthTag]:[IPlen]:[OrigIP]
EVPN type-4 prefix: [4]:[ESI]:[IPlen]:[OrigIP]
EVPN type-5 prefix: [5]:[EthTag]:[IPlen]:[IP]

BGP routing table entry for 27.0.0.16:3:[1]:[0]:[03:44:38:39:ff:ff:01:00:00:01]:[32]:[0.0.0.0]
Paths: (4 available, best #2)
  Advertised to non peer-group peers:
  spine-1(swp1) spine-1(swp2) spine-2(swp3) spine-2(swp4)
  4435 5551
    27.0.0.16 from spine-1(swp2) (27.0.0.13)
      Origin IGP, valid, external
      Extended Community: RT:5551:1009 ET:8
      Last update: Thu Sep  3 21:01:53 2020
  4435 5551
    27.0.0.16 from spine-1(swp1) (27.0.0.13)
      Origin IGP, valid, external, bestpath-from-AS 4435, best (Router ID)
      Extended Community: RT:5551:1009 ET:8
      Last update: Thu Sep  3 21:01:53 2020
  4435 5551
    27.0.0.16 from spine-2(swp3) (27.0.0.14)
      Origin IGP, valid, external
      Extended Community: RT:5551:1009 ET:8
      Last update: Thu Sep  3 21:01:53 2020
  4435 5551
    27.0.0.16 from spine-2(swp4) (27.0.0.14)
      Origin IGP, valid, external
      Extended Community: RT:5551:1009 ET:8
      Last update: Thu Sep  3 21:01:53 2020

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2020-12-21 08:41:17 -08:00
Anuradha Karuppiah
fe8293c326 bgpd: add config knobs to disable rx and tx of ead-per-evi routes
Some vendors only advertise EAD-per-ES routes i.e. they do not
advertise EAD-per-EVI routes. To interop with these vendors we need
to relax the dependancy on EAD-per-EVI routes to activate a remote ES-PE.

Sample config -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
router bgp 5553
 address-family l2vpn evpn
  disable-ead-evi-rx
>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Ticket: CM-31177

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-12-11 09:39:04 -08:00
Anuradha Karuppiah
2867823e49 bgpd: add a config knob to enable use of L3 NHG for EVPN host routes
Sample config -
vtysh -c "conf t"  -c "router bgp <N>" -c "address-family l2vpn evpn" -c "use-es-l3nhg"

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-11-24 11:06:08 -08:00
Anuradha Karuppiah
229587fb46 bgpd: commands to display L3 NHGs and MAC-IP paths linked to an ES
Sample output -
===============
torm-11# sh bgp l2vpn evpn es-vrf
ES-VRF Flags: A Active
ESI                            VRF             Flags IPv4-NHG IPv6-NHG Ref
03:44:38:39:ff:ff:01:00:00:01  vrf3            A     1        0        2
03:44:38:39:ff:ff:01:00:00:01  vrf2            A     6        0        4
03:44:38:39:ff:ff:01:00:00:01  vrf1            A     7        0        4
03:44:38:39:ff:ff:01:00:00:02  vrf3            A     2        0        2
03:44:38:39:ff:ff:01:00:00:02  vrf2            A     4        0        4
03:44:38:39:ff:ff:01:00:00:02  vrf1            A     8        0        4

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-11-24 11:06:08 -08:00
Donald Sharp
736e6a45e6 bgpd: Prevent ecomm memory leak
There are some situations where we create a ecommunity for
comparing to internal state when we are deleting, but in the
failure cases we would not free up the created memory.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-27 15:16:32 -04:00