FAQ-How does S9300 filtrate route according to BGP protocol AS-PATH attribute
1、Topology: exterior cloud network－－EBGP－－NE80E-----IBGP-----S9300
2、Required：exterior cloud network contains telecom, railwaycom and netcom router that releasing to s9300，s9300 received the telecom route，did not receive other route.
(telcom AS－Number=X ,other route AS－Number＝Y)
1)it can query BGP route taking AS number according the following command, then filtrate according to route taking as number.
dis bgp routing-table
Total Number of Routes: 1
BGP Local router ID is 220.127.116.11
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 18.104.22.168/32 22.214.171.124 0 0 X i
2)the following configuration only permits BGP with AS X route receiving，refuse others
ip as-path-filter 2 permit ^X
route-policy hwtest permit node 10
if-match as-path-filter 2
peer 126.96.36.199 as-number *
peer 188.8.131.52 enable
peer 184.108.40.206 route-policy hwtest import
1、Route policy default match way is deny, so others that did not match defaultly pass thrugh.
2、This kind of problem should flexibly exert regular expression.