BGP Configurations http://showipbgp.com/bgp-configurations.html Tue, 21 Nov 2017 11:33:34 +0000 Joomla! 1.5 - Open Source Content Management en-gb 6-1-2. Cisco dual BGP with AS prepend-iBGP (Load-sharing) http://showipbgp.com/bgp-configurations/40-cisco/122-6-1-2-cisco-dual-bgp-with-as-prepend-ibgp-load-sharing.html http://showipbgp.com/bgp-configurations/40-cisco/122-6-1-2-cisco-dual-bgp-with-as-prepend-ibgp-load-sharing.html Cisco dual BGP with AS prepend-iBGP (Load-sharing)
   
  • ISPs : 2
  • WAN links : 2
  • CPE : 2
  • PE : 2
  • Device : Cisco router with LAN/WAN ports.
  • WAN1 / Serial IP : 10.20.1.0/30 (mask 255.255.255.252)
  • WAN2 / Serial IP : 10.30.1.0/30 (mask 255.255.255.252)
  • LAN / Ethernet IP : 100.100.100.0/24 and 200.200.200.0/24
  • Receiving Route : Default route from ISP
  • Memory : Full route(recommend 512M), partial route
    (recommend 128-256M), default route only in this sample.
  • LAN : ISP_A (AS20), ISP_B(AS30), Customer (AS10) and other ISP (AS50)

 

BGP sample configuration 6-1-1

 [Traffic flow]

Outbound traffic on CPE

In this sample, customer is receiving default route from ISPs and iBGP router(less preferred). By default route, outbound traffic of IP block 100.100.100.0/24 will be routed to ISP_"A" and traffic of IP block 200.200.200.0/24 will be routed to ISP_"B". When serial link is down, outbound traffic is routed thru iBGP peer.

Inbound traffic  on CPE

All traffic associated with 100.100.100.0/24 will be routed thru ISP_"A" and 200.200.200.0/24 will be routed thru ISP_"B". This configuration will cover failover situation and achieve load-sharing planl. One of line failed, other link will take both traffic by AS prepending BGP policy. See below example and testing output.

topology_BGP6-1-1.png 

[CPE_1/Customer Cisco Router]
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname CPE_1
!
ip cef
no ip domain lookup
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/1
 ip address 10.20.1.1 255.255.255.252
 load-interval 30
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 load-interval 30
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
interface FastEthernet2/0
 ip address 200.200.200.2 255.255.255.0 secondary
 ip address 100.100.100.1 255.255.255.0
 duplex auto
 speed auto
!
router bgp 10
 no synchronization
 bgp log-neighbor-changes
 network 100.100.100.0 mask 255.255.255.0
 network 200.200.200.0
 redistribute connected
 neighbor 10.20.1.2 remote-as 20 <------------------ BGP neighbor to ISP_"A"
 neighbor 10.20.1.2 prefix-list to-ISP out <--------- Allow only IP block need to be advertised to ISP
 neighbor 10.20.1.2 route-map route-to-ISP out <-------- To control inbound traffic
 neighbor 100.100.100.2 remote-as 10 <----------- iBGP neighbor to CPE_2
 neighbor 100.100.100.2 default-originate <------- Send default route
 neighbor 100.100.100.2 route-map route-to-ibgp in <------- Make less prefer
 no auto-summary
!
ip http server
no ip http secure-server
ip forward-protocol nd
!
ip prefix-list prefix-1 seq 5 permit 100.100.100.0/24
!
ip prefix-list prefix-2 seq 5 permit 200.200.200.0/24
!
ip prefix-list to-ISP seq 5 permit 100.100.100.0/24
ip prefix-list to-ISP seq 10 permit 200.200.200.0/24
!
route-map route-to-ISP permit 10 <-------- To control inbound traffic
 match ip address prefix-list prefix-2
 set as-path prepend 10 10 10

!
route-map route-to-ISP permit 20
!
route-map route-to-ibgp permit 10 <------- Make less prefer
 set local-preference 80
!
control-plane
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end

[CPE_2/Customer Cisco Router]

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname CPE_2
!
ip cef
no ip domain lookup
!
interface FastEthernet0/0
 ip address 200.200.200.4 255.255.255.0
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/1
 ip address 10.30.1.1 255.255.255.252
 load-interval 30
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
interface FastEthernet2/0
 ip address 100.100.100.2 255.255.255.0 secondary
 ip address 200.200.200.1 255.255.255.0
 duplex auto
 speed auto
!
router bgp 10
 no synchronization
 bgp log-neighbor-changes
 network 100.100.100.0 mask 255.255.255.0
 network 200.200.200.0
 redistribute connected
 neighbor 10.30.1.2 remote-as 30 <------------------ BGP neighbor to ISP_"B"
 neighbor 10.30.1.2 prefix-list to-ISP out <--------- Allow only IP block need to be advertised to ISP
 neighbor 10.30.1.2 route-map route-to-ISP out <-------- To control inbound traffic
 neighbor 100.100.100.1 remote-as 10 <----------- iBGP neighbor to CPE_1
 neighbor 100.100.100.1 default-originate <------- Send default route
 neighbor 100.100.100.1 route-map route-to-ibgp in <------- Make less prefer
 no auto-summary
!
ip http server
no ip http secure-server
ip forward-protocol nd
!
ip prefix-list prefix-1 seq 5 permit 100.100.100.0/24
!
ip prefix-list prefix-2 seq 5 permit 200.200.200.0/24
!
ip prefix-list to-ISP seq 5 permit 100.100.100.0/24
ip prefix-list to-ISP seq 10 permit 200.200.200.0/24
!
route-map route-to-ISP permit 10 <-------- To control inbound traffic
 match ip address prefix-list prefix-1
 set as-path prepend 10 10 10

!
route-map route-to-ISP permit 20
!
route-map route-to-ibgp permit 10 <------- Make less prefer
 set local-preference 80
!
control-plane
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end



 

[ISP_A PE/ISP Cisco Router]
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname ISP_A
!
ip cef
no ip domain lookup
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 10.20.1.2 255.255.255.252
 serial restart-delay 0
!
interface Serial1/1
 ip address 20.20.1.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router bgp 20
 no synchronization
 bgp log-neighbor-changes
 redistribute connected
 neighbor 10.20.1.1 remote-as 10 <------------------ BGP neighbor to Customer
 neighbor 10.20.1.1 default-originate
 neighbor 10.20.1.1 route-map no-routes out
<------- No BGP routes will be sent to Customer
 neighbor 20.20.1.2 remote-as 20
 no auto-summary
!
ip http server
no ip http secure-server
ip forward-protocol nd
!
route-map no-routes deny 10 <------- No BGP routes will be sent to Customer
!
control-plane
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end

[ISP_B PE / ISP Cisco Router]

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname ISP_B
!
ip cef
no ip domain lookup
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 10.30.1.2 255.255.255.252
 serial restart-delay 0
!
interface Serial1/1
 ip address 30.30.1.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router bgp 30
 no synchronization
 bgp log-neighbor-changes
 redistribute connected
 neighbor 10.30.1.1 remote-as 10 <------------------ BGP neighbor to Customer
 neighbor 10.30.1.1 default-originate
 neighbor 10.30.1.1 route-map no-routes out
<------- No BGP routes will be sent to Customer
 neighbor 30.30.1.2 remote-as 30
 no auto-summary
!
ip http server
no ip http secure-server
ip forward-protocol nd
!
route-map no-routes deny 10 <------- No BGP routes will be sent to Customer
!
control-plane
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end

 [Verifing output]

