- Configure AS100 to signal AS200 to prefer path to the prefixes originated in AS 60 via R3.
configuration:
R1:
ip as-path access-list 1 permit 60$
!
route-map SET_COMMUNITY permit 10
match as-path 1
set community 200:200
!
route-map SET_COMMUNITY permit 100
router bgp 100
neighbor 155.1.13.3 send-community
neighbor 155.1.13.3 route-map SET_COMMUNITY out
ip as-path access-list 1 permit 60$
!
route-map SET_COMMUNITY permit 10
match as-path 1
set community 200:200
!
route-map SET_COMMUNITY permit 100
router bgp 100
neighbor 155.1.13.3 send-community
neighbor 155.1.13.3 route-map SET_COMMUNITY out
R3:
ip community-list standard 200:200 permit 200:200
ip community-list standard 200:200 permit 200:200
ip bgp-community new-format
!
route-map SET_LOCAL_PREFERENCE permit 10
match community 200:200
set local-preference 200
!
route-map SET_LOCAL_PREFERENCE permit 10
match community 200:200
set local-preference 200
!
route-map SET_LOCAL_PREFERENCE permit 100
!
router bgp 200
neighbor 155.1.13.1 route-map SET_LOCAL_PREFERENCE in
route-map SET_LOCAL_PREFERENCE permit 100
!
router bgp 200
neighbor 155.1.13.1 route-map SET_LOCAL_PREFERENCE in
R5:
ip community-list standard 200:200 permit 200:200
!
route-map SET_LOCAL_PREFERENCE permit 10
match community 200:200
set local-preference 200
!
route-map SET_LOCAL_PREFERENCE permit 100
!
router bgp 200
neighbor 155.1.45.4 route-map SET_LOCAL_PREFERENCE in
verfication:
Rack1R3#show ip bgp regexp 60$
BGP table version is 39, local router ID is 150.1.3.3
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
*> 112.0.0.0 155.1.13.1 200 0 100 54 50 60 i
* 155.1.37.7 0 300 100 54 50 60 i
*> 113.0.0.0 155.1.13.1 200 0 100 54 50 60 i
* 155.1.37.7 0 300 100 54 50 60 i
BGP table version is 39, local router ID is 150.1.3.3
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
*> 112.0.0.0 155.1.13.1 200 0 100 54 50 60 i
* 155.1.37.7 0 300 100 54 50 60 i
*> 113.0.0.0 155.1.13.1 200 0 100 54 50 60 i
* 155.1.37.7 0 300 100 54 50 60 i
Rack1R3#show ip bgp 113.0.0.0
BGP routing table entry for 113.0.0.0/8, version 31
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Flag: 0x9C0
Advertised to update-groups:
1 2 4
100 54 50 60
155.1.13.1 from 155.1.13.1 (150.1.1.1)
Origin IGP, localpref 200, valid, external, best
Community: 200:200
300 100 54 50 60
155.1.37.7 from 155.1.37.7 (150.1.77.77)
Origin IGP, localpref 100, valid, external
BGP routing table entry for 113.0.0.0/8, version 31
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Flag: 0x9C0
Advertised to update-groups:
1 2 4
100 54 50 60
155.1.13.1 from 155.1.13.1 (150.1.1.1)
Origin IGP, localpref 200, valid, external, best
Community: 200:200
300 100 54 50 60
155.1.37.7 from 155.1.37.7 (150.1.77.77)
Origin IGP, localpref 100, valid, external
BGP routing table entry for 113.0.0.0/8, version 34
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Flag: 0x940
Advertised to update-groups:
1 3
100 54 50 60
155.1.13.1 (metric 2681856) from 155.1.23.3 (150.1.3.3)
Origin IGP, metric 0, localpref 200, valid, internal, best
100 54 50 60
155.1.45.4 from 155.1.45.4 (150.1.4.4)
Origin IGP, localpref 100, valid, external
No comments:
Post a Comment