Wednesday, February 25, 2009

BGP..Better Get Practicing...

I'm slowly making my way through the Soup-to-Nuts E-Workbook. I am probably half-way through the book and I cannot say enough good things about it - especially after doing the BGP mini labs. See, I know the BGP basics and I've worked with BGP for sometime. Er, I should say - eBGP. So beyond the basics of setting up a peering session with an eBGP peer, I was pretty much clueless. The Soup-to-Nuts (StN) workbook goes through about 15 BGP scenarios covering everything from AS path filtering, to route reflectors, to regular expressions and more. Narbik takes a simple approach in showing you BASIC scenarios so you can understand and see how each feature works. Once you know and understand how something works, you can apply that knowledge to more difficult situations such as the CCIE lab.

Anyway...I wanted to post up my BGP related notes before I move on to the QoS section of the workbook.

  • "network x mask y backdoor" will assign an AD of 200 to bgp routes so that the configured router would prefer any available IGP routes first.
  • advertise-map is the name of a route-map to advertise if the condition of the exist/non-exist route-map are met.
  • as-set will remove atomic aggregate. An atomic aggregate route can lose important information such as the AS path.
  • You can use BGP communities much like tags. Within a route-map, you can "set community x" on the advertising router. On the receiving router, you can "match community x" and do things such as "set ip next-hop...."
  • ip community-list standard [name] permit [community] works like an ACL for communities
  • local-preference is propogated through the AS to prefer exit point from that AS
  • "bgp always-compare-med" enforces MED across all paths
  • "bgp bestpath as-path ignore" is a hidden feature that will force the router to look past the AS path as it's first rule for best-match and skip right to metric.
  • "_AS$" where AS = AS Number is the regexp to match originating prefix.
  • filter-list filters on as-path acl. (neighbor 1.1.1.1 filter-list 1)
  • "_AS_" where AS = AS number is the regexp to match AS in path.
  • ".*" is the regexp for match-all.
  • "^$" matches self-originating prefix. (if your AS is 100, this would match paths with an origin of AS 100)
  • "^AS$" where AS = AS number, is the regexp to match AS from neighbor ( ^200$ would match routes originated from bgp neighbor with an AS of 200).
  • "bgp regex deterministic" disabled recursive algorithym when processing regular expressions.
  • "neighbor x advertisement-interval y" sets the minimum advertisement interval of y for neighbor x.
  • You can use replace-as within a local-as command (neighbor 1.1.1.1 local-as 300 no-prepend replace-as"
  • no-prepend does NOT place the configured AS (say, router bgp 300) into the bgp path when using local-as.
  • "bgp maxas-limit x" limits the number of AS in the path of each prefix where x is the number of paths.
  • You can use a route-map with "..default-originate" command for conditional advertisements. (don't use an advertise-map - it doesn't work!)
  • You can set the distance per peer as well as per route.
    distance x y z - where x is distance value, y is source IP and z is IP mask. For example - distance 150 1.1.1.1 0.0.0.0 will set a distance of 150 for ALL routes from neighbor 1.1.1.1.
  • To set distance per neighbor and per route.
    access-list 3 permit 150.1.1.0 0.0.0.255 - create ACL to match which routes you want to alter AD for.
    distance 132.1.1.1 0.0.0.0 3 - will set a distance of 150 for 150.1.1.1 coming from neighbor 132.1.1.1. If you couldn't tell, you could also set the distance of certain routes for all neighbors using the correct wildcard mask.
Well, that is it for now. I may actually revisit the BGP section of the workbook at some point later. If I have trouble with practice labs and BGP, I will definitely use this workbook.

Well, back to studying. It's time for QoS!

No comments:

Post a Comment