Commit Graph

169 Commits

Author SHA1 Message Date
Soman K S
a77e2f4bab bgpd: Advertise FIB installed routes to bgp peers (Part 3)
* Process FIB update in bgp_zebra_route_notify_owner() and call
  group_announce_route() if route is installed
* When bgp update is received for a route which is not installed earlier
  (flag BGP_NODE_FIB_INSTALLED is not set) and suppress fib is enabled
  set the flag BGP_NODE_FIB_INSTALL_PENDING to indicate fib install is
  pending for the route. The route will be advertised when zebra send
  ZAPI_ROUTE_INSTALLED status.
* The advertisement delay (BGP_DEFAULT_UPDATE_ADVERTISEMENT_TIME)
  is added to allow more routes to be sent in single update message.
  This is required since zebra sends route notify message for each route.
  The delay will be applied to update group timer which advertises
  routes to peers.

Signed-off-by: kssoman <somanks@gmail.com>
2020-11-06 08:55:56 +05:30
Donatas Abraitis
f2ee6d5cd9 bgpd: Handle route-maps properly for default-originate route-map command
The problem is that only prefixes were handled and any other `match`
commands were ignored. Let's do not forget them as well.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-10-30 18:09:15 +02:00
Rafael Zalamena
7f2f38c62f
Merge pull request #7189 from maduri111/bgpd-conditional-adv
bgpd: conditional advertisement
2020-10-27 12:24:24 -03:00
Madhuri Kuruganti
e73c112ef9 bgpd: conditional advertisement - topotests-2
Signed-off-by: Madhuri Kuruganti <k.madhuri@samsung.com>
2020-10-27 16:15:36 +05:30
Madhuri Kuruganti
7f7940e6bf bgpd: conditional advertisement
Implemented as per the feature description given in the source link.

Descriprion:
The BGP conditional advertisement feature uses the non-exist-map or exist-map
and the advertise-map keywords of the neighbor advertise-map command in order
to track routes by the route prefix.

non-exist-map :
If a route prefix is not present in output of the non-exist-map command, then
the route specified by the advertise-map command is announced.

exist-map :
If a route prefix is present in output of the exist-map command, then the route
specified by the advertise-map command is announced.

The conditional BGP announcements are sent in addition to the normal
announcements that a BGP router sends to its peers.

The conditional advertisement process is triggered by the BGP scanner process,
which runs every 60 seconds. This means that the maximum time for the conditional
advertisement to take effect is 60 seconds. The conditional advertisement can take
effect sooner, depending on when the tracked route is removed from the BGP table
and when the next instance of the BGP scanner occurs.

Sample Configuration on DUT
---------------------------
Router2# show running-config
Building configuration...

Current configuration:
!
frr version 7.6-dev-MyOwnFRRVersion
frr defaults traditional
hostname router
log file /var/log/frr/bgpd.log
log syslog informational
hostname Router2
service integrated-vtysh-config
!
debug bgp updates in
debug bgp updates out
!
debug route-map
!
ip route 200.200.0.0/16 blackhole
ipv6 route 2001:db8::200/128 blackhole
!
interface enp0s9
 ip address 10.10.10.2/24
!
interface enp0s10
 ip address 10.10.20.2/24
!
interface lo
 ip address 2.2.2.2/24
 ipv6 address 2001:db8::2/128
!
router bgp 2
 bgp log-neighbor-changes
 no bgp ebgp-requires-policy
 neighbor 10.10.10.1 remote-as 1
 neighbor 10.10.20.3 remote-as 3
 !
 address-family ipv4 unicast
  network 2.2.2.0/24
  network 200.200.0.0/16
  neighbor 10.10.10.1 soft-reconfiguration inbound
  neighbor 10.10.10.1 advertise-map ADVERTISE non-exist-map CONDITION
  neighbor 10.10.20.3 soft-reconfiguration inbound
 exit-address-family
 !
 address-family ipv6 unicast
  network 2001:db8::2/128
  network 2001:db8::200/128
  neighbor 10.10.10.1 activate
  neighbor 10.10.10.1 soft-reconfiguration inbound
  neighbor 10.10.10.1 advertise-map ADVERTISE_6 non-exist-map CONDITION_6
  neighbor 10.10.20.3 activate
  neighbor 10.10.20.3 soft-reconfiguration inbound
 exit-address-family
!
access-list CONDITION seq 5 permit 3.3.3.0/24
access-list ADVERTISE seq 5 permit 2.2.2.0/24
access-list ADVERTISE seq 6 permit 200.200.0.0/16
access-list ADVERTISE seq 7 permit 20.20.0.0/16
!
ipv6 access-list ADVERTISE_6 seq 5 permit 2001:db8::2/128
ipv6 access-list CONDITION_6 seq 5 permit 2001:db8::3/128
!
route-map ADVERTISE permit 10
 match ip address ADVERTISE
!
route-map CONDITION permit 10
 match ip address CONDITION
!
route-map ADVERTISE_6 permit 10
 match ipv6 address ADVERTISE_6
!
route-map CONDITION_6 permit 10
 match ipv6 address CONDITION_6
!
line vty
!
end
Router2#

Withdraw when non-exist-map prefixes present in BGP table:
----------------------------------------------------------
Router2# show ip bgp all wide

