[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|
- 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.
|
Powered by AkoComment Tweaked Special Edition v.1.4.3