Question 11
Choose 1
You are writing an RPL script to accept routes only from certain autonomous systems
Consider this code.

If you apply this code to BGP filters, which effect does the code have on your router?
Consider this code.

If you apply this code to BGP filters, which effect does the code have on your router?
Correct answer:
B. allows routes from AS 7077
Explanation
The correct answer is B. allows routes from AS 7077.
Exhibit mein RPL (Routing Policy Language) code dekhein:
text
if as-path in (ios-regex '.*77$') then
pass
endif
svgsvg
Is code ka matlab hai: agar AS path `.*77$` regex se match kare, to route ko pass (allow) karo.
Regex `.*77$` ko break down karein:
- `.*` → koi bhi characters (zero ya zyada)
- `77` → literal "77" characters
- `$` → string ka end
Matlab ye regex un AS paths se match karega jo "77" par khatam hote hain. Is liye AS 7077 ka AS path "7077" hai jo "77" par end hota hai — is liye ye route allow hoga.
Why the Other Options Are Incorrect
A. denies routes from AS 7070. – AS 7070 "70" par end hota hai, "77" par nahi. Is liye ye regex se match nahi karega aur is code ka effect deny nahi hoga (default behavior alag ho sakta hai, lekin ye code specifically deny nahi karta).
C. denies routes from AS 7007. – AS 7007 "07" par end hota hai, "77" par nahi. Is liye ye regex se match nahi karega.
D. allows routes from AS 770. – AS 770 "770" par end hota hai, "77" par nahi. Regex `.*77$` ko "770" match nahi karega kyunki `$` ke baad kuch nahi aana chahiye. Is liye ye allow nahi hoga.
Reference
- Cisco Press: Implementing and Operating Cisco Service Provider Network Core Technologies (SPCOR) 350-501 Official Cert Guide – Chapter on RPL (Routing Policy Language) and AS-Path Regular Expressions.
The correct answer is B. allows routes from AS 7077.
Exhibit mein RPL (Routing Policy Language) code dekhein:
text
svgsvg
Is code ka matlab hai: agar AS path `.*77$` regex se match kare, to route ko pass (allow) karo.
Regex `.*77$` ko break down karein:
- `.*` → koi bhi characters (zero ya zyada)
- `77` → literal "77" characters
- `$` → string ka end
Matlab ye regex un AS paths se match karega jo "77" par khatam hote hain. Is liye AS 7077 ka AS path "7077" hai jo "77" par end hota hai — is liye ye route allow hoga.
Why the Other Options Are Incorrect
A. denies routes from AS 7070. – AS 7070 "70" par end hota hai, "77" par nahi. Is liye ye regex se match nahi karega aur is code ka effect deny nahi hoga (default behavior alag ho sakta hai, lekin ye code specifically deny nahi karta).
C. denies routes from AS 7007. – AS 7007 "07" par end hota hai, "77" par nahi. Is liye ye regex se match nahi karega.
D. allows routes from AS 770. – AS 770 "770" par end hota hai, "77" par nahi. Regex `.*77$` ko "770" match nahi karega kyunki `$` ke baad kuch nahi aana chahiye. Is liye ye allow nahi hoga.
Reference
- Cisco Press: Implementing and Operating Cisco Service Provider Network Core Technologies (SPCOR) 350-501 Official Cert Guide – Chapter on RPL (Routing Policy Language) and AS-Path Regular Expressions.