For address family: IPv4 Unicast
BGP table version is 8, local router ID is 2.2.2.2, vrf id 0
Default local pref 100, local AS 2
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 1.1.1.0/24                                   10.10.10.1                                     0             0 1 i
*> 2.2.2.0/24                                   0.0.0.0                                        0         32768 i
*> 3.3.3.0/24                                   10.10.20.3                                     0             0 3 i
*> 200.200.0.0/16                               0.0.0.0                                        0         32768 i

Displayed  4 routes and 4 total paths

For address family: IPv6 Unicast
BGP table version is 8, local router ID is 2.2.2.2, vrf id 0
Default local pref 100, local AS 2
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 2001:db8::1/128                              fe80::a00:27ff:fecb:ad57                       0             0 1 i
*> 2001:db8::2/128                              ::                                             0         32768 i
*> 2001:db8::3/128                              fe80::a00:27ff:fe76:6738                       0             0 3 i
*> 2001:db8::200/128                            ::                                             0         32768 i

Displayed  4 routes and 4 total paths
Router2#

Router2# show ip bgp neighbors 10.10.10.1
BGP neighbor is 10.10.10.1, remote AS 1, local AS 2, external link

!--- Output suppressed.

 For address family: IPv4 Unicast
  Update group 9, subgroup 5
  Packet Queue length 0
  Inbound soft reconfiguration allowed
  Community attribute sent to this neighbor(all)
  Condition NON_EXIST, Condition-map *CONDITION, Advertise-map *ADVERTISE, status: Withdraw
  1 accepted prefixes

 For address family: IPv6 Unicast
  Update group 10, subgroup 6
  Packet Queue length 0
  Inbound soft reconfiguration allowed
  Community attribute sent to this neighbor(all)
  Condition NON_EXIST, Condition-map *CONDITION_6, Advertise-map *ADVERTISE_6, status: Withdraw
  1 accepted prefixes

!--- Output suppressed.

Router2#

Here 2.2.2.0/24 & 200.200.0.0/16 (prefixes in advertise-map) are withdrawn
by conditional advertisement scanner as the prefix(3.3.3.0/24) specified
by non-exist-map is present in BGP table.

Router2# show ip bgp all neighbors 10.10.10.1 advertised-routes wide

For address family: IPv4 Unicast
BGP table version is 8, local router ID is 2.2.2.2, vrf id 0
Default local pref 100, local AS 2
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 1.1.1.0/24                                   0.0.0.0                                                      0 1 i
*> 3.3.3.0/24                                   0.0.0.0                                                      0 3 i

Total number of prefixes 2

For address family: IPv6 Unicast
BGP table version is 8, local router ID is 2.2.2.2, vrf id 0
Default local pref 100, local AS 2
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 2001:db8::1/128                              ::                                                           0 1 i
*> 2001:db8::3/128                              ::                                                           0 3 i
*> 2001:db8::200/128                            ::                                             0         32768 i

Total number of prefixes 3
Router2#

Advertise when non-exist-map prefixes not present in BGP table:
---------------------------------------------------------------
After Removing 3.3.3.0/24 (prefix present in non-exist-map),
2.2.2.0/24 & 200.200.0.0/16 (prefixes present in advertise-map) are advertised

Router2# show ip bgp all wide

For address family: IPv4 Unicast
BGP table version is 9, local router ID is 2.2.2.2, vrf id 0
Default local pref 100, local AS 2
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 1.1.1.0/24                                   10.10.10.1                                     0             0 1 i
*> 2.2.2.0/24                                   0.0.0.0                                        0         32768 i
*> 200.200.0.0/16                               0.0.0.0                                        0         32768 i

Displayed  3 routes and 3 total paths

For address family: IPv6 Unicast
BGP table version is 9, local router ID is 2.2.2.2, vrf id 0
Default local pref 100, local AS 2
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 2001:db8::1/128                              fe80::a00:27ff:fecb:ad57                       0             0 1 i
*> 2001:db8::2/128                              ::                                             0         32768 i
*> 2001:db8::200/128                            ::                                             0         32768 i

Displayed  3 routes and 3 total paths
Router2#

Router2# show ip bgp neighbors 10.10.10.1

!--- Output suppressed.

 For address family: IPv4 Unicast
  Update group 9, subgroup 5
  Packet Queue length 0
  Inbound soft reconfiguration allowed
  Community attribute sent to this neighbor(all)
  Condition NON_EXIST, Condition-map *CONDITION, Advertise-map *ADVERTISE, status: Advertise
  1 accepted prefixes

 For address family: IPv6 Unicast
  Update group 10, subgroup 6
  Packet Queue length 0
  Inbound soft reconfiguration allowed
  Community attribute sent to this neighbor(all)
  Condition NON_EXIST, Condition-map *CONDITION_6, Advertise-map *ADVERTISE_6, status: Advertise
  1 accepted prefixes

!--- Output suppressed.

Router2#
Router2# show ip bgp all neighbors 10.10.10.1 advertised-routes wide

For address family: IPv4 Unicast
BGP table version is 9, local router ID is 2.2.2.2, vrf id 0
Default local pref 100, local AS 2
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 1.1.1.0/24                                   0.0.0.0                                                      0 1 i
*> 2.2.2.0/24                                   0.0.0.0                                        0         32768 i
*> 200.200.0.0/16                               0.0.0.0                                        0         32768 i

