Home Routing BGP Cisco BGP Configuration BGP sample configuration Case 2-1

Here is a sample EBGP configuration for someone who has two connections with an ISP or remote site. It is a called multihoming / multi-hop EBGP. 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.

 

"List of BGP Sample Configurations"


[Assumption]

1. Device : LAN/WAN ports for BGP.
2. WAN encapsulation : HDLC
3. WAN : 1.1.1.1/30 (mask 255.255.255.252) - assumed public IP here.
Router 1 / Serial 0 = 1.1.1.1/30
Router 1 / Serial 1 = 2.2.2.1/30
Router 1 / Loopback 0 = 3.3.3.3/32
Router 2 / Serial 0 = 1.1.1.2/30
Router 2 / Serial 1 = 2.2.2.2/30
Router 2 / Loopback 0 = 4.4.4.4/32
4. LAN / Ethernet IP : 10.10.10.1/24 (255.255.255.0) - assumed public IP here.
5. Receiving route : Full route from ISP or if partial route, set default route
6. IOS version : Latest and supporting BGP
7. Memory : Full route(recommend 512M), partial route(recommend 128-256M)
8. IGP : None

 






[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$RwwQMKXmRs8oFcaCCvLxX$1$VG/
!
ip subnet-zero
ip name-server x.x.x.x
ip name-server y.y.y.y
!
interface Loopback0
description to Loopback for BGP
ip address 3.3.3.3 255.255.255.255
no ip directed-broadcast
no ip mroute-cache
!
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 A - Line1
ip address 1.1.1.1 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
no fair-queue
!
interface Serial1
description to ISP A - Line2
ip address 2.2.2.1 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
no fair-queue
!
router bgp 100
no auto-summary
neighbor 4.4.4.4 remote-as 200
neighbor 4.4.4.4 version 4
neighbor 4.4.4.4 ebgp-multihop 2
neighbor 4.4.4.4 update-source loopback0
neighbor 4.4.4.4 prefix-list 1 out

!
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0 <----- Default route, if partial routes are receiving from ISP
or you can request ISP to send one thru BGP.
ip route 4.4.4.4 255.255.255.255 Serial0
ip route 4.4.4.4 255.255.255.255 Serial1
!
ip prefix-list 1 description to ISP
ip prefix-list 1 seq 5 permit 10.10.10.0/24 le 32
!
line con 0
line aux 0
line vty 0 4
login
!
end


[Router 2/ ISP]

CCurrent 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$RwwQMKXmRs8oFcaCCvLxX$1$VG/
!
ip subnet-zero
ip name-server x.x.x.x
ip name-server y.y.y.y
ip name-server z.z.z.z
!
interface Loopback0
description to Loopback for BGP
ip address 4.4.4.4 255.255.255.255
no ip directed-broadcast
no ip mroute-cache
!
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 customer's line 1
ip address 1.1.1.2 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
no fair-queue
!
interface Serial1
description to customer's line 2
ip address 2.2.2.2 255.255.255.252
no ip mroute-cache
no ip directed-broadcast
no fair-queue
!
router bgp 200
no auto-summary
neighbor 3.3.3.3 remote-as 100
neighbor 3.3.3.3 version 4
neighbor 3.3.3.3 ebgp-multihop 2
neighbor 3.3.3.3 update-source loopback0
neighbor 3.3.3.3 default-originate <--- If customer request to send a default route
neighbor 3.3.3.3 prefix-list 1 in
!
ip classless
ip route 3.3.3.3 255.255.255.255 Serial0
ip route 3.3.3.3 255.255.255.255 Serial1

!
ip prefix-list 2 description from customer or peer
ip prefix-list 2 seq 5 permit 10.10.10.0/24 le 32
!
!
line con 0
line aux 0
line vty 0 4
login
!
end


[Verified]


Router5#sh ip bgp nei 4.4.4.4 ad
BGP table version is 15, local router ID is 3.3.3.3
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 32768 ?
Router5#


Router6#sh ip bgp neighbors 3.3.3.3 ro
BGP table version is 19, local router ID is 4.4.4.4
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 3.3.3.3 0 0 100 ?

Total number of prefixes 1
Router6#



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.

 

Last Updated (Monday, 18 May 2009 21:09)

 
Smart Link
Search
Statistics
Content View Hits : 2152062
Polls
Highly recommended firewall vendor?
 
Google Translation
English Arabic Chinese (Simplified) Czech Dutch French German Italian Korean Portuguese Russian Spanish Filipino Vietnamese Thai Turkish
BGP routing issue?
Banner
World Route Servers
Banner
Who's Online
We have 70 guests online