Home arrow Routing arrow Cisco BGP Configuration arrow BGP sample configuration Case 1-4

Google Translation


Login Form






Lost Password?
No account yet? Register

Advertisements


Who's Online

BGP sample configuration Case 1-4 PDF Print E-mail
Written by cisconet   

Here is a sample eBGP configuration with Community String option for someone has a single connection with an ISP or remote site. This article will show how to apply BGP Community String option on your router. If you want to see more complex examples(with multiple ISP connections), check a list of BGP sample configuration page. This configuration has been tested and verified at our lab. If you have any questions and problems, try our web BGP tutorial page first. And If you still need further assistance, please feel free to contact us by email or use our Forum.cisconet.com



list of BGP sample configurations

► Basic eBGP configuration with Community String




[Assumption]

1. Device : Cisco router with LAN/WAN ports
2.
IOS version : Latest or at least BGP support
3. WAN encapsulation : HDLC
4. WAN / Serial IP : 1.1.1.1/30 (mask 255.255.255.252) - assumed public IP here.
5. LAN / Ethernet IP : 10.10.10.1/24 (mask 255.255.255.0) - assumed public IP here.
6. Receiving route : Default route + full route from ISP
7. Memory : Full route(recommend 512M), partial route(recommend 128-256M)
8. ASN : If you don't have one, then apply one.
US(ARIN.com), ASIA(APNIC.com), Europe(RIPE.net) and South America(Lacnic.net)
If your all upstream connections are subscribed with only one ISP, contact the ISP to rent free ASN. Again, you won't use the rental ANS for other ISP connection.
9. IGP : None
10. Community String : AS prepending(200:1 = 200, 200:3=200 200, 200:3=200 200 200)
Localpref ( 200:80 = Local pref 80, 200:120 = Local pref 120)







[Router 1/Customer]

Current configuration:
!
version 12.x
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
service udp-small-servers
service tcp-small-servers
!
hostname Router1
!
enable secret 5 Pl$fwmRs8ofaCCvLxf$VG/
!
ip subnet-zero
ip name-server x.x.x.x
ip name-server y.y.y.y
!
interface Ethernet0
description to Internal network
ip address 10.10.10.1 255.255.255.0
no ip directed-broadcast
no ip mroute-cache
!
interface Serial0
description to ISP
ip address 1.1.1.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 100
no auto-summary
redistribute connected
neighbor 1.1.1.2 remote-as 200 <---- ISP's ASN

neighbor 1.1.1.2 version 4
neighbor 1.1.1.2 send-community
neighbor 1.1.1.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.10.10.0/24 le 32
!
route-map bgp_community permit 10
match ip address prefix-list 1
set community 200:2 200:120 <---- sending BGP community String
!
line con 0
line aux 0
line vty 0 4
login
!
end


[Router 2/ISP]

Current configuration:
!
version 12.x
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
service udp-small-servers
service tcp-small-servers
!
hostname Router2
!
enable secret 5 Pl$RwwQMKXmRLxX$1$VG/
!
ip subnet-zero
ip name-server x.x.x.x
ip name-server y.y.y.y
!
interface POS1/0
description to Uplink
ip address x.x.x.x 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
!
:
:
:
!
interface Serial0
description to ISP
ip address 1.1.1.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 200
neighbor 1.1.1.1 remote-as 100 <---- 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 route-map bgp_community in
neighbor 1.1.1.1 prefix-list 2 in

!
ip classless
ip bgp-community new-format
ip community-list 1 permit 200:1
ip community-list 2 permit 200:2
ip community-list 3 permit 200:3
ip community-list 4 permit 200:80
ip community-list 5 permit 200:120
!

ip prefix-list 2 description from customer or peer
ip prefix-list 2 seq 5 permit 10.10.10.0/24 le 32 <---- Accepting smaller block than /24
!
route-map bgp_community permit 10
match community 2 5
set as-patch prepend 200 200
set local-preference 120
!
line con 0
line aux 0
line vty 0 4
login
!
end


[Verified]

Router1# sh ip bgp neighbors 1.1.1.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.10.10.0/24 0.0.0.0 0 0 32768 ?
Router1#

Router2#sh 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.10.10.0/24 1.1.1.1 0 120 200 200 100? <---- AS prepended two times

Total number of prefixes 1

Router1#sh ip bgp neighbors 1.1.1.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 1.1.1.2 0 200 i

Total number of prefixes 1
Router1#




If you have any questions and problems, try our web BGP tutorial page first. And If you still need further assistance, please feel free to contact us by email or use our Forum.cisconet.com





Do you think this article help you ?

Does it make your life easier today ?
Would you buy me coffee ? click coffee icon, thanks





Add as favourites (22) | Views: 437 | E-mail

  Be first to comment this article
RSS comments

Write Comment
  • Please keep the topic of messages relevant to the subject of the article.
  • Personal verbal attacks will be deleted.
  • Please don't use comments to plug your web site. Such material will be removed.
  • Just ensure to *Refresh* your browser for a new security code to be displayed prior to clicking on the 'Send' button.
  • Keep in mind that the above process only applies if you simply entered the wrong security code.
Name:
E-mail
Title:
BBCode:Web AddressEmail AddressBold TextItalic TextUnderlined TextQuoteCodeOpen ListList ItemClose List
Comment:



Code:* Code

Powered by AkoComment Tweaked Special Edition v.1.4.3







Please share this article with ;
Reddit!Del.icio.us!Google!Live!Facebook!Slashdot!Netscape!Technorati!StumbleUpon!Spurl!Wists!Simpy!Newsvine!Blinklist!Fark!Yahoo!Netvouz!RawSugar!Ma.gnolia!Squidoo!Free social bookmarking plugins and extensions for Joomla! websites!
 
< Prev   Next >

Sponsored Links


Sponsor II


What's your IP?

You are connecting to this site from: 38.103.63.16