Total number of prefixes 3

For address family: IPv6 Unicast
BGP table version is 9, local router ID is 2.2.2.2, vrf id 0
Default local pref 100, local AS 2
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 2001:db8::1/128                              ::                                                           0 1 i
*> 2001:db8::2/128                              ::                                             0         32768 i
*> 2001:db8::200/128                            ::                                             0         32768 i

Total number of prefixes 3
Router2#

Signed-off-by: Madhuri Kuruganti <k.madhuri@samsung.com>
2020-10-27 16:15:36 +05:30
Chirag Shah
37a87b8f98 bgpd: convert addr-family clis to transactional clis
Convert IPv4 and IPv6 unicast address family clis
to transactional clis and implementation of
northbound callbacks.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-26 08:57:15 -07:00
Donatas Abraitis
90a65457d1
Merge pull request #7345 from opensourcerouting/bgp-aggr-suppress
bgpd: aggregate-address suppress-map
2020-10-23 15:02:57 +03:00
Rafael Zalamena
4056a5f6a5 bgpd: route suppression refactory
Instead of just counting the route suppressions, keep a reference for
all aggregations that are doing it. It should help the with the
following problems:

- Which aggregation suppressed the route.
- Double suppression
- Double unsuppression
- Avoids calling `bgp_process` if already suppressed/unsuppressed.
- Easier code maintenance and understanding

This also fixes a crash when modifying a route map that is
associated with a working aggregate-address.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-10-22 13:52:00 -03:00
Rafael Zalamena
365ab2e74b bgpd: aggregate address suppress more specific
Add new aggregate-address option to selectively suppress routes based
on route map results.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-10-21 21:31:49 -03:00
Donald Sharp
b6c386bbbd bgpd: Make the process_queue per bgp process
We currently have a global process queue for handling route
updates in bgp.  This is fine, in general, except there are
places and times where we plug the queue for no new work
during certain peer states of bgp update delay.  If we
happen to be processing multiple bgp instances on startup
why do we want to stop processing in vrf A when vrf B
is in a bit of a pickle?

Also this separation will allow us to start forward thinking
about how to fully integrate pthreads into route processing
in bgp.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-21 15:34:47 -04:00
Rafael Zalamena
6aabb15dd7 bgpd: aggregate address matching-MED-only
Add code to handle MED matching:

- When MED matches act as normal.

- When MED doesn't match do the following:

  * Uninstall the aggregate route
  * Unsuppress routes (if using summary-only)

- When MED didn't match, but now matches:

  * Install the aggregate route
  * Suppress all routes (if using summary-only)

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-10-06 06:42:12 -03:00
Madhuri Kuruganti
96f3485cdb bgpd: show < ip > bgp < ipv4 | ipv6 > all
This commit
=> provides "all" option, to display the table entries for all(or specific) AFI/SAFIs.
=> Also introduced "show_flags" to avoid passing multiple arguments(use_json, wide, all)
   to functions

1. show <ip> bgp <ipv4/ipv6> <all> <wide|json>
2. show <ip> bgp <ipv4/ipv6> <all> summary <json>
3. show <ip> bgp <ipv4/ipv6> <all> cidr-only <wide|json>
4. show <ip> bgp <ipv4/ipv6> <all> community <wide|json>
5. show <ip> bgp <ipv4/ipv6> <all> dampening <dampened-paths|flap-statistics|parameters> <wide|json>
6. show <ip> bgp <ipv4/ipv6> <all> neighbors A.B.C.D advertised-routes|filtered-routes|received-routes <wide|json>

show bgp all summary            == show ip bgp all summary      => output is same => display entries for all AFIs and for each SAFI.
show bgp ipv4 all summary       == show ip bgp ipv4 all summary => output is same => display entries for each SAFI in AFI_IP
show bgp ipv6 all summary       == show ip bgp ipv6 all summart => output is same => display entries for each SAFI in AFI_IP6

similarly for all other commands.

sample output
1. show <ip> bgp <ipv4/ipv6> <all> <wide|json>

router# show ip bgp all wide

For address family: IPv4 Unicast

BGP table version is 6, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 1.1.1.1/32                                   0.0.0.0                                        0         32768 ?
*>i2.2.2.2/32                                   192.168.56.152                                 0    100      0 ?
* i10.0.2.0/24                                  192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
* i192.168.56.0/24                              192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
*>i192.168.123.245/32                           192.168.56.152                                 0    100      0 ?
*>i192.168.223.245/32                           192.168.56.152                                 0    100      0 ?

Displayed  6 routes and 8 total paths

For address family: IPv6 Unicast

BGP table version is 3, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 2001:db8::1/128                              ::                                             0         32768 ?
*>i2001:db8::2/128                              fe80::a00:27ff:fefc:2aa                        0    100      0 ?
*> 2001:db8:85a3::8a2e:370:7334/128             ::                                             0         32768 ?

Displayed  3 routes and 3 total paths
router#

router# show ip bgp ipv4 all wide

For address family: IPv4 Unicast

