Lab 02 -   Policy Routing   The following scenario refers to the diagram below.

  Scenario:   All routers are configured in a single OSPF area.   Router_C, based on the cost metric for OSPF will send all packets with   a destination network address of 10.4.0.0 out the E0 interface.   Problem:   Have all packets destined for network 10.4.0.0 exit the Serial 0   Router_C.   Router_C#sh ip route   Codes: C - connected, S - static,   I - IGRP,   R - RIP, M - mobile, B - BGP,   D - EIGRP,   EX - EIGRP external, O - OSPF,   IA - OSPF inter area,   N1 - OSPF NSSA external type 1,   N2 - OSPF NSSA external type 2,   E1 - OSPF external type 1,   E2 - OSPF external type 2, E - EGP,   i - IS-IS,   L1 - IS-IS level-1,   L2 - IS-IS level-2,   * - candidate default,   U - per-user static route,   o - ODR   Gateway of last resort is not set   10.0.0.0/16 is subnetted, 3 subnets   C 10.2.0.0 is directly connected,   Serial0   C 10.3.0.0 is directly connected,   Ethernet0   O 10.4.0.0 [110/74] via 10.3.0.1,   00:00:13, Ethernet0  Solution:  Policy routing will allow you to configure a route map. The route map  will be used by the router in lieu of destination routing.  In this scenario the best route to the destination network 10.4.0.0 is  to go ethernet. We want to force the route to take the serial  connection.  Step 1  Configure a route map tag. I chose "takeserial".  Step 2  Point the route map to the tag. Don’t let the 10 shake you it is just a  sequence number.  Router_C(config)#route-map  takeserial permit ?    Sequence to insert to/delete  from existing route-map entry  Step 3  Identify which packet should be route mapped. In our example we will  match the ip address of access list 1.  Step 4  Tell the router where to send the matched packet. We will send the  packets to Serial 0.  Current configuration:  !  version 11.2  !  hostname Router_C  !  !  !  interface Ethernet0  ip address 10.3.0.3 255.255.0.0  !  interface Ethernet1  ip address 10.1.0.3 255.255.0.0  ip policy route-map takeserial*Step 1  !  interface Serial0  ip address 10.2.0.1 255.255.0.0  clockrate 38400  !  interface Serial1  no ip address  shutdown  !  router ospf 100  network 10.0.0.0 0.255.255.255 area 0  !no ip classless  access-list 1 permit 10.1.0.5  route-map takeserial permit 10 *Step 2  match ip address 1 *Step 3  set interface Serial0 *Step 4  !  line con 0  line aux 0  line vty 0 4  login  !  end  Now we will ping 10.4.0.2 from Workstaton A:  Router_C#debug ip policy  Policy routing debugging is on  Router_C#  IP: s=10.1.0.5 (Ethernet1), d=10.4.0.2,  len 74, policy match  IP: route map takeserial, item 10,  permit  IP: s=10.1.0.5 (Ethernet1),  d=10.4.0.2 (Serial0),  len 74, policy routed  IP: Ethernet1 to Serial0 10.4.0.2  IP: s=10.1.0.5 (Ethernet1), d=10.4.0.2,  len 74, policy match  IP: route map takeserial, item 10,  permit  IP: s=10.1.0.5 (Ethernet1),  d=10.4.0.2 (Serial0),  len 74, policy routed  IP: Ethernet1 to Serial0 10.4.0.2  IP: s=10.1.0.5 (Ethernet1), d=10.4.0.2,  len 74, policy match  IP: route map takeserial, item 10,  permit  IP: s=10.1.0.5 (Ethernet1),  d=10.4.0.2 (Serial0),  len 74, policy routed  IP: Ethernet1 to Serial0 10.4.0.2  IP: s=10.1.0.5 (Ethernet1), d=10.4.0.2,  len 74, policy match  IP: route map takeserial, item 10,  permit  IP: s=10.1.0.5 (Ethernet1),  d=10.4.0.2 (Serial0),  len 74, policy routed  IP: Ethernet1 to Serial0 10.4.0.2