INE-LAB, BGP Regular Expressions

Hello,
Could anybody tell me if my understanding is correct or not?

To configure R3 to meet the following task, I made following config.
"Configure R3 so that routes learned from AS 254 are not advertised to R1."

++++My config+++++++++++++++++++++++++++++++++++++
ip as-path access-list 254 permit ^254_
!
route-map TO_R1 deny 10
match as-path 254
!
route-map TO_R1 permit 100
!
router bgp 200
neighbor 155.1.13.1 route-map TO_R1 out
+++++++++++++++++++++++++++++++++++++++++

However, answer is as follows.

------Answer---------------------------------
ip as-path access-list 2 permit _254$
!
route-map TO_R1 deny 10
match as-path 2
!
route-map TO_R1 permit 100
!
router bgp 200

neighbor 155.1.13.1 route-map TO_R1 out

"254$" should mean route originated at AS254, isn't it?
Routes learned from AS 254 can be described as "^254
", I believe.

I know that in this particular case, "^254_", "254" and "_254$" can meet the task but it is because AS254 is directly connected.

Thanks in advance.

Sign In or Register to comment.