BGP table version is 6, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 1.1.1.1/32                                   0.0.0.0                                        0         32768 ?
*>i2.2.2.2/32                                   192.168.56.152                                 0    100      0 ?
* i10.0.2.0/24                                  192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
* i192.168.56.0/24                              192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
*>i192.168.123.245/32                           192.168.56.152                                 0    100      0 ?
*>i192.168.223.245/32                           192.168.56.152                                 0    100      0 ?

Displayed  6 routes and 8 total paths
router#

router#
router# show ip bgp ipv6 all wide

For address family: IPv6 Unicast

BGP table version is 3, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 2001:db8::1/128                              ::                                             0         32768 ?
*>i2001:db8::2/128                              fe80::a00:27ff:fefc:2aa                        0    100      0 ?
*> 2001:db8:85a3::8a2e:370:7334/128             ::                                             0         32768 ?

Displayed  3 routes and 3 total paths
router#

router# show bgp all wide

For address family: IPv4 Unicast

BGP table version is 6, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 1.1.1.1/32                                   0.0.0.0                                        0         32768 ?
*>i2.2.2.2/32                                   192.168.56.152                                 0    100      0 ?
* i10.0.2.0/24                                  192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
* i192.168.56.0/24                              192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
*>i192.168.123.245/32                           192.168.56.152                                 0    100      0 ?
*>i192.168.223.245/32                           192.168.56.152                                 0    100      0 ?

Displayed  6 routes and 8 total paths

For address family: IPv6 Unicast

BGP table version is 3, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 2001:db8::1/128                              ::                                             0         32768 ?
*>i2001:db8::2/128                              fe80::a00:27ff:fefc:2aa                        0    100      0 ?
*> 2001:db8:85a3::8a2e:370:7334/128             ::                                             0         32768 ?

Displayed  3 routes and 3 total paths
router#
router#

router# show bgp ipv4 all wide

For address family: IPv4 Unicast

BGP table version is 6, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 1.1.1.1/32                                   0.0.0.0                                        0         32768 ?
*>i2.2.2.2/32                                   192.168.56.152                                 0    100      0 ?
* i10.0.2.0/24                                  192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
* i192.168.56.0/24                              192.168.56.152                                 0    100      0 ?
*>                                              0.0.0.0                                        0         32768 ?
*>i192.168.123.245/32                           192.168.56.152                                 0    100      0 ?
*>i192.168.223.245/32                           192.168.56.152                                 0    100      0 ?

Displayed  6 routes and 8 total paths
router#

router# show bgp ipv6 all wide

For address family: IPv6 Unicast

BGP table version is 3, local router ID is 1.1.1.1, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network                                      Next Hop                                  Metric LocPrf Weight Path
*> 2001:db8::1/128                              ::                                             0         32768 ?
*>i2001:db8::2/128                              fe80::a00:27ff:fefc:2aa                        0    100      0 ?
*> 2001:db8:85a3::8a2e:370:7334/128             ::                                             0         32768 ?

Displayed  3 routes and 3 total paths
router#

Router1# show bgp all dampening parameters

For address family: IPv4 Unicast
Half-life time: 15 min
Reuse penalty: 750
Suppress penalty: 2000
Max suppress time: 60 min
Max suppress penalty: 12000

For address family: IPv4 Multicast
Half-life time: 20 min
Reuse penalty: 1000
Suppress penalty: 10000
Max suppress time: 40 min
Max suppress penalty: 4000

For address family: IPv4 VPN
dampening not enabled for IPv4 VPN

For address family: IPv4 Encap
dampening not enabled for IPv4 Encap

For address family: IPv4 Labeled Unicast
dampening not enabled for IPv4 Labeled Unicast

For address family: IPv4 Flowspec
dampening not enabled for IPv4 Flowspec

For address family: IPv6 Unicast
dampening not enabled for IPv6 Unicast

For address family: IPv6 Multicast
Half-life time: 10 min
Reuse penalty: 1500
Suppress penalty: 15000
Max suppress time: 20 min
Max suppress penalty: 6000

For address family: IPv6 VPN
dampening not enabled for IPv6 VPN

For address family: IPv6 Encap
dampening not enabled for IPv6 Encap

For address family: IPv6 Labeled Unicast
dampening not enabled for IPv6 Labeled Unicast

For address family: IPv6 Flowspec
dampening not enabled for IPv6 Flowspec

For address family: L2VPN EVPN
dampening not enabled for L2VPN EVPN
router#

bgpd: all option with json-c apis used

Replaced vty_out with json-c wrapper functions for all option
support to show <ip> bgp commands