CPE_1#sh ip bgp 0.0.0.0
BGP routing table entry for 0.0.0.0/0, version 21
Paths: (2 available, best #1, table Default-IP-Routing-Table)
  Not advertised to any peer
  20
    10.20.1.2 from 10.20.1.2 (20.20.1.1)
      Origin IGP, metric 0, localpref 100, valid, external, best
  Local
    100.100.100.2 from 100.100.100.2 (200.200.200.1)
      Origin IGP, metric 0, localpref 80, valid, internal



CPE_1#sh ip bgp nei 10.20.1.2 ad
BGP table version is 23, local router ID is 100.100.100.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
*> 100.100.100.0/24 0.0.0.0                  0         32768 i
*> 200.200.200.0    0.0.0.0                  0         32768 i

Total number of prefixes 2
CPE_1#



CPE_2#sh ip bgp 0.0.0.0
BGP routing table entry for 0.0.0.0/0, version 20
Paths: (2 available, best #1, table Default-IP-Routing-Table)
  Not advertised to any peer
  30
    10.30.1.2 from 10.30.1.2 (30.30.1.1)
      Origin IGP, metric 0, localpref 100, valid, external, best
  Local
    100.100.100.1 from 100.100.100.1 (100.100.100.1)
      Origin IGP, metric 0, localpref 80, valid, internal



CPE_2#sh ip bgp nei 10.30.1.2 ad
BGP table version is 20, local router ID is 200.200.200.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
*> 100.100.100.0/24 0.0.0.0                  0         32768 i
*> 200.200.200.0    0.0.0.0                  0         32768 i

Total number of prefixes 2
CPE_2#



ISP_A#sh ip bgp nei 10.20.1.1 ro
BGP table version is 56, local router ID is 20.20.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
*> 100.100.100.0/24 10.20.1.1                0             0 10 i
*  200.200.200.0    10.20.1.1                0             0 10 10 10 10 i

Total number of prefixes 2
ISP_A#



ISP_B#sh ip bgp nei 10.30.1.1 ro
BGP table version is 60, local router ID is 30.30.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
*  100.100.100.0/24 10.30.1.1                0             0 10 10 10 10 i
*> 200.200.200.0    10.30.1.1                0             0 10 i

Total number of prefixes 2
ISP_B#



TR_A#sh ip bgp 100.100.100.0
BGP routing table entry for 100.100.100.0/24, version 51
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1
  10
    10.20.1.1 from 20.20.1.1 (20.20.1.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best



TR_A#sh ip bgp 200.200.200.0
BGP routing table entry for 200.200.200.0/24, version 58
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1          2
  50 30 10
    20.50.1.2 from 20.50.1.2 (30.50.1.2)
      Origin IGP, localpref 100, valid, external
  30 10
    20.30.1.2 from 20.30.1.2 (30.50.1.1)
      Origin IGP, localpref 100, valid, external, best
TR_A#



TR_B#sh ip bgp 100.100.100.0
BGP routing table entry for 100.100.100.0/24, version 61
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1          2
  50 20 10
    30.50.1.2 from 30.50.1.2 (30.50.1.2)
      Origin IGP, localpref 100, valid, external
  20 10
    20.30.1.1 from 20.30.1.1 (20.50.1.1)
      Origin IGP, localpref 100, valid, external, best



TR_B#sh ip bgp 200.200.200.0
BGP routing table entry for 200.200.200.0/24, version 66
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     2
  10
    10.30.1.1 from 30.30.1.1 (30.30.1.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best
TR_B#



Other_ISP#sh ip bgp 100.100.100.0
BGP routing table entry for 100.100.100.0/24, version 64
Paths: (2 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1
  20 10
    20.50.1.1 from 20.50.1.1 (20.50.1.1)
      Origin IGP, localpref 100, valid, external, best
  30 20 10
    30.50.1.1 from 30.50.1.1 (30.50.1.1)
      Origin IGP, localpref 100, valid, external



Other_ISP#tr 100.100.100.3
Type escape sequence to abort.
Tracing the route to 100.100.100.3

  1 20.50.1.1 64 msec 28 msec 8 msec
  2 20.20.1.1 [AS 20] 40 msec 24 msec 4 msec
  3 10.20.1.1 [AS 20] 16 msec 20 msec 8 msec
  4 100.100.100.3 [AS 10] 44 msec *  40 msec



Other_ISP#sh ip bgp 200.200.200.0
BGP routing table entry for 200.200.200.0/24, version 71
Paths: (2 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1
  30 10
    30.50.1.1 from 30.50.1.1 (30.50.1.1)
      Origin IGP, localpref 100, valid, external, best
  20 30 10
    20.50.1.1 from 20.50.1.1 (20.50.1.1)
      Origin IGP, localpref 100, valid, external



Other_ISP#tr 200.200.200.3
Type escape sequence to abort.
Tracing the route to 200.200.200.3

  1 30.50.1.1 52 msec 64 msec 12 msec
  2 30.30.1.1 [AS 30] 16 msec 20 msec 8 msec
  3 10.30.1.1 [AS 30] 12 msec 32 msec 16 msec
  4 200.200.200.3 [AS 10] 20 msec *  44 msec
Other_ISP#


 [Dynamips testing]

Download and test it yourself with below Dynamips configuration files.
  Dynamips NET file
  Router configuration files

If you have any questions, feel free to send email us at contactus@showipbgp.com. 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.


]]>
contactus@showipbgp.com (Administrator) Cisco Wed, 09 Apr 2008 20:44:27 +0000
4-3-2. Cisco dual BGP with AS prepend (Load-balancing) http://showipbgp.com/bgp-configurations/40-cisco/114-4-3-2-cisco-dual-bgp-with-as-prepend-load-balancing.html http://showipbgp.com/bgp-configurations/40-cisco/114-4-3-2-cisco-dual-bgp-with-as-prepend-load-balancing.html Cisco dual BGP with AS prepend (Load-balancing)
   
  • ISPs : 2
  • WAN links : 2
  • CPE : 1
  • PE : 2
  • Device : Cisco router with LAN/WAN ports.
  • WAN1 / Serial IP : 10.20.1.0/30 (mask 255.255.255.252)
  • WAN2 / Serial IP : 10.30.1.0/30 (mask 255.255.255.252)
  • LAN / Ethernet IP : 100.100.100.0/24 and 200.200.200.0/24
  • Receiving Route : No BGP route table from ISP
  • Memory : Full route(recommend 512M), partial route
    (recommend 128-256M), default route only in this sample.
  • LAN : ISP_A (AS20), ISP_B(AS30), Customer (AS10) and other ISP (AS50)

 

BGP sample configuration 3-1-1

 [Traffic flow]

Outbound traffic on CPE

In this sample, we are not receiving any BGP route table from ISP. We configured static routes are pointing to both serial links. Of cause it wouldn't be 50/50, due to packets will be routed by destination based.

Inbound traffic  on CPE

All traffic associated with 100.100.100.0/24 will be routed thru ISP_"A" and 200.200.200.0/24 will be routed thru ISP_"B". This configuration will cover failover situation as well. One of line failed, other link will take both traffic. See below example and testing output.

topology_BGP4-2-1.png

 
ciscopic.png

[CPE/Customer Cisco Router]
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname CPE
!
boot-start-marker
boot-end-marker
!
ip cef
no ip domain lookup
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/1
 ip address 10.20.1.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/2
 ip address 10.30.1.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
interface FastEthernet2/0
 ip address 200.200.200.1 255.255.255.0 secondary
 ip address 100.100.100.1 255.255.255.0
 duplex auto
 speed auto
!
router bgp 10
 no synchronization
 bgp log-neighbor-changes
 network 100.100.100.0 mask 255.255.255.0
 network 200.200.200.0
 redistribute connected
 neighbor 10.20.1.2 remote-as 20 <------------------ BGP neighbor to ISP_"A"
 neighbor 10.20.1.2 prefix-list to-ISP out <--------- Allow only IP block need to be advertised to ISP
 neighbor 10.20.1.2 route-map traffic-1 out <----- Applied route-map on BGP session with ISP_"A"
 neighbor 10.30.1.2 remote-as 30 <------------------ BGP neighbor to ISP_"B"
 neighbor 10.30.1.2 prefix-list to-ISP out <--------- Allow only IP block need to be advertised to ISP
 neighbor 10.30.1.2 route-map traffic-2 out <----- Applied route-map on BGP session with ISP_"B"
 no auto-summary
!
ip http server
no ip http secure-server
ip forward-protocol nd
!
ip route 0.0.0.0 0.0.0.0 Serial1/1 <------------- Load-sharing outbound traffic by destination
ip route 0.0.0.0 0.0.0.0 Serial1/2 <------------- Load-sharing outbound traffic by destination
!
ip prefix-list prefix-1 seq 5 permit 100.100.100.0/24
!
ip prefix-list prefix-2 seq 5 permit 200.200.200.0/24
!
ip prefix-list to-ISP seq 5 permit 100.100.100.0/24
ip prefix-list to-ISP seq 10 permit 200.200.200.0/24

!
route-map traffic-1 permit 10
 match ip address prefix-list prefix-2
 set as-path prepend 10 10 <-------- Prepending ASN 10 two times to announcement(200.200.200.0/24)

!
route-map traffic-1 permit 20 <------ Necessary this statement in order to pass thru route(100.100.100.0/24)
!
route-map traffic-2 permit 10
 match ip address prefix-list prefix-1
 set as-path prepend 10 10 <-------- Prepending ASN 10 two times to announcement(100.100.100.0/24)

!
route-map traffic-2 permit 20 <------ Necessary this statement in order to pass thru route(200.200.200.0/24)
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end

 

[ISP_A PE/ISP Cisco Router]
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname ISP_A
!
boot-start-marker
boot-end-marker
!
ip cef
no ip domain lookup
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 10.20.1.2 255.255.255.252
 serial restart-delay 0
!
interface Serial1/1
 ip address 20.20.1.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router bgp 20
 no synchronization
 bgp log-neighbor-changes
 redistribute connected
 neighbor 10.20.1.1 remote-as 10 <------------------ BGP neighbor to Customer
 neighbor 10.20.1.1 route-map no-routes out <------- No BGP routes will be sent to Customer
 neighbor 20.20.1.2 remote-as 20
 no auto-summary
!
ip http server
no ip http secure-server
ip forward-protocol nd
!
route-map no-routes deny 10 <------- No BGP routes will be sent to Customer
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end


[ISP_B PE / ISP Cisco Router]

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname ISP_B
!
boot-start-marker
boot-end-marker
!
ip cef
no ip domain lookup
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0


 ip address 10.30.1.2 255.255.255.252
 serial restart-delay 0
!
interface Serial1/1
 ip address 30.30.1.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router bgp 30
 no synchronization
 bgp log-neighbor-changes
 redistribute connected
 neighbor 10.30.1.1 remote-as 10 <------------------ BGP neighbor to Customer
 neighbor 10.30.1.1 route-map no-routes out <------- No BGP routes will be sent to Customer
 neighbor 30.30.1.2 remote-as 30
 no auto-summary
!
ip http server
no ip http secure-server
ip forward-protocol nd
!
route-map no-routes deny 10 <------- No BGP routes will be sent to Customer
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end

[Verifing output]

CPE#sh ip bgp nei 10.30.1.2 ro
BGP table version is 6, local router ID is 100.100.100.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          10.30.1.2                0             0 30 i

Total number of prefixes 1


CPE#sh ip bgp nei 10.20.1.2 ro

BGP table version is 6, local router ID is 100.100.100.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          10.20.1.2                0             0 20 i

Total number of prefixes 1



CPE#sh ip bgp 200.200.200.0

BGP routing table entry for 200.200.200.0/24, version 6
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1          2
  Local
    0.0.0.0 from 0.0.0.0 (100.100.100.1)
      Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best


CPE#sh ip bgp 100.100.100.0
BGP routing table entry for 100.100.100.0/24, version 5
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1          2
  Local
    0.0.0.0 from 0.0.0.0 (100.100.100.1)
      Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best
CPE#


ISP_A#sh ip bgp neighbors 10.20.1.1 ro

BGP table version is 28, local router ID is 20.20.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
*> 100.100.100.0/24 10.20.1.1                0             0 10 i
*  200.200.200.0    10.20.1.1                0             0 10 10 10 i

Total number of prefixes 2


 
ISP_B#sh ip bgp neighbors 10.30.1.1 ro
BGP table version is 32, local router ID is 30.30.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
*  100.100.100.0/24 10.30.1.1                0             0 10 10 10 i
*> 200.200.200.0    10.30.1.1                0             0 10 i

Total number of prefixes 2


 
TR_A#sh ip bgp 100.100.100.0
BGP routing table entry for 100.100.100.0/24, version 22
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1
  10
    10.20.1.1 from 20.20.1.1 (20.20.1.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best



TR_A#sh ip bgp 200.200.200.0

BGP routing table entry for 200.200.200.0/24, version 23
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1          2
  50 30 10
    20.50.1.2 from 20.50.1.2 (30.50.1.2)
      Origin IGP, localpref 100, valid, external
  30 10
    20.30.1.2 from 20.30.1.2 (30.50.1.1)
      Origin IGP, localpref 100, valid, external, best


 
TR_B#sh ip bgp 100.100.100.0
BGP routing table entry for 100.100.100.0/24, version 26
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1          2
  50 20 10
    30.50.1.2 from 30.50.1.2 (30.50.1.2)
      Origin IGP, localpref 100, valid, external
  20 10
    20.30.1.1 from 20.30.1.1 (20.50.1.1)
      Origin IGP, localpref 100, valid, external, best



TR_B#sh ip bgp 200.200.200.0
BGP routing table entry for 200.200.200.0/24, version 24
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     2
  10
    10.30.1.1 from 30.30.1.1 (30.30.1.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best
TR_B#


Internet#tr 100.100.100.2
Type escape sequence to abort.
Tracing the route to 100.100.100.2

  1 20.50.1.1 68 msec 48 msec 32 msec
  2 20.20.1.1 [AS 20] 20 msec 60 msec 32 msec
  3 10.20.1.1 [AS 20] 16 msec 64 msec 72 msec
  4  *
    100.100.100.2 [AS 10] 60 msec 72 msec

 
Internet#tr 200.200.200.2
Type escape sequence to abort.
Tracing the route to 200.200.200.2

  1 30.50.1.1 52 msec 36 msec 28 msec
  2 30.30.1.1 [AS 30] 20 msec 64 msec 32 msec
  3 10.30.1.1 [AS 30] 36 msec 40 msec 56 msec
  4  *
    200.200.200.2 [AS 10] 92 msec 100 msec
Internet#

 

 [Dynamips testing]

Download and test it yourself with below Dynamips configuration files.
  Dynamips NET file
  Router configuration files

If you have any questions, feel free to send email us at contactus@showipbgp.com. 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.


]]>
contactus@showipbgp.com (Administrator) Cisco Wed, 09 Apr 2008 20:44:27 +0000
3-5-1 Cisco dual BGP with Origin Value (Redundancy) http://showipbgp.com/bgp-configurations/40-cisco/110-3-5-1-cisco-dual-bgp-with-origin-value-redundancy.html http://showipbgp.com/bgp-configurations/40-cisco/110-3-5-1-cisco-dual-bgp-with-origin-value-redundancy.html Cisco dual BGP with Origin Value (Redundancy)
   
  • ISPs : 1
  • WAN links : 2
  • CPE : 1
  • GW : 2
  • Device : Cisco router with LAN/WAN ports.
  • WAN1 / Serial IP : 10.20.1.0/30 (mask 255.255.255.252)
  • WAN2 / Serial IP : 10.20.2.0/30 (mask 255.255.255.252)
  • Customer LAN IP : 100.100.100.0/24 and 200.200.200.0/24
  • Receiving Route : Default route
  • Memory : Full route(recommend 512M), partial route
    (recommend 128-256M)
  • LAN : ISP (AS10) and Customer (AS20)

 

BGP sample configuration 3-4-2

[Traffic flow]

Outbound traffic on CPE
All outbound traffic will go out thru both links. It is controlled by simple default route statement in this scenario. Outbound traffic won't be divided in exact 50/50. Because traffic will route to the link per destination(default) based, but not per packet. Don't worry, overall it make a balancing traffic. Most of ISPs are not supporting per packet option due to it is CPU intensive command(they said). 
 
Inbound traffic on CPE
In this case we assumed that LAN side IP blocks are fully used(/24). We will announce both /24 IP blocks thru WAN1 and WAN 2 with Origin code on only one side of IP block. For example, 100.100.100.0/24 IP block will be tagged with Origin IGP, when it is announcing thru WAN1. Both IP blocks are learned thru 'redistribute connected' so, Origin value would be 'incomplete' until we manaully change it. Orign IGP is more prefer than incomplete, so 100.100.100.0/24 traffic will be preferred take WAN 1 insteads of WAN2. 
Inbound traffic for 100.100.100.0/24 will take WAN 1 and inbound traffic 200.200.200.0/24 will take WAN 2. Failover will be taken place, if one of link is failed.

 

[CPE/Customer Cisco Router]

Current configuration:
 version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname CPE
!
boot-start-marker
boot-end-marker
!
no aaa new-model
memory-size iomem 5
!
ip cef
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/1
 ip address 10.20.1.2 255.255.255.252
 serial restart-delay 0
!
interface Serial1/2
 ip address 10.20.2.2 255.255.255.252
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
interface FastEthernet2/0
 ip address 100.100.100.1 255.255.255.0 secondary
 ip address 200.200.200.1 255.255.255.0
 duplex auto
 speed auto
!
router bgp 20 <------------ Customer ASN
 no synchronization
 bgp log-neighbor-changes
 redistribute connected
 neighbor 10.20.1.1 remote-as 10 <------------ BGP neighbor with GW1
 neighbor 10.20.1.1 route-map traffic-1 out <------------ route-map for traffic shape
 neighbor 10.20.2.1 remote-as 10 <------------ BGP neighbor with GW2
 neighbor 10.20.2.1 route-map traffic-2 out <------------ route-map for traffic shape
 no auto-summary
!
ip http server
no ip http secure-server
ip forward-protocol nd
!
access-list 1 permit 100.100.100.0 0.0.0.255
access-list 2 permit 200.200.200.0 0.0.0.255

!
route-map traffic-1 permit 10
 match ip address 1
<------------ match with ACL 1 / permit 100.100.100.0/24
 set origin igp <------------ Change origin value to 'IGP'
!
route-map traffic-1 permit 20
 match ip address 2

!
route-map traffic-2 permit 10
 match ip address 2
<------------ match with ACL 2 / permit 200.200.200.0/24
 set origin igp <------------ Change origin value to 'IGP'
!
route-map traffic-2 permit 20
 match ip address 1

!
control-plane
!
line con 0
line aux 0
line vty 0 4
 login
!
end

[GW1 / ISP Cisco Router]

Current configuration:

 version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname GW1
!
boot-start-marker
boot-end-marker
!
no aaa new-model
memory-size iomem 5
!
ip cef
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 10.20.1.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/1
 ip address 1.3.1.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/2
 ip address 1.4.1.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router bgp 10 <------------ ISP ASN
 no synchronization
 bgp log-neighbor-changes
 redistribute connected
 neighbor 1.3.1.2 remote-as 10
 neighbor 1.4.1.2 remote-as 10
 neighbor 10.20.1.2 remote-as 20 <------------- BGP neighbor with CPE
 neighbor 10.20.1.2 default-originate
 no auto-summary
!
ip http server
no ip http secure-server
ip forward-protocol nd
!
control-plane
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end
 

[GW2 / ISP Cisco Router]

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname GW2
!
boot-start-marker
boot-end-marker
!
ip cef
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 10.20.2.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/1
 ip address 2.4.1.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/2
 ip address 2.3.1.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router bgp 10 <------------ ISP ASN
 no synchronization
 bgp log-neighbor-changes
 redistribute connected
 neighbor 2.3.1.2 remote-as 10
 neighbor 2.4.1.2 remote-as 10
 neighbor 10.20.2.2 remote-as 20 <------------- BGP neighbor with CPE
 neighbor 10.20.2.2 default-originate
 no auto-summary
!
ip http server
no ip http secure-server
ip forward-protocol nd
!
control-plane
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end   

 

 [Dynamips testing]

Download and test it yourself with below Dynamips configuration files.

  Dynamips NET file
  Router configuration files

[Verifing output]

'!' means Origin IGP and '?' means Origin incomplete.

BGP output_BGP3-5-1-1.png

BGP output_BGP3-5-1-2.png 

 Traffic destined to 100.100.100.x/24 is preferred to WAN1(GW1 and CPE) and traffic destined to 200.200.200.x/24 is preferred to WAN2(GW2 and CPE) by Origin value.

 

 BGP output_BGP3-5-1-3.png

 

 BGP output_BGP3-5-1-4.png

If you have any questions, feel free to send email us at contactus@showipbgp.com. 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.

 

]]>
contactus@showipbgp.com (Administrator) Cisco Wed, 09 Apr 2008 20:44:27 +0000
5-1-1. Cisco dual BGP with AS prepend-HSRP (Load-sharing) http://showipbgp.com/bgp-configurations/40-cisco/124-5-1-1-cisco-dual-bgp-with-as-prepend-hsrp-load-sharing.html http://showipbgp.com/bgp-configurations/40-cisco/124-5-1-1-cisco-dual-bgp-with-as-prepend-hsrp-load-sharing.html Cisco dual BGP with AS prepend-HSRP (Load-sharing)
   
  • ISPs : 1
  • WAN links : 2
  • CPE : 2
  • PE : 2
  • Device : Cisco router with LAN/WAN ports.
  • WAN1 / Serial IP : 10.20.1.0/30 (mask 255.255.255.252)
  • WAN2 / Serial IP : 10.20.2.0/30 (mask 255.255.255.252)
  • LAN / Ethernet IP : 100.100.100.0/24 and 200.200.200.0/24
  • Receiving Route : No BGP route table from ISP
  • Memory : Full route(recommend 512M), partial route
    (recommend 128-256M), default route only in this sample.
  • LAN : ISP_A (AS20), ISP_B(AS30), Customer (AS10) and other ISP (AS50)

 

BGP sample configuration 5-1-1

 [Traffic flow]

Outbound traffic on CPE

In this sample, customer is not receiving any BGP route table from ISP. We configured static route points to serial link. Using two HSRP, outbound traffic of IP block 100.100.100.0/24 will be routed to uplink of CPE_1 and traffic of IP block 200.200.200.0/24 will be routed to uplink of CPE_2.

Inbound traffic  on CPE

All inbound traffic associated with 100.100.100.0/24 will be routed thru WAN link of CPE_1 and 200.200.200.0/24 will be routed thru the WAN link of CPE_2. This configuration will cover failover situation and achieve load-sharing plan. One of line failed, other link will take both traffic by sending community strings. See below example and testing output.

topology_BGP5

[CPE_1/Customer Cisco Router]
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname CPE_1
!
ip cef
no ip domain lookup
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/1
 ip address 10.20.1.1 255.255.255.252
 load-interval 30
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 load-interval 30
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
interface FastEthernet2/0
 ip address 200.200.200.2 255.255.255.0 secondary
 ip address 100.100.100.2 255.255.255.0
 duplex auto
 speed auto
 standby 100 ip 100.100.100.1 <--------- HSRP for IP block 100.100.100.0/24
 standby 100 preempt
 standby 100 track Serial1/1 50 <--------- When Serial1/1 down, deduct 50 from Priority value

 standby 200 ip 200.200.200.1 <--------- HSRP for IP block 200.200.200.0/24
 standby 200 priority 80 <------------ Set lower priority for standby path
 standby 200 preempt
!
router bgp 10
 no synchronization
 bgp log-neighbor-changes
 network 100.100.100.0 mask 255.255.255.0
 network 200.200.200.0
 redistribute connected
 neighbor 10.20.1.2 remote-as 20 <------------------ BGP neighbor to ISP
 neighbor 10.20.1.2 prefix-list to-ISP out <--------- Allow only IP block need to be advertised to ISP
 neighbor 10.20.1.2 route-map route-to-ISP out <-------- To control inbound traffic
 no auto-summary
!
ip http server
no ip http secure-server
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Serial1/1 <-------- To control outbound traffic
!
ip prefix-list prefix-1 seq 5 permit 100.100.100.0/24
!
ip prefix-list prefix-2 seq 5 permit 200.200.200.0/24
!
ip prefix-list to-ISP seq 5 permit 100.100.100.0/24
ip prefix-list to-ISP seq 10 permit 200.200.200.0/24
!
route-map route-to-ISP permit 10 <-------- To control inbound traffic
 match ip address prefix-list prefix-2
 set as-path prepend 10 10 10

!
route-map route-to-ISP permit 20
!
control-plane
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end

[CPE_2/Customer Cisco Router]

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname CPE_2
!
ip cef
no ip domain lookup
!
interface FastEthernet0/0
 ip address 200.200.200.4 255.255.255.0
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/1
 ip address 10.20.2.1 255.255.255.252
 load-interval 30
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
interface FastEthernet2/0
 ip address 200.200.200.3 255.255.255.0 secondary
 ip address 100.100.100.3 255.255.255.0
 duplex auto
 speed auto
 standby 100 ip 100.100.100.1 <--------- HSRP for IP block 100.100.100.0/24
 standby 100 priority 80 <------------ Set lower priority for standby path
 standby 100 preempt
 standby 200 ip 200.200.200.1 <--------- HSRP for IP block 200.200.200.0/24

 standby 200 preempt
 standby 200 track Serial1/1 50
<--------- When Serial1/1 down, deduct 50 from Priority value
!
router bgp 10
 no synchronization
 bgp log-neighbor-changes
 network 100.100.100.0 mask 255.255.255.0
 network 200.200.200.0
 redistribute connected
 neighbor 10.20.2.2 remote-as 20 <------------------ BGP neighbor to ISP
 neighbor 10.20.2.2 prefix-list to-ISP out <--------- Allow only IP block need to be advertised to ISP
 neighbor 10.20.2.2 route-map route-to-ISP out <-------- To control inbound traffic
 no auto-summary
!
ip http server
no ip http secure-server
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Serial1/1 <-------- To control outbound traffic
!
ip prefix-list prefix-1 seq 5 permit 100.100.100.0/24
!
ip prefix-list prefix-2 seq 5 permit 200.200.200.0/24
!
ip prefix-list to-ISP seq 5 permit 100.100.100.0/24
ip prefix-list to-ISP seq 10 permit 200.200.200.0/24
!
route-map route-to-ISP permit 10 <-------- To control inbound traffic
 match ip address prefix-list prefix-1
 set as-path prepend 10 10 10

!
route-map route-to-ISP permit 20
!
control-plane
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end

[PE_1 / ISP Cisco Router]
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname PE_1
!
ip cef
no ip domain lookup
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 10.20.1.2 255.255.255.252
 serial restart-delay 0
!
interface Serial1/1
 ip address 20.1.3.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/2
 ip address 20.1.4.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router bgp 20
 no synchronization
 bgp log-neighbor-changes
 redistribute connected
 neighbor 10.20.1.1 remote-as 10 <------------------ BGP neighbor to Customer
 neighbor 10.20.1.1 route-map no-routes out <------- No BGP routes will be sent to Customer
 neighbor 20.1.3.2 remote-as 20
 neighbor 20.1.4.2 remote-as 20

 no auto-summary
!
ip http server
no ip http secure-server
ip forward-protocol nd
!
route-map no-routes deny 10 <------- No BGP routes will be sent to Customer
!
control-plane
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end

[PE_2 / ISP Cisco Router]

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname PE_2
!
ip cef
no ip domain lookup
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 10.20.2.2 255.255.255.252
 serial restart-delay 0
!
interface Serial1/1
 ip address 20.2.4.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/2
 ip address 20.2.3.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router bgp 20
 no synchronization
 bgp log-neighbor-changes
 redistribute connected
 neighbor 10.20.2.1 remote-as 10 <------------------ BGP neighbor to Customer
 neighbor 10.20.2.1 route-map no-routes out <------- No BGP routes will be sent to Customer
 neighbor 20.2.3.2 remote-as 20
 neighbor 20.2.4.2 remote-as 20

 no auto-summary
!
ip http server
no ip http secure-server
ip forward-protocol nd
!
route-map no-routes deny 10 <------- No BGP routes will be sent to Customer
!
control-plane
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end

[Verifing output]

CPE_1#sh ip bgp nei 10.20.1.2 ad
BGP table version is 4, local router ID is 100.100.100.2
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
*> 100.100.100.0/24 0.0.0.0                  0         32768 i
*> 200.200.200.0    0.0.0.0                  0         32768 i

Total number of prefixes 2



CPE_1#sh ip bgp nei 10.20.1.2 ro
Total number of prefixes 0
CPE_1#sh standby brief
                     P indicates configured to preempt.
                     |
Interface   Grp Prio P State    Active          Standby         Virtual IP
Fa2/0       100 100  P Active   local           100.100.100.3   100.100.100.1
Fa2/0       200 80   P Standby  100.100.100.3   local           200.200.200.1
CPE_1#



CPE_2#sh ip bgp neighbors 10.20.2.2 ad
BGP table version is 4, local router ID is 100.100.100.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
*> 100.100.100.0/24 0.0.0.0                  0         32768 i
*> 200.200.200.0    0.0.0.0                  0         32768 i

Total number of prefixes 2



CPE_2#sh ip bgp neighbors 10.20.2.2 ro
Total number of prefixes 0
CPE_2#sh standby brief
                     P indicates configured to preempt.
                     |
Interface   Grp Prio P State    Active          Standby         Virtual IP
Fa2/0       100 80   P Standby  100.100.100.2   local           100.100.100.1
Fa2/0       200 100  P Active   local           100.100.100.2   200.200.200.1
CPE_2#



PE_1#sh ip bgp nei 10.20.1.1 ro
BGP table version is 16, local router ID is 20.1.4.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
*> 100.100.100.0/24 10.20.1.1                0             0 10 i
*> 200.200.200.0    10.20.1.1                0             0 10 10 10 10 i

Total number of prefixes 2
PE_1#sh ip bgp nei 10.20.1.1 ad

Total number of prefixes 0
PE_1#



PE_2#sh ip bgp nei 10.20.2.1 ro
BGP table version is 11, local router ID is 20.2.4.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
*> 100.100.100.0/24 10.20.2.1                0             0 10 10 10 10 i
*> 200.200.200.0    10.20.2.1                0             0 10 i

Total number of prefixes 2
PE_2#sh ip bgp nei 10.20.2.1 ad

Total number of prefixes 0
PE_2#



TR_A#sh ip bgp 100.100.100.0
BGP routing table entry for 100.100.100.0/24, version 13
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1
  10 10 10 10
    10.20.2.1 from 20.2.3.1 (20.2.4.1)
      Origin IGP, metric 0, localpref 100, valid, internal
  10
    10.20.1.1 from 20.1.3.1 (20.1.4.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best



TR_A#sh ip bgp 200.200.200.0

BGP routing table entry for 200.200.200.0/24, version 14
Paths: (2 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1
  10
    10.20.2.1 from 20.2.3.1 (20.2.4.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best
  10 10 10 10
    10.20.1.1 from 20.1.3.1 (20.1.4.1)
      Origin IGP, metric 0, localpref 100, valid, internal
TR_A#



TR_B#sh ip bgp 100.100.100.0
BGP routing table entry for 100.100.100.0/24, version 30
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Advertised to update-groups:
     2
  10 10 10 10
    10.20.2.1 from 20.2.4.1 (20.2.4.1)
      Origin IGP, metric 0, localpref 100, valid, internal
  10
    10.20.1.1 from 20.1.4.1 (20.1.4.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best



TR_B#sh ip bgp 200.200.200.0
BGP routing table entry for 200.200.200.0/24, version 31
Paths: (2 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     2
  10
    10.20.2.1 from 20.2.4.1 (20.2.4.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best
  10 10 10 10
    10.20.1.1 from 20.1.4.1 (20.1.4.1)
      Origin IGP, metric 0, localpref 100, valid, internal
TR_B#



Internet#sh ip bgp 100.100.100.0
BGP routing table entry for 100.100.100.0/24, version 22
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1
  20 10
    20.50.1.1 from 20.50.1.1 (20.50.1.1)
      Origin IGP, localpref 100, valid, external
  20 10
    20.50.2.1 from 20.50.2.1 (20.50.2.1)
      Origin IGP, localpref 100, valid, external, best



Internet#tr 100.100.100.4
Type escape sequence to abort.
Tracing the route to 100.100.100.4

  1 20.50.2.1 48 msec 4 msec 68 msec
  2 20.1.4.1 [AS 20] 12 msec 60 msec 64 msec
  3 10.20.1.1 [AS 20] 16 msec 60 msec 72 msec
  4 100.100.100.4 [AS 10] 20 msec 64 msec *



Internet#sh ip bgp 200.200.200.0
BGP routing table entry for 200.200.200.0/24, version 21
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1
  20 10
    20.50.1.1 from 20.50.1.1 (20.50.1.1)
      Origin IGP, localpref 100, valid, external
  20 10
    20.50.2.1 from 20.50.2.1 (20.50.2.1)
      Origin IGP, localpref 100, valid, external, best



Internet#tr 200.200.200.4
Type escape sequence to abort.
Tracing the route to 200.200.200.4

  1 20.50.2.1 52 msec 64 msec 44 msec
  2 20.2.4.1 [AS 20] 16 msec 72 msec 44 msec
  3 10.20.2.1 [AS 20] 16 msec 76 msec 32 msec
  4 200.200.200.4 [AS 10] 20 msec 72 msec *
Internet#

 [Dynamips testing]

Download and test it yourself with below Dynamips configuration files.
  Dynamips NET file
  Router configuration files

 

If you have any questions, feel free to send email us at contactus@showipbgp.com. 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.


]]>
contactus@showipbgp.com (Administrator) Cisco Wed, 09 Apr 2008 20:44:27 +0000
1-1-1. Cisco Single BGP with Default Route http://showipbgp.com/bgp-configurations/40-cisco/46-1-1-1-cisco-single-bgp-with-default-route.html http://showipbgp.com/bgp-configurations/40-cisco/46-1-1-1-cisco-single-bgp-with-default-route.html Cisco Single BGP with Default Route
   
  • ISPs : 1
  • WAN links : 1
  • CPE : 1
  • PE : 1
  • Device : Cisco router with LAN/WAN ports.
  • WAN / Serial IP : 12.1.3.0/30 (mask 255.255.255.252)
  • LAN / Ethernet IP : 10.1.0.0/24 (mask 255.255.255.0)
  • Receiving Route : Default route + full route from ISP
  • Memory : Full route(recommend 512M), partial route
    (recommend 128-256M)
  • LAN : ISP (AS20) and Customer (AS10)
  • Comments: If you have only single link with ISP, you don't really need BGP protocol at all. Better to use just default route to save even bandwidth. Consult with professionals if really need it. This article is shown for educational purpose.

BGP sample configuration 1-1-1

 

]]>
contactus@showipbgp.com (Administrator) Cisco Wed, 09 Apr 2008 20:44:27 +0000
1-2-1. Cisco Single BGP with Metric http://showipbgp.com/bgp-configurations/40-cisco/64-1-2-1-cisco-single-bgp-with-metric.html http://showipbgp.com/bgp-configurations/40-cisco/64-1-2-1-cisco-single-bgp-with-metric.html Cisco Single BGP with Metric
   
  • ISPs : 1
  • WAN links : 1
  • CPE : 1
  • PE : 1
  • Device : Cisco router with LAN/WAN ports.
  • WAN / Serial IP : 12.1.3.0/30 (mask 255.255.255.252)
  • LAN / Ethernet IP : 10.1.0.0/24 (mask 255.255.255.0)
  • Receiving Route : Default route + full route from ISP
  • Memory : Full route(recommend 512M), partial route
    (recommend 128-256M)
  • LAN : ISP (AS20) and Customer (AS10)
  • Comments: If you have only single link with ISP, you don't really need BGP protocol at all. Better to use just default route to save even bandwidth. Consult with professionals if really need it. This article is shown for educational purpose.

BGP sample configuration 1-2-1

 

]]>
contactus@showipbgp.com (Administrator) Cisco Wed, 09 Apr 2008 20:44:27 +0000
3-2-1. Cisco dual BGP with prefix Length (Load-balancing) http://showipbgp.com/bgp-configurations/40-cisco/72-3-2-1-cisco-dual-bgp-with-prefix-length-load-balancing.html http://showipbgp.com/bgp-configurations/40-cisco/72-3-2-1-cisco-dual-bgp-with-prefix-length-load-balancing.html Cisco dual BGP with prefix Length (Load-balancing)
   
  • 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), are allocated by ISP.
  • Receiving Route : no route from ISP
  • LAN : ISP (AS20) and Customer (AS10)

 

BGP sample configuration 3-2-1

[Traffic flow]

Outbound traffic on CPE
All outbound traffic will go out thru both links. It is controlled by simple default route statement in this scenario. Outbound traffic won't be divided in exact 50/50. Because traffic will route to the link per destination(default) based, but not per packet. Don't worry, overall it make a balancing traffic. Most of ISPs are not supporting per packet option due to it is CPU intensive command(they said). 
 
 
Inbound traffic  on CPE
In this case we assumed that LAN side IP is fully used(/24). We will split it in half and announce it to Internet thru one of WANs.   We will announce /24 thru WAN1 and announce second half of /24, which is /25 block thru other WAN. So traffic targeted to first half of /24 will come thru WAN1 and other traffic will come thru WAN 2.
[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
network 10.1.0.128 mask 255.255.255.128
neighbor 12.1.3.2 remote-as 20
neighbor 12.1.3.2 version 4
neighbor 12.1.3.2 prefix-list 1 out
neighbor
12.1.4.2 remote-as 20
neighbor 12.1.4.2 version 4
neighbor 12.1.4.2 route-map redundancy out
!
ip classless
!
ip route 0.0.0.0 0.0.0.0 Serial0
ip route 0.0.0.0 0.0.0.0 Serial1
ip prefix-list 1 seq 5 permit 10.1.0.0/24 le 32
 
 
!
route-map redundancy permit 10
set as-path prepend 10 10 10
!
!
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 distribute-list 2 out <---no route sent
!
ip classless
!
access-list 2 deny   any
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.3.1 distribute-list 2 out <---no route sent
!
ip classless
!
access-list 2 deny   any
!
line con 0
line aux 0
line vty 0 4
login
!
end 

[Verifing output]

CPE# show ip bgp neighbors 12.1.3.2 ro
 
Total number of prefixes 0
CPE#
 
 
CPE# show ip bgp neighbors 12.1.4.2 ro
 
Total number of prefixes 0
CPE#
 
 
CPE# show ip bgp neighbors 12.1.3.2 ad
BGP table version is 3, 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 3, 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
*> 10.1.0.128/25    0.0.0.0                  0         32768 i

Total number of prefixes 2
CPE#
 
 
PE1#show ip bgp nei 12.1.3.1 ro
BGP table version is 50, 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 71, 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                 0             0 10 10 10 10 i
*> 10.1.0.128/25    12.1.4.1                 0             0 10 10 10 10 i

Total number of prefixes 2
PE2#
 
 
XR1#traceroute 10.1.0.129

Type escape sequence to abort.
Tracing the route to 10.1.0.129

  1 PE2 (20.4.5.1) 20 msec 28 msec 28 msec
  2 CPE (12.1.4.1) 56 msec *  68 msec

XR1#traceroute 10.1.0.1

Type escape sequence to abort.
Tracing the route to 10.1.0.1

  1 PE1 (20.3.5.1) 20 msec 28 msec 24 msec
  2 CPE (12.1.3.1) 60 msec *  60 msec
XR1# 

 

If you have any questions, feel free to send email us at contactus@showipbgp.com. 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.

]]>
contactus@showipbgp.com (Administrator) Cisco Wed, 09 Apr 2008 20:44:27 +0000
1-4-1. Cisco Single BGP with AS prepend http://showipbgp.com/bgp-configurations/40-cisco/66-1-4-1-cisco-single-bgp-with-as-prepend.html http://showipbgp.com/bgp-configurations/40-cisco/66-1-4-1-cisco-single-bgp-with-as-prepend.html Cisco Single BGP with AS prepend
   
  • ISPs : 1
  • WAN links : 1
  • CPE : 1
  • PE : 1
  • Device : Cisco router with LAN/WAN ports.
  • WAN / Serial IP : 12.1.3.0/30 (mask 255.255.255.252)
  • LAN / Ethernet IP : 10.1.0.0/24 (mask 255.255.255.0)
  • Receiving Route : Default route + full route from ISP
  • Memory : Full route(recommend 512M), partial route
    (recommend 128-256M)
  • LAN : ISP (AS20) and Customer (AS10)
  • Comments: If you have only single link with ISP, you don't really need BGP protocol at all. Better to use just default route to save even bandwidth. Consult with professionals if really need it. This article is shown for educational purpose.

