Got it

display bgp routing-table

Created: Feb 27, 2021 14:30:39Latest reply: Feb 27, 2021 14:36:22 509 1 0 0 0
  Rewarded HiCoins: 0 (problem resolved)

Hello,

What's the difference about 3 parameters in 'display bgp routing-table peer x.x.x.x { received-routes [ active ] | accepted-routes }'?

In other words, what's the difference between the following 3 commands?

display bgp routing-table peer x.x.x.x received-routes

display bgp routing-table peer x.x.x.x received-routes active

display bgp routing-table peer x.x.x.x accepted-routes

Featured Answers
Popeye_Wang
Admin Created Feb 27, 2021 14:36:22

Hello,

According to the meaning of the word we can know:

display bgp routing-table peer x.x.x.x received-routes means the routes received from peer x.x.x.x.

display bgp routing-table peer x.x.x.x received-routes active means routes which received from peer x.x.x.x and be selected as the best route.
Note: This 'active' means the route is selected as the best route in BGP routing-table, not means the route can be active state in IP routing-table.
display bgp routing-table peer x.x.x.x accepted-routes means the routes which can match the inbound filter of peer x.x.x.x. The filter include all the configuration which could filter the routes, such as route-policy, ip-prefix, filter-policy, as-path-filter, etc.

We know the routes which cannot match the inbound filter will be dropped, acturally we cannot see them in routing-table. So, what's the difference between 'received routes' and  'accepted-routes".

The difference will be shown when the peer configure 'peer x.x.x.x keep-all-routes'.

Firstly, introduce the function of 'keep-all-routes'.
In the early stage, BGP does not support refresh capability. If change the inbound filter and want remote peer re-advertise routes again, there is no way to do it but down / up the peer.
But, rebuild the peer session will cause service interruption. So, the peer can use 'keep-all-routes'.
After configure 'peer x.x.x.x keep-all-routes', when all the received routes from the peer will be reserved, no matter the routes can match the filter or not. The routes which cannot match the filter will not have 'valid' sign.
When modify the inbound filter, BGP can re-filter all the reserved routes, need not request remote peer.


In this condition, when the peer configures 'keep-all-routes', 'received-routes' means all the received routes, 'accepted-routes' just means the routes which can match the inbound filter.


For example,

peer 12.1.1.2 configured keep-all-routes.

There are 5 routes received from peer 12.1.1.2.

Among them, 123.1.1.1/32, 123.1.1.2/32, 123.1.1.3/32 can not match the inbound filter, they do not have 'valid' sign (*).

123.1.1.4/32 and 123.1.1.5/32 can match the inbound filter.

<Huawei>display bgp routing-table


BGP Local router ID is 1.1.1.1

Status codes: * - valid, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? - incomplete



Total Number of Routes: 7

      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn


*>i  123.1.1.1/32       13.1.1.3        0          100        0      ?

   i                     12.1.1.2        0          100        0      ?

   i  123.1.1.2/32       12.1.1.2        0          100        0      ?

   i  123.1.1.3/32       12.1.1.2        0          100        0      123i

*>i  123.1.1.4/32       12.1.1.2        0          100        0      ?

*>i  123.1.1.5/32       13.1.1.3        0          110        0      i

* i                     12.1.1.2        0          100        0      ?


Check 'display bgp routing-table peer 12.1.1.2 received-routes', all 5 routes can be seen.

<Huawei>display bgp rou peer 12.1.1.2 received-routes


BGP Local router ID is 1.1.1.1

Status codes: * - valid, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? - incomplete



Total Number of Routes: 5

      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn


   i  123.1.1.1/32       12.1.1.2        0          100        0      ?

   i  123.1.1.2/32       12.1.1.2        0          100        0      ?

   i  123.1.1.3/32       12.1.1.2        0          100        0      123i

*>i  123.1.1.4/32       12.1.1.2        0          100        0      ?

* i  123.1.1.5/32       12.1.1.2        0          100        0      ?


Check 'display bgp routing-table peer 12.1.1.2 accepted-routes', it can show only the 2 routes which can match the filter.

<Huawei>display bgp rou peer 12.1.1.2 accepted-routes


BGP Local router ID is 1.1.1.1

Status codes: * - valid, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? - incomplete



Total Number of Routes: 2

      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn


*>i  123.1.1.4/32       12.1.1.2        0          100        0      ?

* i  123.1.1.5/32       12.1.1.2        0          100        0      ?


Check 'display bgp routing-table peer 12.1.1.2 received-routes active'.

Because another route 123.1.1.5/32 from peer 13.1.1.3 is the best route, route 123.1.1.5/32 from peer 12.1.1.2 is not the best route, so cannot be seen in 'received-routes active' .

