Closed hydro-b closed 4 years ago
@hydro-b sorry, don't understand your question. The summary gives the output about the global scope, not per neighbor. Or what do you mean actually?
When the AS is replaced (see config example earlier), it should show the correct "local AS number", now it shows AS 65101 for both instances, which is technically not correct, right?
show bgp summary
IPv4 Unicast Summary:
BGP router identifier $router-id, local AS number 65101 vrf-id 0
BGP table version 87
RIB entries 99, using 19 KiB of memory
Peers 2, using 43 KiB of memory
Peer groups 2, using 128 bytes of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
neighbour-ip1 4 65121 1783 1456 0 0 0 1d00h11m 50
neighbour-ip2 4 65121 1790 1456 0 0 0 1d00h11m 50
Total number of neighbors 2
L2VPN EVPN Summary:
BGP router identifier $router-id, local AS number 65101 vrf-id 0
BGP table version 0
RIB entries 3663, using 687 KiB of memory
Peers 2, using 43 KiB of memory
Peer groups 2, using 128 bytes of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
neighbour-ip1 4 65101 85443 1458 0 0 0 1d00h11m 13344
neighbour-ip2 4 65101 85456 1458 0 0 0 1d00h11m 13344
Total number of neighbors 2
It shows exactly what you have under router bgp 65101
.
The "local-as 65301 no-prepend replace-as" statement removes the local AS, and replaces it with another AS number. The eBGP peer needs to peer with the replaced AS number and not the original AS.
Following this reasoning, there is a session with "65301" and not "65101".
A show bgp neighbors
does show this difference:
BGP neighbor is neighbour-ip1, remote AS 65121, local AS 65301 no-prepend replace-as, external link
Imagine you have a config like this:
router bgp 65000
neighbor leafs-1 local-as 65001 no-prepend replace-as
neighbor leafs-2 local-as 65002 no-prepend replace-as
neighbor leafs-3 local-as 65003 no-prepend replace-as
which AS number should be printed in BGP summary?
I would suggest the summary shows neighbors per local-as. So three in your example.
Could you show the output how do you imagine that?
If you want to keep it comparable to the current output you could do like this:
IPv4 Unicast Summary:
BGP router identifier $router-id, local AS number 65001 vrf-id 0
BGP table version 51
RIB entries 99, using 19 KiB of memory
Peers 2, using 43 KiB of memory
Peer groups 2, using 128 bytes of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
neighbour-ip1 4 65121 1543 1294 0 0 0 21:29:21 50
neighbour-ip2 4 65121 1538 1294 0 0 0 21:29:21 50
Total number of neighbors 2
BGP router identifier $router-id, local AS number 65002 vrf-id 0
BGP table version 51
RIB entries 99, using 19 KiB of memory
Peers 2, using 43 KiB of memory
Peer groups 2, using 128 bytes of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
neighbour-ip1 4 65121 1543 1294 0 0 0 21:29:21 50
neighbour-ip2 4 65121 1538 1294 0 0 0 21:29:21 50
BGP router identifier $router-id, local AS number 65003 vrf-id 0
BGP table version 51
RIB entries 99, using 19 KiB of memory
Peers 2, using 43 KiB of memory
Peer groups 2, using 128 bytes of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
neighbour-ip1 4 65121 1543 1294 0 0 0 21:29:21 50
neighbour-ip2 4 65121 1538 1294 0 0 0 21:29:21 50
Sorry, but no, that's not the way to go.
@polychaeta autoclose in 1 day.
show bgp summary shows incorrect local AS number in " IPv4 Unicast Summary" when "local-as $ASN-2 no-prepend replace-as" rule is used in a "router bgp $ASN-1" section.
example:
Will give the following output:
Instead of:
Behaviour as seen on FRRouting: version 7.4-dev-20200410-00-g4aa0f5cb1 (compiled from source)