3.2.d Describe policy-based routing
ENCOR 350-401 v1.2 · 3.0 Infrastructure
Normal routing looks only at the destination. Policy-based routing (PBR) lets a router forward selected traffic by other rules, such as the source subnet, the application or the packet size, overriding the routing table for that traffic only. ENCOR expects you to describe how it is built and where it is used.
What you must know
- Explain what PBR overrides and in which direction it is applied.
- Read a route map with
match ip addressandset ip next-hoporset interface. - Compare
set ip next-hopwithset ip default next-hop. - Name typical uses and the risks (asymmetric routing, troubleshooting).
How PBR works
A route map is applied inbound on the interface where the traffic arrives. Each sequence matches traffic (usually with an ACL) and sets where it goes. Traffic that matches no permit sequence, or is denied, is routed normally. ip local policy route-map applies PBR to traffic the router itself generates.
ip access-list extended GUESTS
permit ip 10.50.0.0 0.0.255.255 any
!
route-map PBR-GUESTS permit 10
match ip address GUESTS
set ip next-hop 198.51.100.1
!
interface GigabitEthernet0/1
ip policy route-map PBR-GUESTSGuests are steered to ISP B (1); staff traffic is routed normally (2).
Variants and cautions
| Command | Behaviour |
|---|---|
set ip next-hop | Use this next hop first, even if the routing table has a route |
set ip default next-hop | Use it only if the routing table has no explicit route (other than the default) |
set interface | Send out this interface (point-to-point links) |
set ip next-hop verify-availability | Skip the next hop if a tracked object or CDP says it is down |
PBR is invisible in the routing table, which makes troubleshooting harder, and return traffic may take another path (asymmetric routing through stateful firewalls). Document it and add tracking so a dead next hop does not black-hole traffic.
Commands
show route-map | Each sequence with its match and set clauses and packet counts. |
show ip policy | Interfaces with PBR applied. |
debug ip policy | Each packet's policy decision (use carefully). |
Exam traps
- PBR is applied inbound, on the interface where traffic enters.
- Unmatched traffic is routed normally.
- PBR does not appear in
show ip route. - Router-generated traffic needs
ip local policy route-map.
Check yourself
- On which interface do you apply PBR for guest traffic leaving to the internet?
- Inbound on the interface where guest traffic enters the router.
set ip default next-hopversusset ip next-hop?- Default next-hop only applies when the routing table has no explicit route; next-hop overrides the table.
More topics in 3.0 Infrastructure
- 3.1.a Troubleshoot 802.1Q trunks, whether configured statically or negotiated
- 3.1.b Troubleshoot static and dynamic EtherChannels
- 3.1.c Configure and verify RSTP and MST, plus protections such as root guard and BPDU guard
- 3.2.a Compare EIGRP and OSPF: algorithm, load balancing, path selection, metrics, areas
- 3.2.b Configure simple OSPFv2/v3: multiple areas, summarization, filtering, network types, passive interfaces
- 3.3.b Configure NAT and PAT
- 3.3.c Configure first-hop redundancy with HSRP and VRRP
- 3.3.d Describe multicast: RPF check, PIM-SM, IGMPv2/v3, SSM, bidir, MSDP