<Huawei>display bgp rou peer 12.1.1.2 received-routes active


BGP Local router ID is 1.1.1.1

Status codes: * - valid, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? - incomplete



Total Number of Routes: 1

      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn


*>i  123.1.1.4/32       12.1.1.2        0          100        0      ?

View more
  • x
  • convention:

All Answers

Hello,

According to the meaning of the word we can know:

display bgp routing-table peer x.x.x.x received-routes means the routes received from peer x.x.x.x.

display bgp routing-table peer x.x.x.x received-routes active means routes which received from peer x.x.x.x and be selected as the best route.
Note: This 'active' means the route is selected as the best route in BGP routing-table, not means the route can be active state in IP routing-table.
display bgp routing-table peer x.x.x.x accepted-routes means the routes which can match the inbound filter of peer x.x.x.x. The filter include all the configuration which could filter the routes, such as route-policy, ip-prefix, filter-policy, as-path-filter, etc.

We know the routes which cannot match the inbound filter will be dropped, acturally we cannot see them in routing-table. So, what's the difference between 'received routes' and  'accepted-routes".

The difference will be shown when the peer configure 'peer x.x.x.x keep-all-routes'.

Firstly, introduce the function of 'keep-all-routes'.
In the early stage, BGP does not support refresh capability. If change the inbound filter and want remote peer re-advertise routes again, there is no way to do it but down / up the peer.
But, rebuild the peer session will cause service interruption. So, the peer can use 'keep-all-routes'.
After configure 'peer x.x.x.x keep-all-routes', when all the received routes from the peer will be reserved, no matter the routes can match the filter or not. The routes which cannot match the filter will not have 'valid' sign.
When modify the inbound filter, BGP can re-filter all the reserved routes, need not request remote peer.


In this condition, when the peer configures 'keep-all-routes', 'received-routes' means all the received routes, 'accepted-routes' just means the routes which can match the inbound filter.


For example,

peer 12.1.1.2 configured keep-all-routes.

There are 5 routes received from peer 12.1.1.2.

Among them, 123.1.1.1/32, 123.1.1.2/32, 123.1.1.3/32 can not match the inbound filter, they do not have 'valid' sign (*).

123.1.1.4/32 and 123.1.1.5/32 can match the inbound filter.

<Huawei>display bgp routing-table


BGP Local router ID is 1.1.1.1

Status codes: * - valid, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? - incomplete



Total Number of Routes: 7

      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn


*>i  123.1.1.1/32       13.1.1.3        0          100        0      ?

   i                     12.1.1.2        0          100        0      ?

   i  123.1.1.2/32       12.1.1.2        0          100        0      ?

   i  123.1.1.3/32       12.1.1.2        0          100        0      123i

*>i  123.1.1.4/32       12.1.1.2        0          100        0      ?

*>i  123.1.1.5/32       13.1.1.3        0          110        0      i

* i                     12.1.1.2        0          100        0      ?


Check 'display bgp routing-table peer 12.1.1.2 received-routes', all 5 routes can be seen.

<Huawei>display bgp rou peer 12.1.1.2 received-routes


BGP Local router ID is 1.1.1.1

Status codes: * - valid, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? - incomplete



Total Number of Routes: 5

      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn


   i  123.1.1.1/32       12.1.1.2        0          100        0      ?

   i  123.1.1.2/32       12.1.1.2        0          100        0      ?

   i  123.1.1.3/32       12.1.1.2        0          100        0      123i

*>i  123.1.1.4/32       12.1.1.2        0          100        0      ?

* i  123.1.1.5/32       12.1.1.2        0          100        0      ?


Check 'display bgp routing-table peer 12.1.1.2 accepted-routes', it can show only the 2 routes which can match the filter.

<Huawei>display bgp rou peer 12.1.1.2 accepted-routes


BGP Local router ID is 1.1.1.1

Status codes: * - valid, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? - incomplete



Total Number of Routes: 2

      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn


*>i  123.1.1.4/32       12.1.1.2        0          100        0      ?

* i  123.1.1.5/32       12.1.1.2        0          100        0      ?


Check 'display bgp routing-table peer 12.1.1.2 received-routes active'.

Because another route 123.1.1.5/32 from peer 13.1.1.3 is the best route, route 123.1.1.5/32 from peer 12.1.1.2 is not the best route, so cannot be seen in 'received-routes active' .

<Huawei>display bgp rou peer 12.1.1.2 received-routes active


BGP Local router ID is 1.1.1.1

Status codes: * - valid, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? - incomplete



Total Number of Routes: 1

      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn


*>i  123.1.1.4/32       12.1.1.2        0          100        0      ?

View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.