3-1-1. Cisco dual BGP with Metric (Redundancy)

BGP sample configuration 3-1-1

Cisco dual BGP with Metric (Redundancy)

   
  • ISPs : 1
  • WAN links : 2
  • CPE : 1
  • PE : 2
  • Device : Cisco router with LAN/WAN ports.
  • WAN1 / Serial IP : 12.1.3.0/30 (mask 255.255.255.252)
  • WAN2 / Serial IP : 12.1.4.0/30 (mask 255.255.255.252)
  • Destination IP : 100.100.100.100 
  • LAN / Ethernet IP : 10.1.0.1/24 and 10.1.0.129/25(Secondary)
  • Receiving Route : Default route + full route from ISP
  • Memory : Full route(recommend 512M), partial route
    (recommend 128-256M)
  • LAN : ISP (AS20) and Customer (AS10)

 

BGP sample configuration 3-1-1

[Traffic flow]

Outbound traffic on CPE
All outbound traffic will go out thru primary line(12.1.3.1) due to route-map shadow_inbound tag local-pref 80 on default route from bgp peer(12.1.4.2)
 
Inbound traffic  on CPE
All inbound traffic will come in thru primary line (12.1.3.1) due to route-map shadow_outbound tag metric 200 on announced IP route.

[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.0
ip 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 2
ip 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-summary
network 10.1.0.0 mask 255.255.255.0
neighbor 12.1.3.2 remote-as 20
neighbor 12.1.3.2 version 4
neighbor
12.1.4.2 remote-as 20
neighbor 12.1.4.2 version 4
neighbor 12.1.4.2 prefix-list 1 out
neighbor 12.1.4.2 route-map shadow_inbound in
neighbor 12.1.4.2 route-map shadow_outbound out
!
ip classless
!
ip prefix-list 1 seq 5 permit 10.1.0.0/24 le 32
 

!
route-map shadow_inbound permit 10

 

set local-preference 80

 

!

 

route-map shadow_outbound permit 10

set metric 200
!
!
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 out
!
ip classless
!
access-list 2 permit 100.100.100.0 0.0.0.255
line con 0
line aux 0
line vty 0 4
login
!
end
[PE2 / ISP Cisco Router]
Current configuration:
!
version 12.x
!
hostname PE
!
!
interface Serial1
description to WAN 2
ip address 12.1.4.2 255.255.255.252
no ip mroute-cache
no ip directed-broadcast
no fair-queue
!
 

router bgp 20
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

neighbor 12.1.4.1 distribute-list 2 out
!
ip classless
!
access-list 2 permit 100.100.100.0 0.0.0.255
!
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 4, 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, ? – incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.1.0.0/24      0.0.0.0                  0         32768 i

Total number of prefixes 1
CPE#

CPE# show ip bgp neighbors 12.1.4.2 ad
BGP table version is 4, 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, ? – incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.1.0.0/24      0.0.0.0                  0         32768 i

Total number of prefixes 1
CPE#

CPE# show ip bgp neighbors 12.1.3.2 ro
BGP table version is 4, 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, ? – incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 0.0.0.0          12.1.3.2                 0             0 20 i
*> 100.100.100.0/24 12.1.3.2                               0 20 ?

Total number of prefixes 2
CPE#

CPE# show ip bgp neighbors 12.1.4.2 ro
BGP table version is 4, 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, ? – incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*  0.0.0.0          12.1.4.2                 0     80      0 20 i
*  100.100.100.0/24 12.1.4.2                       80      0 20 ?

Total number of prefixes 2
CPE#

PE1#show ip bgp nei 12.1.3.1 ro
BGP table version is 33, 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, ? – incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.1.0.0/24      12.1.3.1                 0             0 10 i

Total number of prefixes 1
PE1#

PE2#show ip bgp nei 12.1.4.1 ro
BGP table version is 44, 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, ? – incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.1.0.0/24      12.1.4.1               200             0 10 i

Total number of prefixes 1
PE2#

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.

 

Author: Chris Yoon

IT professional