BGP sample configuration Case 1-1

Here is a sample eBGP configuration with default route option for someone has a single connection with an ISP or remote site. 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.

What is the benefits from it? also what situation we can use it ?

  • If you have only one ISP connection; you don’t have to receive all the routes. It just require more memory one our router and make high CPU on CPE

  • If you have low memory on your CPE

  • If you are using Ethernet, you don’t want to use static route. B/C most of Ethernet type of ISP links are connected Layer 2 switch at somewhere near your location. Meaning if an outage is occured beyond the swith your Ethernet interface won’t be down. So, your Ethernet interface would be up/up while ISP link is having an outage. By default route statement. Your router will keep on sending traffic to the next hop.

 List of BGP Sample Configurations

 Basic eBGP configuration with default route

 

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

 

Router 1/Customer

Current configuration:
!
hostname Router1
!
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
!
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 prefix-list 1 out

!
ip classless
!
ip prefix-list 1 description announcing routes 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 A

Current configuration:
!
hostname Router2
!
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
!
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 prefix-list 2 in
!
ip classless
!
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
!
line con 0
line aux 0
line vty 0 4
login
!
end

Verifing output

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 32768 ?
Router1#

Router1#sh ip bgp nei 1.1.1.12 ro
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
*> 0.0.0.0/24 1.1.1.2 0 0 200 ?

Total number of prefixes 1

Router2#sh ip bgp nei 1.1.1.1 ro
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 1.1.1.1 0 0 100 ?

Total number of prefixes 1

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.

 

Leave a Reply