Home BGP Configurations Cisco 1-5-1. Cisco Single BGP with Community String

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 This e-mail address is being protected from spambots. You need JavaScript enabled to view it . 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.

 
Google Translation
English Arabic Chinese (Simplified) Czech Dutch French German Italian Korean Portuguese Russian Spanish Filipino Vietnamese Thai Turkish
Statistics
Content View Hits : 534607
Polls
Who is the best ISP?
 
Global Route Table
Banner
Who's Online
We have 87 guests online
Related Items