14 June, 2013

Basic Policy-Based Routing N: 1


All Routers are configured using EIGRP 

Actual Path from PC2 to Reach S1 is R1->R2->R3->S1 Using T1 (1.54m) Line Serial Cable 

Change this like R1->R4->R3->S1 Using 64 kbps Only for PC2

--------------

Actual Configuration 

R1#show ip eigrp 90 topology 10.1.3.0/24

IP-EIGRP (AS 90): Topology entry for 10.1.3.0/24
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2221056
  Routing Descriptor Blocks:
  10.1.12.2 (Serial1/0), from 10.1.12.2, Send flag is 0x0
      Composite metric is (2221056/307200), Route is Internal
      Vector metric:
        Minimum bandwidth is 1544 Kbit
        Total delay is 22000 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 2
  10.1.14.4 (Serial1/1), from 10.1.14.4, Send flag is 0x0
      Composite metric is (40563200/307200), Route is Internal
      Vector metric:
        Minimum bandwidth is 64 Kbit
        Total delay is 22000 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 2

PC2#traceroute 10.1.3.1

  1 10.1.1.254 1032 msec 16 msec 36 msec
  2 10.1.12.2 36 msec 56 msec 92 msec     <---
  3 10.1.234.3 80 msec 92 msec 92 msec
  4 10.1.3.1 124 msec 

Start Configure

R1#conf terminal
R1(config)#access-list 120 permit ip host 10.1.1.2 host 10.1.3.1
R1(config)#route-map PC2-TO-S1-LOW-BANDWIDTH permit
R1(config-route-map)#match ip address 120
R1(config-route-map)#set ip next-hop 10.1.14.4
R1(config-route-map)#exit
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip policy route-map PC2-TO-S1-LOW-BANDWIDTH
R1(config-if)#end

Verify Configuration On R1

R1#show ip policy
Interface      Route map
Fa0/0          PC2-TO-S1-LOW-BANDWIDTH

R1#show route-map PC2-TO-S1-LOW-BANDWIDTH
route-map PC2-TO-S1-LOW-BANDWIDTH, permit, sequence 10
  Match clauses:
    ip address (access-lists): 120
  Set clauses:
    ip next-hop 10.1.14.4
  Policy routing matches: 34 packets, 2640 bytes

R1#debug ip policy
Policy routing debugging is on

Match
*Mar  1 01:16:42.931: IP: s=10.1.1.2 (FastEthernet0/0), d=10.1.3.1, len 100, FIB policy match

*Mar  1 01:16:42.931: IP: s=10.1.1.2 (FastEthernet0/0), d=10.1.3.1, g=10.1.14.4, len 100, FIB policy routed

No Match
*Mar  1 01:14:29.119: IP: s=10.1.1.1 (FastEthernet0/0), d=10.1.3.1, len 100, FIB policy rejected(no match) - normal forwarding


Verify trafic On PC2

PC2#traceroute 10.1.3.1

  1 10.1.1.254 72 msec 16 msec 44 msec
  2 10.1.14.4 64 msec 124 msec 92 msec       <--- (R4)
  3 10.1.234.3 92 msec 108 msec 152 msec
  4 10.1.3.1 104 msec *  144 msec

PC2#traceroute 10.1.3.254 (Other Host Works The same way)

  1 10.1.1.254 1004 msec 44 msec 48 msec
  2 10.1.12.2 84 msec 72 msec 44 msec        <--- (R2) 
  3 10.1.234.3 112 msec *  72 msec

Verify Trafic From PC1

PC1#traceroute 10.1.3.1

  1 10.1.1.254 12 msec 12 msec 8 msec
  2 10.1.12.2 68 msec 32 msec 60 msec
  3 10.1.234.3 52 msec 60 msec 48 msec

  4 10.1.3.1 80 msec *  56 msec


R1#show access-lists 120

Extended IP access list 120
    10 permit ip host 10.1.1.2 host 10.1.3.1 (24 matches)

It Does Not Change Successor 

R1#show ip eigrp 90 topology 10.1.3.0/24

IP-EIGRP (AS 90): Topology entry for 10.1.3.0/24
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2221056
  Routing Descriptor Blocks:
  10.1.12.2 (Serial1/0), from 10.1.12.2, Send flag is 0x0
      Composite metric is (2221056/307200), Route is Internal
      Vector metric:
        Minimum bandwidth is 1544 Kbit
        Total delay is 22000 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 2

Done !

P.S 

If Link Between R1 and R4 Goes Down R1 Use "Normal Forwarding"

*Mar  1 01:26:54.351: IP: s=10.1.1.2 (FastEthernet0/0), d=10.1.3.1, len 100, FIB policy rejected - normal forwarding
*Mar  1 01:26:54.411: IP: s=10.1.1.2 (FastEthernet0/0), d=10.1.3.1, len 100, FIB policy match

Applyng PBR to Locally Created Packets 

Configure Local PBR


R1(config)#ip local policy route-map "NAME"

##########################################################################################################