Sample output:
Router2# show bgp all json
{
"ipv4Unicast":{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 8,
 "routerId": "128.16.16.1",
 "defaultLocPrf": 100,
 "localAS": 2,
 "routes": { "128.16.16.0/24": [
  {
    "valid":true,
    "bestpath":true,
    "pathFrom":"external",
    "prefix":"128.16.16.0",
    "prefixLen":24,
    "network":"128.16.16.0\/24",
    "metric":0,
    "weight":32768,
    "peerId":"(unspec)",
    "path":"",
    "origin":"IGP",
    "nexthops":[
      {
        "ip":"0.0.0.0",
        "hostname":"router",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
],"130.130.0.0/16": [
  {
    "valid":true,
    "bestpath":true,
    "pathFrom":"external",
    "prefix":"130.130.0.0",
    "prefixLen":16,
    "network":"130.130.0.0\/16",
    "metric":0,
    "weight":32768,
    "peerId":"(unspec)",
    "path":"",
    "origin":"IGP",
    "nexthops":[
      {
        "ip":"0.0.0.0",
        "hostname":"router",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
],"192.168.50.0/24": [
  {
    "valid":true,
    "bestpath":true,
    "pathFrom":"external",
    "prefix":"192.168.50.0",
    "prefixLen":24,
    "network":"192.168.50.0\/24",
    "metric":0,
    "weight":0,
    "peerId":"10.10.20.3",
    "path":"3",
    "origin":"IGP",
    "nexthops":[
      {
        "ip":"10.10.20.3",
        "hostname":"router",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
],"200.200.200.0/24": [
  {
    "valid":true,
    "bestpath":true,
    "pathFrom":"external",
    "prefix":"200.200.200.0",
    "prefixLen":24,
    "network":"200.200.200.0\/24",
    "metric":0,
    "weight":0,
    "peerId":"10.10.10.1",
    "path":"1",
    "origin":"IGP",
    "nexthops":[
      {
        "ip":"10.10.10.1",
        "hostname":"router",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
] } }
,
"ipv4Multicast":{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 0,
 "routerId": "128.16.16.1",
 "defaultLocPrf": 100,
 "localAS": 2,
 "routes": {  } }
,
"ipv4Flowspec":{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 0,
 "routerId": "128.16.16.1",
 "defaultLocPrf": 100,
 "localAS": 2,
 "routes": {  } }
,
"ipv6Unicast":{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 11,
 "routerId": "128.16.16.1",
 "defaultLocPrf": 100,
 "localAS": 2,
 "routes": { "2001:db8::2/128": [
  {
    "valid":true,
    "bestpath":true,
    "pathFrom":"external",
    "prefix":"2001:db8::2",
    "prefixLen":128,
    "network":"2001:db8::2\/128",
    "metric":0,
    "weight":32768,
    "peerId":"(unspec)",
    "path":"",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"::",
        "hostname":"router",
        "afi":"ipv6",
        "scope":"global",
        "used":true
      }
    ]
  }
],"2001:db8::3/128": [
  {
    "valid":true,
    "bestpath":true,
    "pathFrom":"external",
    "prefix":"2001:db8::3",
    "prefixLen":128,
    "network":"2001:db8::3\/128",
    "metric":0,
    "weight":0,
    "peerId":"10.10.20.3",
    "path":"3",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"2001:db8:0:20::3",
        "hostname":"router",
        "afi":"ipv6",
        "scope":"global"
      },
      {
        "ip":"fe80::a00:27ff:fe76:6738",
        "hostname":"router",
        "afi":"ipv6",
        "scope":"link-local",
        "used":true
      }
    ]
  }
],"2001:db8:0:20::/64": [
  {
    "valid":true,
    "pathFrom":"external",
    "prefix":"2001:db8:0:20::",
    "prefixLen":64,
    "network":"2001:db8:0:20::\/64",
    "metric":0,
    "weight":0,
    "peerId":"10.10.20.3",
    "path":"3",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"2001:db8:0:20::3",
        "hostname":"router",
        "afi":"ipv6",
        "scope":"global"
      },
      {
        "ip":"fe80::a00:27ff:fe76:6738",
        "hostname":"router",
        "afi":"ipv6",
        "scope":"link-local",
        "used":true
      }
    ]
  },
  {
    "valid":true,
    "bestpath":true,
    "pathFrom":"external",
    "prefix":"2001:db8:0:20::",
    "prefixLen":64,
    "network":"2001:db8:0:20::\/64",
    "metric":0,
    "weight":32768,
    "peerId":"(unspec)",
    "path":"",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"::",
        "hostname":"router",
        "afi":"ipv6",
        "scope":"global",
        "used":true
      }
    ]
  }
] } }
,
"ipv6Multicast":{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 0,
 "routerId": "128.16.16.1",
 "defaultLocPrf": 100,
 "localAS": 2,
 "routes": {  } }
}
Router2#

Signed-off-by: Madhuri Kuruganti <k.madhuri@samsung.com>
2020-09-03 20:26:07 +05:30
Anuradha Karuppiah
d071f23715 bgpd: evpn path selection changes for MAC-IP SYNC route handling
When a SYNC route i.e. a route with a local ES as destination is
rxed on a switch (say L11) from an ES peer (say L12) a local
MAC/neigh entry is created on L11 with the local access port
as dest port.

Creation of the local entry triggers a local path advertisement from
L11. This could be a "locally-active" path or a "locally-inactive"
path. Inactive paths are advertised with the proxy bit.

To ensure that the local entry is not deleted by a SYNC route it is
given absolute precedence over peer-paths.

If there are two non-local paths with the same dest ES and same MM
seq number the non-proxy path is preferred. This is done to ensure
that we don't lose track of the peer-activity.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-08-05 06:46:12 -07:00
Anuradha Karuppiah
c44ab6f1f3 bgpd: support for Ethernet Segments and Type-1/EAD routes
This is the base patch that brings in support for Type-1 routes.
It includes support for -
- Ethernet Segment (ES) management
- EAD route handling
- MAC-IP (Type-2) routes with a non-zero ESI i.e. Aliasing for
  active-active multihoming
- Initial infra for consistency checking. Consistency checking
  is a fundamental feature for active-active solutions like MLAG.
  We will try to levarage the info in the EAD-ES/EAD-EVI routes to
  detect inconsitencies in access config across VTEPs attached to
  the same Ethernet Segment.

Functionality Overview -
========================
1. Ethernet segments are created in zebra and associated with
access VLANs. zebra sends that info as ES and ES-EVI objects to BGP.
2. BGP advertises EAD-ES and EAD-EVI routes for the locally attached
ethernet segments.
3. Similarly BGP processes EAD-ES and EAD-EVI routes from peers
and translates them into ES-VTEP objects which are then sent to zebra
as remote ESs.
4. Each ES in zebra is associated with a list of active VTEPs which
is then translated into a L2-NHG (nexthop group). This is the ES
"Alias" entry
5. MAC-IP routes with a non-zero ESI use the alias entry created in
(4.) to forward traffic i.e. a MAC-ECMP is done to these remote-ES
destinations.

EAD route management (route table and key) -
============================================
1. Local EAD-ES routes
a. route-table: per-ES route-table
key: {RD=ES-RD, ESI, ET=0xffffffff, VTEP-IP)
b. route-table: per-VNI route-table
Not added
c. route-table: global route-table
key: {RD=ES-RD, ESI, ET=0xffffffff)

2. Remote EAD-ES routes
a. route-table: per-ES route-table
Not added
b. route-table: per-VNI route-table
key: {RD=ES-RD, ESI, ET=0xffffffff, VTEP-IP)
c. route-table: global route-table
key: {RD=ES-RD, ESI, ET=0xffffffff)

3. Local EAD-EVI routes
a. route-table: per-ES route-table
Not added
b. route-table: per-VNI route-table
key: {RD=0, ESI, ET=0, VTEP-IP)
c. route-table: global route-table
key: {RD=L2-VNI-RD, ESI, ET=0)

4. Remote EAD-EVI routes
a. route-table: per-ES route-table
Not added
b. route-table: per-VNI route-table
key: {RD=0, ESI, ET=0, VTEP-IP)
c. route-table: global route-table
key: {RD=L2-VNI-RD, ESI, ET=0)

Please refer to bgp_evpn_mh.h for info on how the data-structures are
organized.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-08-05 06:46:12 -07:00
Anuradha Karuppiah
0a50c24813 bgpd: attr changes for EAD routes
Add ESI as an inline attribute field along with the other EVPN
attributes. This may be re-worked when the rest of the EVPN
attributes find a new home.

Some cleanup has been done to get rid of stale/unused references
to ESI. And also to consolidate duplicate definitions of ES ID
types.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-08-05 06:46:12 -07:00
Donald Sharp
f20ce998fb bgpd: Add bestpath-routes to neighbor command
Add the ability to list the bestpath-routes to the
`show bgp afi safi neighbor X` command.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-08-03 10:34:14 -04:00
Madhuri Kuruganti
ae2488324e bgpd: wide option
Signed-off-by: Madhuri Kuruganti <k.madhuri@samsung.com>
2020-07-23 19:18:11 +05:30
Donald Sharp
9bcb3eef54 bgp: rename bgp_node to bgp_dest
This is the bulk part extracted from "bgpd: Convert from `struct
bgp_node` to `struct bgp_dest`".  It should not result in any functional
change.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-06-23 17:32:52 +02:00
Naveen Thanikachalam
e7cbe5e599 bgpd: Force self-next-hop check in next-hop update.
Problem Description:
=====================
+--+                                            +--+
|R1|-(192.201.202.1)----iBGP----(192.201.202.2)-|R2|
+--+                                            +--+

Routes on R2:
=============
S>* 202.202.202.202/32 [1/0] via 192.201.78.1, ens256, 00:40:48
Where, the next-hop network, 192.201.78.0/24, is a directly connected network address.
C>* 192.201.78.0/24 is directly connected, ens256, 00:40:48

Configurations on R1:
=====================
!
router bgp 201
 bgp router-id 192.168.0.1
 neighbor 192.201.202.2 remote-as 201
!

Configurations on R2:
=====================
!
ip route 202.202.202.202/32 192.201.78.1
!
router bgp 201
 bgp router-id 192.168.0.2
 neighbor 192.201.202.1 remote-as 201
 !
 address-family ipv4 unicast
  redistribute static
 exit-address-family
!

Step-1:
=======
R1 receives the route 202.202.202.202/32 from R2.
R1 installs the route in its BGP RIB.

Step-2:
=======
On R1, a connected interface address is added.
The address is the same as the next-hop of the BGP route received from R2 (192.201.78.1).

Point of Failure:
=================
R1 resolves the BGP route even though the route's next-hop is its own connected address.
Even though this appears to be a misconfiguration it would still be better to safeguard the code against it.

Fix:
====
When BGP receives a connected route from Zebra, it processes the
routes for the next-hop update.
While doing so, BGP must ignore routes whose next-hop address matches
the address of the connected route for which Zebra sent the next-hop update
message.

Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com>
2020-04-11 07:26:33 -07:00
Sri Mohana Singamsetty
70ecc066e7
Merge pull request #6105 from vivek-cumulus/bgp_link_bandwidth_unequal_cost_multipath
Unequal cost multipath (a.ka. weighted ECMP) with BGP link-bandwidth
2020-04-05 11:41:42 -07:00
Quentin Young
49e5a4a0b8 bgpd: #if ENABLE_BGP_VNC -> #ifdef ENABLE_BGP_VNC
This macro is undefined if vnc is disabled, and while it defaults to 0,
this is still wrong and causes issues with -Werror

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-04-01 15:05:26 -04:00
vivek
b1875e656c bgpd: Additional options for generating link bandwidth
Implement the code to handle the other route-map options to generate
the link bandwidth, namely, to use the cumulative bandwidth or to
base this on the number of multipaths. In the latter case, a reference
bandwidth is internally chosen - the implementation uses a value of
1 Gbps.

These additional options mean that the prefix may need to be advertised
if there is a link bandwidth change, which is a new criteria. Define a
new path (change) flag to support this and implement the advertisement.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:   Don Slice <dslice@cumulusnetworks.com>
2020-03-30 20:12:31 -07:00
Donald Sharp
5f040085ba lib, bgpd: Another round of struct const prefix cleanup
Cleanup another set of functions that need to respect the
const'ness of a prefix.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-26 16:22:00 -04:00
Donald Sharp
26a3ffd60e bgpd, lib, ripngd: Add agg_node_get_prefix
Modify code to use lookup function agg_node_get_prefix()
as the abstraction layer.  When we rework bgp_node to
bgp_dest this will allow us to greatly limit the amount
of work needed to do that.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-24 07:51:41 -04:00
Donald Sharp
5a1ae2c237 bgpd: Rework code to use const struct prefix
Future work needs the ability to specify a
const struct prefix value.  Iterate into
bgp a bit to get this started.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-24 07:51:41 -04:00
Sri Mohana Singamsetty
865a8f8611
Merge pull request #6073 from donaldsharp/is_default
More `const struct prefix` work
2020-03-23 10:54:33 -07:00
Donald Sharp
b8685f9bea bgpd: Add some const struct prefix for a couple more functions
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-23 08:10:55 -04:00
Donald Sharp
bd494ec5ed bgpd: More const struct prefix work
Modify more code to use `const struct prefix` throughout
bgp.  This is all prep work for adding an accessor function
for bgp_node to get the prefix and reduce all the places that
code needs to be touched when we get that work done.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-22 14:50:46 -04:00
Donatas Abraitis
3dc339cdc2 bgpd: Convert lots of int type functions to bool/void
Some were converted to bool, where true/false status is needed.
Converted to void only those, where the return status was only false or true.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-03-21 14:59:18 +02:00
vivek
e34291b86a bgpd: Allow EVPN advertise route-map to modify attributes
Ensure that the EVPN advertise route-map is applied on a copy of the
original path_info and associated attribute, so that if the route-map
has SET clauses, they can operate properly. This closely follows
the model already in use in other route-map application code.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Don Slice <dslice@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-19 14:21:23 -07:00
Donatas Abraitis
229757f195 bgpd: Allow overriding ORIGIN for aggregate-address
Override ORIGIN attribute if defined.
E.g.: Cisco and Juniper set ORIGIN for aggregated address
to IGP which is not what rfc4271 says.

This enables the same behavior, optionally.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-13 11:07:40 +02:00
Donald Sharp
7f1ace03c7
Merge pull request #5653 from slankdev/slankdev-bgpd-support-prefix-sid-srv6-l3vpn
bgpd: additional Prefix-SID sub-types for supporting SRv6 l3vpn
2020-02-04 11:37:10 -05:00
bisdhdh
f009ff2697 bgpd: Adding Selection Deferral Timer handler changes.
* Selection Deferral Timer for Graceful Restart.
* Added selection deferral timer handling function.
* Route marking as selection defer when update message is received.
* Staggered processing of routes which are pending best selection.
* Fix for multi-path test case.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
2020-01-23 09:34:25 +05:30
Hiroki Shirokura
e496b42030 bgpd: prefix-sid srv6 l3vpn service tlv
bgpd already supports BGP Prefix-SID path attribute and
there are some sub-types of Prefix-SID path attribute.
This commits makes bgpd to support additional sub-types.
sub-Type-4 and sub-Type-5 for construct the VPNv4 SRv6 backend
with vpnv4-unicast address family.
This path attributes is already supported by Ciscos IOS-XR and NX-OS.

Prefix-SID sub-Type-4 and sub-Type-5 is defined on following
IETF-drafts.

Supports(A-part-of):
- https://tools.ietf.org/html/draft-dawra-idr-srv6-vpn-04
- https://tools.ietf.org/html/draft-dawra-idr-srv6-vpn-05

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
2020-01-15 18:20:35 +09:00
Chirag Shah
0ca1058096 bgpd: evpn pip handle svi ip route
By default announct Self Type-2 routes with
system IP as nexthop and system MAC as
nexthop.

An API to check type-2 is self route via
checking ipv4/ipv6 address from connected interfaces list.

An API to extract RMAC and nexthop for type-2
routes based on advertise-svi-ip knob is enabled.

When advertise-pip is enabled/disabled, trigger type-2
route update. For self type-2 routes to use
anycast or individual (rmac, nexthop) addresses.

Ticket:CM-26190
Reviewed By:
Testing Done:

Enable 'advertise-svi-ip' knob in bgp default instance.
the vrf instance svi ip is advertised with nexthop
as default instance router-id and RMAC as system MAC.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2019-11-22 07:53:32 -08:00
Donatas Abraitis
9ea364a21f bgpd: Remove trailing whitespaces from some header files
This is annoying when editing a file and saving the file. IDEs like
VSCode can automatically remove trailing whitespaces, hence it would be better
having a clean code before pushing other changes.

I step onto this not the first time.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-09-17 11:28:48 +03:00
Donatas Abraitis
20894f50bd bgpd: Apply route-map for aggregate-address command
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-08-28 16:45:21 +03:00
David Lamparter
4a11bf2c09 bgpd: add a hook before bgp_process()
BMP uses this to get notified about any changes to prefixes, at which
point it schedules its own processing to happen later.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-07-03 16:54:09 +02:00
vishaldhingra
36a206db61 bgpd : Support for exact-match in match clause for lcommunity
FRR has a provision to give exact-match in match clause for
standard community, but this option is missing for lcommunity.

Part 3 : show related changes for match clause

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
2019-06-19 04:42:48 -07:00
Donald Sharp
fdf81fa028 bgpd: Store reason why bestpath was choosen
Store in bgp_node the reason why we choose a particular
best path over another.  At this point we do not do
anything other than just store this data when we make
the decision.  Future commits will display it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-05-15 21:17:52 -04:00
Donald Sharp
f08b5ca0d9 bgpd: Switch data structure passing to route_vty_out_detail
Instead of just passing in the prefix, pass in the particular
bgp_node we are using.

This is setup for a future commit to use this data.
The long term goal is to collect data about why
a particular bgp_path_info was selected as best and
to display that reason.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-05-15 21:17:52 -04:00
Donatas Abraitis
513386b57f bgpd: Do not send UPDATE message with maximum-prefix
When using maximum-prefix and count is overflow BGP
sends UPDATE message:

Apr 15 20:45:06 exit1-debian-9 bgpd[9818]: 192.168.0.2 [Error] Error parsing NLRI
Apr 15 20:45:06 exit1-debian-9 bgpd[9818]: %NOTIFICATION: sent to neighbor 192.168.0.2 3/10 (UPDATE Message Error/Invalid Network Field) 0 bytes

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-04-24 14:51:06 +03:00
Donald Sharp
9591da2653 bgpd: Remove extra alloc function bgp_path_info_new
The bgp_path_info_new function whenever it was called
pretty much duplicated the info_make function call.  So
convert over to using it and remove the bgp_path_info_new
function so people are not tempted.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-06 20:10:52 -04:00
Sri Mohana Singamsetty
f05d888049
Merge pull request #3892 from vivek-cumulus/evpn_vrf_route_leak
Leaking of EVPN-based IPv4 and IPv6 routes between VRFs
2019-03-15 10:27:13 -07:00
Donald Sharp
3d47101da7
Merge pull request #3743 from NaveenThanikachalam/2990_New
bgpd: Address performance issues in BGP route aggregation.
2019-03-01 09:54:10 -05:00
Naveen Thanikachalam
e00d800877 bgpd: Code to handle BGP aggregate's as-path.
With this commit:
1) 'struct bgp_aggregate' is moved to bgp_route.h from bgp_route.c
2) Hashes to accommodate the as-path, communities, extended-communities and
   large-communities attributes of all the routes aggregated by an
   aggregate route is introduced in 'struct bgp_aggregate'.
3) Place-holders for the aggregate route's as-path, communities,
   extended-communities and large-communities attributes are introduced in
   'struct bgp_aggregate'.
4) The code to manage the as-path of the routes that are aggregatable under
   a configured aggregate-address is introduced.
5) The code to compute the aggregate-route's as-path is introduced.

Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com>
2019-02-28 20:22:30 -08:00
vivek
0a2f9ac170 bgpd: No nexthop tracking for EVPN-imported leaked routes
IPv4 or IPv6 unicast routes which are imported from EVPN routes
(type-2 or type-5) and installed in a BGP instance and then leaked
do not need any nexthop tracking, as any tracking should happen in
the source instance.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
2019-02-28 11:11:01 +00:00
Renato Westphal
dc94fe42a4 bgpd: add missing checks for vpnv6 nexthop lengths
A few code paths weren't handling the vpnv6 nexthop lenghts as
expected, which was leading to problems like imported vpnv6 routes
not being marked as valid when they should. Fix this.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-02-26 19:02:24 -03:00
Donatas Abraitis
9dac9fc80e bgpd: Implement RFC8212
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-02-17 23:17:00 +02:00
Philippe Guibert
ce3c06147c bgpd: display the list of iprules attached to a fs entry
the list of iprules is displayed in the 'show bgp ipv4 flowspec detail'
The list of iprules is displayed, only if it is installed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2019-01-29 14:15:10 +01:00