
Policy Based Routing Simulation Example
Company Acan has two links which can take it to the internet. The company policy demands that you allow web traffic only to be forwarded out the Frame Relay Link and all other traffic is permitted to utilize either link. No static or default routing is allowed.
(For the purpose of practice in a GNS3 environment utilize “echo” instead of “www” in your access list and just ping ISP2 from “Host_For_Testing” to verify accurate completion of task)

PenjelasanSemua trafik dari EIGRP network harus melewati Frame Relay dan trafik lainnya melewati link yang lainnya. Router yang bisa diutak-atik hanyalah Border Router, dari EIGRP network hanya bisa mengirimkan paket HTTP.
- Buat access-list untuk mengalihkan HTTP trafik
1BorderRouter(config)#access-list 101 permit tcp any any eq www
Server tidak langsung terkoneksi ke Border Router. Banyak hop diantaranya. Karena di ujian kita tidak tahu IP address servernya, gunakan “any” sebagai source agar dapat mencakup seluruh IP address.
- Buat route map yang mengeset next hop address ke ISP1 dan permit trafik lain
1234BorderRouter(config)#route-map pbr permit 10BorderRouter(config-route-map)#match ip address 101BorderRouter(config-route-map)#set ip next-hop 10.1.101.1BorderRouter(config-route-map)#exit
Tidak perlu mengeset route-map pbr permit 20, karena trafik yang tidak match akan tetap diroutingkan secara biasa (normal destination-based routing process). Referensi Cisco:
“If the packets do not meet any of the defined match criteria (that is, if the packets fall off the end of a route map), then those packets are routed through the normal destination-based routing process. If it is desired not to revert to normal forwarding and to drop the packets that do not match the specified criteria, then interface Null 0 should be specified as the last interface in the list by using the set clause.
- Apply route-map ke interface yang terhubung ke arah EIGRP network (interface fa0/0)
1234BorderRouter(config)#int fa0/0BorderRouter(config-if)#ip policy route-map pbrBorderRouter(config-if)#exitBorderRouter(config)#exit - Di Border Router cek packet yang terjaring oleh route-map
1BorderRouter#show route-map
Dari hasil output route-map bisa terlihat berapa jumlah paket yang di-generate, dan berapa yang bisa “ditangkap” oleh route-map tersebut.