Friday, August 6, 2010

BGP Basics

I have long admitted that I am not a BGP expert and so I will try my best get better with it over the course of the next few blogs related to configuration and redistribution.

• The example I am working with today is a very basic setup with an ISP router and three routers inside what we will call the acme.com network. The ISP router is in AS 64004 and has a default route which it will be advertising into R1 at acme. The R1 router will be running BGP AS 64001 and the two will be defined as neighbors.




Here is what is needed to make this work:

ISP#
!
router bgp 64004
neighbor 10.10.1.1 remote-as 64001

R1#
!
router bgp 64001
neighbor 10.10.1.2 remote-as 64004

• With that basic information entered in we should see the neighbors form and a "show ip bgp summary" on the ISP router will show you this:



• The next part of this is to get the networks that connect from R1 to R2 and R3 (192.168.2.0/24 and 192.168.3.0/24) advertised to the ISP router. First we need to get them into OSPF and this is what needs to be placed into R1, R2, and R3:

Rx#
!
router ospf 1
log-adjacency-changes
network [IP of the loopback interface of the router] area 0
network 192.168.0.0 0.0.3.255 area 0

This will get you adjacency between all three routers. Something like this (shown from R3's perspective):



• Now on the R1 router we add in the network statements under the BGP process for the 192.168.2.0 and 192.168.3.0 networks

R1#
!
router bgp 64001
network 192.168.2.0
network 192.168.3.0
!

The ISP router should now see the two networks:

ISP# show ip route
!
B 192.168.2.0/24 [20/0] via 10.10.1.1, 00:00:21
B 192.168.3.0/24 [20/0] via 10.10.1.1, 00:00:22

• Now lets create a default route on the ISP router (in this case to null 0)

ISP#
!
ip route 0.0.0.0 0.0.0.0 Null0

• Now lets advertise that route to our neighbor R1 at 10.10.1.1

ISP#
!
router bgp 64004
neighbor 10.10.1.1 default-originate

On the R1 router we now see the a default route learned via BGP

R1# show ip route
!
B* 0.0.0.0/0 [20/0] via 10.10.1.2, 03:07:04

• This is the final result. A very simple network design that we will continue to modify over the next few blogs:

No comments:

Post a Comment