cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2815
Views
0
Helpful
5
Replies

bgp sample config

rajeshk200_2
Level 1
Level 1

Hi all,

can anybody give sample bgp config for.

two routers (linked thro internal thro wan connection) with two diffrent ISP .

Regards,

Rajesh

5 Replies 5

vladrac-ccna
Level 5
Level 5

sean
Level 3
Level 3

These configs are based off of dedicated Internet routers with iBGP peers to an internal router.

Connection for ISP A:

router bgp 65001

no synchronization

bgp log-neighbor-changes

network 10.0.0.0 mask 255.255.255.0

network 10.20.0.0 mask 255.255.255.0

neighbor 1.1.1.1 remote-as 65003

neighbor 1.1.1.1 description [ISP-A]

neighbor 1.1.1.1 filter-list 1 out

neighbor 10.0.0.2 remote-as 65001

neighbor 10.0.0.2 description [Internal-Router]

neighbor 10.0.0.2 update-source Loopback0

neighbor 10.0.0.2 next-hop-self

no auto-summary

ip as-path access-list 1 permit ^$

ip as-path access-list 1 deny .*

Connection for ISP B:

router bgp 65001

no synchronization

bgp log-neighbor-changes

network 10.0.0.0 mask 255.255.255.0

network 10.20.0.0 mask 255.255.255.0

neighbor 2.2.2.1 remote-as 65004

neighbor 2.2.2.1 description [ISP-B]

neighbor 2.2.2.1 filter-list 1 out

neighbor 10.0.0.2 remote-as 65001

neighbor 10.0.0.2 description [Internal-Router]

neighbor 10.0.0.2 update-source Loopback0

neighbor 10.0.0.2 next-hop-self

no auto-summary

ip as-path access-list 1 permit ^$

ip as-path access-list 1 deny .*

Internal router connection to each Internet router:

router bgp 65001

no synchronization

bgp log-neighbor-changes

neighbor 10.0.0.1 remote-as 65001

neighbor 10.0.0.1 description [Internet-Router-A]

neighbor 10.0.0.1 update-source Loopback0

neighbor 10.0.0.1 next-hop-self

neighbor 10.0.0.3 remote-as 65001

neighbor 10.0.0.3 description [Internet-Router-B]

neighbor 10.0.0.3 update-source Loopback0

neighbor 10.0.0.3 next-hop-self

no auto-summary

Hope this helps.

hi Sean,

Thanks for the response...is this config work if i have no direct link between two internet routers.

Is it mandatory to run ibgp session on internal router to internet routers?

u r using private AS Number ...with private AS # can we connect two different service providers?

Regards Rajesh

hello Rajesh,

You can run IBGP even if the internal router doesnt have direct link, as long as you have any IGP running.

Its not mandatory to run IBGP between the 2 routers.

And yes you can use private AS with no problems as the ISP can strip this information on its routers.

HTH,

please remember to rate helpful posts.

Vlad

sean
Level 3
Level 3

This was just an example. Instead of an iBGP peer between the two Internet routers, there are iBGP peers passing into an internal router (for redundancy, you could use two). This is overkill for some networks, but allows for more modularity and scalability in the network. Also allows for a central location for BGP to choose the best path based on both peers.

The use of iBGP is to pass the full internet tables into the internal device. This can only be done with BGP as no other protocol can handle that many routes.

I used private AS numbers as an example. For your config, you would need to use your ASN. If you do not have one, you can look at the requirements of obtaining one from (assuming you are in north america) http://www.arin.net Seems how you are trying to multi-home, you qualify for one as long as you have provider independent address space. Hope this helps. Let me know if you have anymore questions.