BGP - Filtering AS confederation

From: gladston@br.ibm.com
Date: Tue Apr 26 2005 - 12:28:01 GMT-3


How can I match just a confederation AS whith regular expression?

R3#sh ip bgp reg

   Network Next Hop Metric LocPrf Weight Path
*> 65.2.1.0/24 142.20.6.1 0 100 0 (65202 65206) 254 i
*> 65.2.2.0/24 142.20.6.1 0 100 0 (65202 65206) 254 i
*> 65.2.3.0/24 142.20.6.1 0 100 0 (65202 65206) 254 i
*> 65.2.4.0/24 142.20.6.1 0 100 0 (65202 65206) 254 i
*> 65.2.5.0/24 142.20.6.1 0 100 0 (65202 65206) 254 i
*> 200.200.1.0 142.20.125.1 0 100 0 (65202) i
R3#
R3#sh ip bgp regexp 65202$

Rack2R3#sh ip bgp regexp ^65202

What I am trying to achieve is to send just routes with empty AS to external neighbor 150.100.20.254,
using filter-list.

Should be the only solution to specify the internal ASs? (ip as-path access-list 60 permit 65202)

If I use ^$ the internal routes received from confederation peers are not allowed:

R3#sibs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
142.20.23.2 4 65202 197 189 48 0 0 02:51:19 2
150.100.20.254 4 254 189 189 48 0 0 02:48:47 13

R3#sh ip bgp ne 150.100.20.254 ad

   Network Next Hop Metric LocPrf Weight Path
*> 66.66.66.0/24 142.20.6.1 0 100 0 (65202 65206) i
*> 200.200.1.0 142.20.125.1 0 100 0 (65202) i

R3#conf t

R3(config)#ip as-path access-list 60 permit ^$
R3(config)#router bgp 65203
R3(config-router)#nei
R3(config-router)#neighbor 150.100.20.254 fi
R3(config-router)#neighbor 150.100.20.254 filter-list 60 out
R3(config-router)#neighbor 150.100.20.254 filter-list 60 out
R3(config-router)#^Z

R3#clear ip bgp * so
R3#sh ip bgp ne 150.100.20.254 ad

R3#sh ip bgp ne 150.100.20.254 ad



This archive was generated by hypermail 2.1.4 : Tue May 03 2005 - 07:55:09 GMT-3