[c-nsp] BGP Config

Michael K. Smith - Adhost mksmith at adhost.com
Mon May 18 17:21:29 EDT 2009


Hello:
 
> -----Original Message-----
> From: cisco-nsp-bounces at puck.nether.net [mailto:cisco-nsp-
> bounces at puck.nether.net] On Behalf Of Alain Camille
> Sent: Monday, May 18, 2009 1:43 PM
> To: cisco-nsp at puck.nether.net
> Subject: [c-nsp] BGP Config
> 
> 
> 
> 
> 
> My ISP will be maintaining the BGP configuration for my organization..
> I need a minimal BGP configuration on my core device that will allow
> connectivity to the ISP. Looking for some direction. Thanks.

! Set a route-map for accepting all routes based on as-path access-list
1
route-map TRANSIT-IN permit 10
 match-as path 1

! Set a route-map for sending local-only based on as-path access-list 2
route-map TRANSIT-OUT permit 10
 match as-path 2

! Regexp for accept all routes
ip as-path access-list 1 permit .*

! Regexp for local-only routes
ip as-path access-list 2 permit ^$

! Tie-down route so that your network statement gets announced
ip route <the route you're are going to announce> <the subnet of that
route> null0 250

router bgp <you're as>
 network <the route you are going to announce>
 bgp router-id <your router's interface IP>
 bgp log-neighbor-changes
 no auto-summary
 no synchronization
 neighbor <your upstream's IP address> remote-as <their AS>
 neighbor <your upstream's IP address> route-map TRANSIT-IN in
 neighbor <your upstream's IP address> route-map TRANSIT-OUT out


With bogus entries, it would look like:

Your Network: 192.168.0.0/16
Your AS: 65535
Your Router Interface IP: 10.0.0.2
Your Transit Provider's IP: 10.0.0.1
Your Transit Provider's AS: 65536

route-map TRANSIT-IN permit 10
 match-as path 1

route-map TRANSIT-OUT permit 10
 match as-path 2

ip as-path access-list 1 permit .*
ip as-path access-list 2 permit ^$

ip route 192.168.0.0 255.255.0.0 null0 250

router bgp 65535
 network <the route you are going to announce>
 bgp router-id 10.0.0.2
 bgp log-neighbor-changes
 bgp scan-time 60
 no auto-summary
 no synchronization
 neighbor 10.0.0.1 remote-as 65536
 neighbor 10.0.0.1 route-map TRANSIT-IN in
 neighbor 10.0.0.1 route-map TRANSIT-OUT out

Note: if you're provider sends you a default-only route, your .* will be
only that.  If they send you a full table it will be +/- 280,000 routes.

Regards,

Mike


More information about the cisco-nsp mailing list