SAMPLE ROUTE MAPS
INBOUND CUSTOMER POLICY
route-map customer deny 20
match as-path 66
!
route-map customer deny 30
match ip address prefix-list badlength-customer
!
route-map customer deny 40
match ip address prefix-list martians
!
route-map customer permit 70
match community 70
set local-preference 70
set community 3356:3 3356:123 3356:575 3356:2011 additive
!
route-map customer permit 80
match community 80
set local-preference 80
set community 3356:3 3356:123 3356:575 3356:2011 additive
!
route-map customer permit 90
match community 90
set local-preference 90
set community 3356:3 3356:123 3356:575 3356:2011 additive
!
route-map customer permit 100
match ip address prefix-list any
set local-preference 100
set community 3356:3 3356:123 3356:575 3356:2011 additive
OUTBOUND CUSTOMER POLICY
route-map send-full-routes deny 10
match ip address prefix-list badlength
!
route-map send-full-routes deny 20
match ip address prefix-list martians
!
route-map send-full-routes deny 30
match ip address prefix-list holes-specifics
!
route-map send-full-routes deny 40
match ip address prefix-list holes
match as-path 33
!
route-map send-full-routes permit 50
match ip address prefix-list any
set metric 0
INBOUND PEER POLICY
route-map peer-86 deny 10
match as-path 66
!
route-map peer-86 deny 20
match ip address prefix-list badlength
!
route-map peer-86 deny 30
match ip address prefix-list martians
!
route-map peer-86 deny 40
match ip address prefix-list holes-specifics
!
route-map peer-86 permit 60
set metric 100000
set local-preference 86
set community 3356:3 3356:575 3356:666 3356:2011 3356:2500 additive
OUTBOUND PEER POLICY
route-map send-peer-routes deny 10
match as-path 10
!
route-map send-peer-routes deny 20
match ip address prefix-list badlength
!
route-map send-peer-routes deny 30
match ip address prefix-list martians
!
route-map send-peer-routes deny 40
match ip address prefix-list holes-specifics
!
route-map send-peer-routes deny 50
match ip address prefix-list holes
match as-path 33
!
route-map send-peer-routes permit 60
match community customers
set metric 0
!
route-map send-routes deny 70
match ip address prefix-list any
SUPPORTING STUFF
ip as-path access-list 66 permit (_6451[2-9]_|_645[2-9][0-9]_|_64[6-9][0-9][0-9]_|_65[0-9][0-9][0-9]_)
ip as-path access-list 66 deny .*
ip prefix-list badlength-customer description match too-long or too-short prefixes
ip prefix-list badlength-customer seq 5 permit 0.0.0.0/0 le 7
ip prefix-list badlength-customer seq 10 deny 0.0.0.0/0 le 32
ip prefix-list martians description match reserved nets
ip prefix-list martians seq 5 permit 0.0.0.0/7 le 32
ip prefix-list martians seq 10 permit 2.0.0.0/8 le 32
ip prefix-list martians seq 15 permit 10.0.0.0/8 le 32
ip prefix-list martians seq 20 permit 172.16.0.0/12 le 32
ip prefix-list martians seq 25 permit 192.168.0.0/16 le 32
ip prefix-list martians seq 30 permit 223.0.0.0/8 le 32
ip prefix-list martians seq 35 deny 0.0.0.0/0 le 32
ip prefix-list holes description multihomed address space
ip prefix-list holes seq 5 permit 8.2.0.0/24
ip prefix-list holes seq 10 permit 8.2.1.0/24
ip prefix-list holes seq 15 permit 8.2.2.0/23
ip prefix-list holes seq 20 deny 0.0.0.0/0 le 32
!
ip prefix-list holes-specifics description multihomed address space and specifics
ip prefix-list holes-specifics seq 5 deny 8.2.0.0/24
ip prefix-list holes-specifics seq 10 deny 8.2.1.0/24
ip prefix-list holes-specifics seq 15 deny 8.2.2.0/23
ip prefix-list holes-specifics seq 20 permit 8.0.0.0/8 ge 10
ip community-list standard customers permit 3356:123
ip community-list standard customers deny
ip community-list expanded martians permit (3356|9057|9225):[256].*
ip community-list expanded martians permit (3356|9057|9225):[134789]$
ip community-list expanded martians permit (3356|9057|9225):1[0-9][0-9][0-9]+
ip community-list expanded martians deny .*
ip prefix-list any description match everything
ip prefix-list any seq 5 permit 0.0.0.0/0 le 32
WHAT DOES A SESSION LOOK LIKE?
neighbor a.b.c.d remote-as XXXX
neighbor a.b.c.d remove-private-AS
neighbor a.b.c.d soft-reconfiguration inbound
neighbor a.b.c.d prefix-list peer-a.b.c.d in
neighbor a.b.c.d route-map customer in
neighbor a.b.c.d route-map send-full-routes out
neighbor a.b.c.d maximum-prefix 200 90
REGULAR EXPRESSIONS
^ - anchor (start)
$ - tail (stop)
* - wildcard
REGULAR EXPRESSION EXAMPLES
^1239$
^1239_.*
_1239_
^1239_([0-9]+)$
^1239_([0-9]+)_.*