BGP sample configuration 1-4-1

[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
no ip directed-broadcast
no ip mroute-cache
!
interface Serial0
description to ISP
ip address 12.1.3.1 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
no fair-queue
!
interface Serial1
no ip mroute-cache
no ip directed-broadcast
shutdown
!
router bgp 10
no auto-summary
network 10.1.0.0 mask 255.255.255.0
neighbor 12.1.3.2 remote-as 20 <---- 20 is ISP's ASN

neighbor 12.1.3.2 version 4
neighbor 12.1.3.2 route-map To_ISP out

!
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0 <----- Default route, if partial routes are receiving from ISP, you must have this default route statement. You can request ISP to send default route through BGP.
!
ip prefix-list 1 description announcing routes to ISP
ip prefix-list 1 seq 5 permit 10.1.0.0/24 le 32
!
route-map To_ISP permit 10
match ip address prefix-list 1
set as-path prepend 10 10 10 <---- AS prepended three times
!
line con 0
line aux 0
line vty 0 4
login
!
end
[PE / ISP Cisco Router]
Current configuration:
!
version 12.x
!
hostname PE
!
!
interface Serial0
description to ISP
ip address 12.1.3.2 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
no fair-queue
!
interface Serial1
no ip mroute-cache
no ip directed-broadcast
shutdown
!
router bgp 20
neighbor 12.1.3.1 remote-as 10 <---- 10 is other side's ASN
neighbor 12.1.3.1 version 4
neighbor 12.1.3.1 default-originate <---- Sending default route to customer through BGP.
neighbor 12.1.3.1 prefix-list 2 in

!
ip classless
!
ip prefix-list 2 description from customer or peer
ip prefix-list 2 seq 5 permit 10.1.0.0/24 le 32 <---- Accepting smaller block than /24
!
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 8, local router ID is x.x.x.x
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 10.1.0.0/24 0.0.0.0 0 0 32768 ?
CPE#

PE#show ip bgp neighbors 12.1.3.1 ro
BBGP table version is 245, local router ID is x.x.x.x
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
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 10 10 10 ? <---- AS prepended three times

Total number of prefixes 1
CPE#show ip bgp neighbors 12.1.3.2 ro <---- Getting default route from ISP
BGP table version is 10, local router ID is x.x.x.x
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

Network NextHop Metric LocPrf Weight Path
*> 0.0.0.0 12.1.3.2 0 20 i

Total number of prefixes 1
CPE#
 

 If you have any questions, feel free to send email us at contactus@showipbgp.com. 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.

]]>
contactus@showipbgp.com (Administrator) Cisco Wed, 09 Apr 2008 20:44:27 +0000
1-5-1. Cisco Single BGP with Community String http://showipbgp.com/bgp-configurations/40-cisco/67-1-5-1-cisco-single-bgp-with-community-string.html http://showipbgp.com/bgp-configurations/40-cisco/67-1-5-1-cisco-single-bgp-with-community-string.html Cisco Single BGP with Community String
   
  • ISPs : 1
  • WAN links : 1
  • CPE : 1
  • PE : 1
  • Device : Cisco router with LAN/WAN ports.
  • WAN / Serial IP : 12.1.3.0/30 (mask 255.255.255.252)
  • LAN / Ethernet IP : 10.1.0.0/24 (mask 255.255.255.0)
  • Receiving Route : Default route + full route from ISP
  • Memory : Full route(recommend 512M), partial route
    (recommend 128-256M)
  • LAN : ISP (AS20) and Customer (AS10)
  • Comments: If you have only single link with ISP, you don't really need BGP protocol at all. Better to use just default route to save even bandwidth. Consult with professionals if really need it. This article is shown for educational purpose.

