7.27 BGP Bestpath Selection - Maximum AS Limit
• Remove the previous section’s configurations.
• Configure the routers in AS 100 to accept only the prefixes originated from directly connected ASes.
• Do not use filtering based on AP-PATH access-lists to accomplish this.
Note
BGP process will generate log message for prefixes that exceed the configured limit, similar to the message below:
%BGP-6-ASPATH: Long AS path 200 254 received from 155.1.146.1: More than configured MAXAS-LIMIT
In our scenario we configure R1, R4 and R6 to accept only the prefixes with only one AS element in the AS_PATH attribute. This limits prefixes accept to just directly attached systems – AS 54, AS 100 and AS 200. For example, due to this filtering, A 100 will no be able to receive prefixes from AS 254.
Configuration
R1, R4 & R6:
router bgp 100
bgp maxas-limit 1
----------------------------
最後的結果是R1, R4 , R6都只能學習到鄰近的AS所產生的路由
Rack1R1#
*Mar 2 23:24:45.688: %BGP-6-ASPATH: Long AS path 200 100 received from 155.1.13.3: More than configured MAXAS-LIMIT
Rack1R1#show ip bgp
BGP table version is 198, 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
* i28.119.16.0/24 54.1.1.254 0 100 0 54 i
*>i 204.12.1.254 0 100 0 54 i
* i28.119.17.0/24 54.1.1.254 0 100 0 54 i
*>i 204.12.1.254 0 100 0 54 i
* i114.0.0.0 54.1.1.254 0 100 0 54 i
*>i 204.12.1.254 0 100 0 54 i
* i115.0.0.0 54.1.1.254 0 100 0 54 i
*>i 204.12.1.254 0 100 0 54 i
* i116.0.0.0 54.1.1.254 0 100 0 54 i
*>i 204.12.1.254 0 100 0 54 i
* i117.0.0.0 54.1.1.254 0 100 0 54 i
*>i 204.12.1.254 0 100 0 54 i
* i118.0.0.0 54.1.1.254 0 100 0 54 i
*>i 204.12.1.254 0 100 0 54 i
* i119.0.0.0 54.1.1.254 0 100 0 54 i
*>i 204.12.1.254 0 100 0 54 i
* i155.1.0.0 155.1.146.6 0 100 0 i
*>i 155.1.146.4 0 100 0 i
* i192.10.1.0 155.1.45.5 0 100 0 200 i
*> 155.1.13.3 0 200 i
Rack1R1#
Rack1R4#
*Mar 2 23:24:35.628: %BGP-6-ASPATH: Long AS path 200 254 received from 155.1.45.5: More than configured MAXAS-LIMIT
Rack1R4#show ip bgp
BGP table version is 69, 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
*> 28.119.16.0/24 204.12.1.254 0 0 54 i
*> 28.119.17.0/24 204.12.1.254 0 0 54 i
*> 114.0.0.0 204.12.1.254 0 54 i
*> 115.0.0.0 204.12.1.254 0 54 i
*> 116.0.0.0 204.12.1.254 0 54 i
*> 117.0.0.0 204.12.1.254 0 54 i
*> 118.0.0.0 204.12.1.254 0 54 i
*> 119.0.0.0 204.12.1.254 0 54 i
*> 155.1.0.0 0.0.0.0 32768 i
s> 155.1.146.0/24 0.0.0.0 0 32768 i
*> 192.10.1.0 155.1.45.5 0 200 i
* i 155.1.13.3 0 100 0 200 i
Rack1R4#
Rack1R6#
*Mar 2 23:24:45.488: %BGP-6-ASPATH: Long AS path 200 254 received from 155.1.146.1: More than configured MAXAS-LIMIT
Rack1R6#
Rack1R6#show ip bgp
BGP table version is 64, local router ID is 150.1.6.6
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
* i28.119.16.0/24 204.12.1.254 0 100 0 54 i
*> 54.1.1.254 0 54 i
* i28.119.17.0/24 204.12.1.254 0 100 0 54 i
*> 54.1.1.254 0 54 i
* i114.0.0.0 204.12.1.254 0 100 0 54 i
*> 54.1.1.254 0 0 54 i
* i115.0.0.0 204.12.1.254 0 100 0 54 i
*> 54.1.1.254 0 0 54 i
* i116.0.0.0 204.12.1.254 0 100 0 54 i
*> 54.1.1.254 0 0 54 i
* i117.0.0.0 204.12.1.254 0 100 0 54 i
*> 54.1.1.254 0 0 54 i
* i118.0.0.0 204.12.1.254 0 100 0 54 i
*> 54.1.1.254 0 0 54 i
* i119.0.0.0 204.12.1.254 0 100 0 54 i
*> 54.1.1.254 0 0 54 i
*> 155.1.0.0 0.0.0.0 32768 i
* i 155.1.146.4 0 100 0 i
s> 155.1.146.0/24 0.0.0.0 0 32768 i
*>i192.10.1.0 155.1.13.3 0 100 0 200 i
Rack1R6#
沒有留言:
張貼留言