2013/11/15

WB1 7.21 BGP Bestpath Selection - Origin

7.21 BGP Bestpath Selection - Origin
• Remove the BGP configuration made for the previous task.
• Using the Origin attribute configure AS 200 so that traffic from AS 100 going to AS 254 enters via the link between R4 and R5.


Note

If BGP prefixes have equal weight, local preference and AS_PATH length, then the bestpath selection process compares routes Origin. This attribute is wellknown and mandatory and is set by the prefix originator. The allowed values are the following:
1) “IGP”, meaning the route was originated using the network or aggregateaddress command. It appears as “i” in BGP table output.
2) “EGP”, meaning the prefix was received from an EGP peer (legacy). You won’t probably see this Origin value in any modern router.
3) “Incomplete” meaning the source could not be determined. This Origin is assigned to the prefixes redistributed into BGP.


This attribute is rarely used to influence the path selection, due to its inflexibility. Nevertheless BGP always account for this step. Origin “IGP” is preferred over “EGP” and the latter is preferred over “Incomplete”. This represents the level of “trust” that BGP assigns to various information sources.

In this task we configure the borders routers in AS 200 (R3 and R5) to impose different Origin attribute on the links between R1, R3 and R4, R5. The prefixes advertised to R1 have the Origin value or “Incomplete” while the prefixes advertised to R4 have the Origin value of “IGP”.

Configuration

R3:
router bgp 200
 no synchronization
 neighbor 155.1.0.5 remote-as 200
 neighbor 155.1.13.1 remote-as 100
 neighbor 155.1.13.1 route-map TO_R1 out
 neighbor 155.1.23.2 remote-as 200
 neighbor 155.1.23.2 route-reflector-client
 neighbor 155.1.37.7 remote-as 300
 neighbor 155.1.58.8 remote-as 200
 neighbor 155.1.58.8 route-reflector-client
 neighbor 155.1.108.10 remote-as 200
 neighbor 155.1.108.10 route-reflector-client
 no auto-summary
!
ip as-path access-list 254 permit _254$
!
route-map TO_R1 permit 10
 match as-path 254
 set origin incomplete
!
route-map TO_R1 permit 100
!


R5:
router bgp 200
 no synchronization
 neighbor 155.1.0.2 remote-as 200
 neighbor 155.1.0.2 route-reflector-client
 neighbor 155.1.23.3 remote-as 200
 neighbor 155.1.45.4 remote-as 100
 neighbor 155.1.45.4 route-map TO_R4 out
 neighbor 155.1.58.8 remote-as 200
 neighbor 155.1.58.8 route-reflector-client
 neighbor 155.1.108.10 remote-as 200
 neighbor 155.1.108.10 route-reflector-client
 no auto-summary
!
ip as-path access-list 254 permit _254$
!
route-map TO_R4 permit 10
 match as-path 254
 set origin igp
!
route-map TO_R4 permit 100
!


------------------------------------------

R1與R4變更前、變更後

Rack1R1#show ip bgp regexp _254$
BGP table version is 61, local router ID is 150.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
* i205.90.31.0      155.1.45.5               0    100      0 200 254 ?
*>                  155.1.13.3                             0 200 254 ?
* i220.20.3.0       155.1.45.5               0    100      0 200 254 ?
*>                  155.1.13.3                             0 200 254 ?
* i222.22.2.0       155.1.45.5               0    100      0 200 254 ?
*>                  155.1.13.3                             0 200 254 ?
Rack1R1#show ip bgp regexp _254$
BGP table version is 64, local router ID is 150.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i205.90.31.0      155.1.45.5               0    100      0 200 254 i
*                   155.1.13.3                             0 200 254 ?
*>i220.20.3.0       155.1.45.5               0    100      0 200 254 i
*                   155.1.13.3                             0 200 254 ?
*>i222.22.2.0       155.1.45.5               0    100      0 200 254 i
*                   155.1.13.3                             0 200 254 ?
Rack1R1#



Rack1R4#show ip bgp regexp _254$
BGP table version is 55, local router ID is 150.1.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
* i205.90.31.0      155.1.13.3               0    100      0 200 254 ?
*>                  155.1.45.5                             0 200 254 ?

* i220.20.3.0       155.1.13.3               0    100      0 200 254 ?
*>                  155.1.45.5                             0 200 254 ?
* i222.22.2.0       155.1.13.3               0    100      0 200 254 ?
*>                  155.1.45.5                             0 200 254 ?
Rack1R4#
Rack1R4#show ip bgp regexp _254$
BGP table version is 66, local router ID is 150.1.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 205.90.31.0      155.1.45.5                             0 200 254 i
*> 220.20.3.0       155.1.45.5                             0 200 254 i
*> 222.22.2.0       155.1.45.5                             0 200 254 i

Rack1R4#

沒有留言:

張貼留言