BGP sample configuration 1-5-1

[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
no ip directed-broadcast
no ip mroute-cache
!
interface Serial0
description to ISP
ip address 12.1.3.1 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
no fair-queue
!
interface Serial1
no ip mroute-cache
no ip directed-broadcast
shutdown
!
router bgp 10
no auto-summary
network 10.1.0.0 mask 255.255.255.0
neighbor 12.1.3.2 remote-as 20 <---- ISP's ASN

neighbor 12.1.3.2 version 4
neighbor 12.1.3.2 send-community
neighbor 12.1.3.2 route-map bgp_community out

!
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0 <----- Default route, if partial routes are receiving from ISP, you must have this default route statement. You can request ISP to send default route through BGP.
!
ip bgp-community new-format
!
ip prefix-list 1 description announcing routes to ISP
ip prefix-list 1 seq 5 permit 10.1.0.0/24 le 32
!
route-map bgp_community permit 10
match ip address prefix-list 1
set community 20:2 20:120 <---- sending BGP community String
!
line con 0
line aux 0
line vty 0 4
login
!
end

[PE / ISP Cisco Router]
Current configuration:
!
version 12.x
!
hostname PE
!
!
interface Serial0
description to ISP
ip address 12.1.3.2 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
no fair-queue
!
interface Serial1
no ip mroute-cache
no ip directed-broadcast
shutdown
!
router bgp 20
neighbor 12.1.3.1 remote-as 10 <---- Other side's ASN
neighbor 12.1.3.1 version 4
neighbor 12.1.3.1 default-originate <---- Sending default route to customer through BGP.
neighbor 12.1.3.1 route-map bgp_community in
neighbor 12.1.3.1 prefix-list 2 in

!
ip classless
ip bgp-community new-format
ip community-list 1 permit 20:1
ip community-list 2 permit 20:2
ip community-list 3 permit 20:3
ip community-list 4 permit 20:80
ip community-list 5 permit 20:120
!
ip prefix-list 2 description from customer or peer
ip prefix-list 2 seq 5 permit 10.1.0.0/24 le 32 <---- Accepting smaller block than /24
!
route-map bgp_community permit 10
match community 2 5
set as-patch prepend 20 20
set local-preference 120
!
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 8, local router ID is x.x.x.x
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 10.1.0.0/24 0.0.0.0 0 0 32768 ?
CPE#

PE#show ip bgp nei 12.1.3.1 ro
BBGP table version is 245, local router ID is x.x.x.x
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 10.1.0.0/24 12.1.3.1 0 120 20 20 10? <---- AS prepended two times

Total number of prefixes 1
CPE#show ip bgp neighbors 12.1.3.2 ro <---- Getting default route from ISP
BGP table version is 10, local router ID is x.x.x.x
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

Network NextHop Metric LocPrf Weight Path
*> 0.0.0.0 12.1.3.2 0 20 i

Total number of prefixes 1
CPE#


If you have any questions, feel free to send email us at contactus@showipbgp.com. 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.

]]>
contactus@showipbgp.com (Administrator) Cisco Wed, 09 Apr 2008 20:44:27 +0000
1-6-1. Cisco Single BGP with Multi-hop http://showipbgp.com/bgp-configurations/40-cisco/69-1-6-1-cisco-single-bgp-with-multi-hop.html http://showipbgp.com/bgp-configurations/40-cisco/69-1-6-1-cisco-single-bgp-with-multi-hop.html Cisco Single BGP with Multi-hop
   
  • ISPs : 1
  • WAN links : 1
  • CPE : 1
  • PE : 1
  • Device : Cisco router with LAN/WAN ports.
  • WAN / Serial IP : 12.1.3.0/30 (mask 255.255.255.252)
  • LAN / Ethernet IP : 10.1.0.0/24 (mask 255.255.255.0)
  • Receiving Route : Default route + full route from ISP
  • Memory : Full route(recommend 512M), partial route
    (recommend 128-256M)
  • LAN : ISP (AS20) and Customer (AS10)
  • Comments: If you have only single link with ISP, you don't really need BGP protocol at all. Better to use just default route to save even bandwidth. Consult with professionals if really need it. This article is shown for educational purpose.

