
Cisco dual BGP with Community string (Redundancy)
|
|
[Traffic flow]
[CPE/Customer Cisco Router]
Current configuration:
!
version 12.x
!
hostname CPE
!
interface Ethernet0
description to Internal network
ip address 10.1.0.1 255.255.255.0ip address 10.1.0.129 255.255.255.128 secondary
no ip directed-broadcast
no ip mroute-cache
!
interface Serial0
description to ISP A – WAN 1
ip address 12.1.3.1 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
no fair-queue
!
interface Serial1
description to ISP A – WAN 2ip address 12.1.4.1 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
no fair-queue
!
router bgp 10
no auto-summarynetwork 10.1.0.0 mask 255.255.255.0neighbor 12.1.3.2 remote-as 20
neighbor 12.1.3.2 version 4neighbor 12.1.3.2 weight 1000
neighbor 12.1.3.2 filter-list 10 out <– To prevent announcing routes that is learning from other link or ISPneighbor 12.1.4.2 remote-as 20
neighbor 12.1.4.2 version 4neighbor 12.1.4.2 send-communityneighbor 12.1.3.2 filter-list 10 out <– To prevent announcing routes that is learning from other link or ISP
neighbor 12.1.4.2 route-map outbound out!
ip classless
!ip as-path access-list 10 permit ^$!route-map outbound permit 10set community 20:80!
!
line con 0
line aux 0
line vty 0 4
login
!
end
[PE1 / ISP Cisco Router]
Current configuration:
!
version 12.x
!
hostname PE!
!
interface Serial0
description to WAN 1
ip address 12.1.3.2 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
no fair-queue
!
router bgp 20
no auto-summary
neighbor 12.1.3.1 remote-as 10
neighbor 12.1.3.1 version 4
neighbor 12.1.3.1 default-originate <—to send a default route
neighbor 12.1.3.1 distribute-list 2 outneighbor 12.1.3.1 route-map customer in
!ip community-list 1 permit 20:1ip community-list 2 permit 20:2ip community-list 3 permit 20:3ip community-list 4 permit 20:80ip community-list 4 permit 20:120!ip classless
!access-list 2 permit 100.100.100.0 0.0.0.255access-list 2 permit 200.200.200.0 0.0.0.255!route-map customer permit 10
match community 1
set as-path prepend 20
!
route-map customer permit 20
match community 2
set as-path prepend 20 20
!
route-map customer permit 30
match community 3
set as-path prepend 20 20 20
!
route-map customer permit 40
match community 4
set local-preference 80
!
route-map customer permit 50
match community 5
set local-preference 120
!
route-map customer permit 60!line con 0
line aux 0
line vty 0 4
login
!
end
!
version 12.x
!
hostname PE
!
interface Serial1
description to WAN 2
no ip mroute-cache
no ip directed-broadcast
no fair-queue
!
no auto-summary
neighbor 12.1.4.1 remote-as 10
neighbor 12.1.4.1 version 4
neighbor 12.1.4.1 default-originate <—to send a default route
!
ip classless
!
!
match community 1
set as-path prepend 20
!
route-map customer permit 20
match community 2
set as-path prepend 20 20
!
route-map customer permit 30
match community 3
set as-path prepend 20 20 20
!
route-map customer permit 40
match community 4
set local-preference 80
!
route-map customer permit 50
match community 5
set local-preference 120
!
route-map customer permit 60
!
line con 0
line aux 0
line vty 0 4
login
!
end
[Verifing output]
CPE# show ip bgp neighbors 12.1.3.2 ad
BGP table version is 6, local router ID is 1.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, ? – incompleteNetwork Next Hop Metric LocPrf Weight Path
*> 10.1.0.0/24 0.0.0.0 0 32768 iTotal number of prefixes 1
CPE#
CPE# show ip bgp neighbors 12.1.4.2 ad
BGP table version is 6, local router ID is 1.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, ? – incompleteNetwork Next Hop Metric LocPrf Weight Path
*> 10.1.0.0/24 0.0.0.0 0 32768 iTotal number of prefixes 1
CPE#CPE# show ip bgp neighbors 12.1.3.2 ro
BGP table version is 6, local router ID is 1.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, ? – incompleteNetwork Next Hop Metric LocPrf Weight Path
r> 0.0.0.0 12.1.3.2 0 1000 20 i
*> 100.100.100.0/24 12.1.3.2 1000 20 ?
*> 200.200.200.0 12.1.3.2 1000 20 ?Total number of prefixes 3
CPE#CPE# show ip bgp neighbors 12.1.4.2 ro
BGP table version is 6, local router ID is 1.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, ? – incompleteNetwork Next Hop Metric LocPrf Weight Path
r 0.0.0.0 12.1.4.2 0 0 20 i
* 100.100.100.0/24 12.1.4.2 0 20 ?
* 200.200.200.0 12.1.4.2 0 20 ?Total number of prefixes 3
CPE#
PE1#show ip bgp nei 12.1.3.1 ro
BGP table version is 70, local router ID is 3.3.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, ? – incompleteNetwork Next Hop Metric LocPrf Weight Path
*> 10.1.0.0/24 12.1.3.1 0 0 10 iTotal number of prefixes 1
PE1#PE2#show ip bgp nei 12.1.4.1 ro
BGP table version is 116, local router ID is 4.4.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, ? – incompleteNetwork Next Hop Metric LocPrf Weight Path
*> 10.1.0.0/24 12.1.4.1 0 80 0 10 iTotal number of prefixes 1
PE2#
PE1#show ip bgp nei 12.1.3.1 ad
BGP table version is 58, local router ID is 3.3.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, ? – incompleteOriginating default network 0.0.0.0
Network Next Hop Metric LocPrf Weight Path
*>i100.100.100.0/24 5.5.5.5 0 100 0 ?
*>i200.200.200.0 5.5.5.5 0 100 0 ?Total number of prefixes 2
PE1#PE2#show ip bgp nei 12.1.4.1 ad
BGP table version is 90, local router ID is 4.4.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, ? – incompleteOriginating default network 0.0.0.0
Network Next Hop Metric LocPrf Weight Path
*>i100.100.100.0/24 5.5.5.5 0 100 0 ?
*>i200.200.200.0 5.5.5.5 0 100 0 ?Total number of prefixes 2
PE2#Internet#traceroute 10.1.0.1
Type escape sequence to abort.
Tracing the route to 10.1.0.11 PE1 (20.3.5.1) 20 msec 28 msec 28 msec
2 CPE (12.1.3.1) 56 msec * 64 msecInternet#traceroute 10.1.0.129
Type escape sequence to abort.
Tracing the route to 10.1.0.1291 PE1 (20.3.5.1) 20 msec 28 msec 28 msec
2 CPE (12.1.3.1) 52 msec * 52 msec
If you have any questions, feel free to send email us at [email protected]. If you are looking for professional grade service, you might want to try our "BGP experts service". What is "BGP Experts service"? Click "BGP Experts" from the top menu option. You will find out what the "BGP Experts" and what we are doing here for.
Recent Comments