When a Packet arrive on the interface of a router the router take several logical decisions base on the data plane to process the packet.
The packet arrive encapsulated inside the data link frame , so the router check the incoming Frame Check Sequence ( FCS ) and discard the frame if errors occurred in transmission.
If the FCS passes the router discard the frame errors .It it passes the router discard the data link header and trailer leaving the layer 3 packet .
Then the router compare the destination IP address of the packet with the IP routing table matching the longest-prefix route that match the destination IP address.
Policy Base Routing overrides a router natural destination-base forwarding logic. PBR intercept the packet after deencapsulation on the incoming interface and before CEF performe the table look up .
PBR then choose how to forward the packet using different criteria.
PBR choose how to forward the packet using the logical logic defined through Route map , which refers to IP Access Control ACL. Then that same route map define the forwarding instruction.
The commands are :
Match ip address
Match length min max
Set ip next-hop
Set ip default next-hop
Set interface ” type number … ”
Set default interface “type number … ”
More detail example will be post later … for now just this is just a simple configuration .
1.Set an access-list
2.Create the polcicy
3.Apply the policy on the right interface(s)
4.Verify it
Example Configuration :
(config)#route-map “name_of_your_route_map” permit #
(config-route-map)#match ip address “ACL#”
(config-route-map)#set ip next-hop “address”
(config-if)#ip policy route-map “name_of_your_route_map”
You can use traceroute command to see the path taken .