BGP sample configuration 1-6-1

[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
no ip directed-broadcast
no ip mroute-cache
!
interface Serial0
description to ISP
ip address 12.1.3.1 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
no fair-queue
!
interface Loopback 0
ip address 1.1.1.1 255.255.255.255 
no ip mroute-cache
no ip directed-broadcast
!
router bgp 10
no auto-summary
network 10.1.0.0 mask 255.255.255.0
neighbor 3.3.3.3 remote-as 20 <---- ISP's ASN
neighbor 3.3.3.3 version 4
neighbor 3.3.3.3 ebgp-multihop 2
neighbor 3.3.3.3 update-source loopback0
!
ip classless
ip route 3.3.3.3 255.255.255.255 12.1.3.2
!
line con 0
line aux 0
line vty 0 4
login
!
end
[PE / ISP Cisco Router]
Current configuration:
!
version 12.x
!
hostname PE
!
!
interface Serial0
description to ISP
ip address 12.1.3.2 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
no fair-queue
!
interface Loopback 0
ip address 3.3.3.3 255.255.255.255 
no ip mroute-cache
no ip directed-broadcast
!
router bgp 20
neighbor 1.1.1.1 remote-as 10 <---- Other side's ASN
neighbor 1.1.1.1 version 4
neighbor 1.1.1.1 default-originate <---- Sending default route to customer through BGP.
neighbor 1.1.1.1 ebgp-multihop 2
neighbor 1.1.1.1 update-source loopback0
neighbor 1.1.1.1 prefix-list 2 in
!
ip classless
!
ip route 1.1.1.1 255.255.255.255 12.1.3.1 
!
ip prefix-list 2 description from customer or peer
ip prefix-list 2 seq 5 permit 10.1.0.0/24 le 32 <---- Accepting smaller block than /24
!
line con 0
line aux 0
line vty 0 4
login
!
end

 [Verifing output]

CPE# show ip bgp neighbors 3.3.3.3 ad
BGP table version is 8, local router ID is x.x.x.x
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 10.1.0.0/24 0.0.0.0 0 0 32768 ?
CPE#

PE#show ip bgp nei 1.1.1.1 ro
BBGP table version is 245, local router ID is x.x.x.x
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 10.1.0.0/24 1.1.1.1 0 10 ?

Total number of prefixes 1
CPE#show ip bgp neighbors 3.3.3.3 ro
BGP table version is 10, local router ID is x.x.x.x
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

Network NextHop Metric LocPrf Weight Path
*> 0.0.0.0 3.3.3.3 0 20 i

Total number of prefixes 1
CPE#

 If you have any questions, feel free to send email us at contactus@showipbgp.com. 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.

]]>
contactus@showipbgp.com (Administrator) Cisco Wed, 09 Apr 2008 20:44:27 +0000