Traceroute reply with Loopback IP

How to configure a router such that it always replies to a traceroute from its loopback0 address? The following configuration will allow a router to reply to the traceroute using it’s Loopback0 interface ip address:

interface Loopback0
ip address 180.1.1.1 255.255.255.0
ip nat outside
!
interface Loopback10
ip address 1.1.1.1 255.255.255.252
ip nat inside
ip policy route-map LOCAL-DIVERT
!
ip nat inside source list TRACEROUTE
interface Loopback0 overload
!
ip access-list extended TRACEROUTE
permit icmp any any port-unreachable
permit icmp any any time-exceeded
!
ip local policy route-map LOCAL-POLICY
!
route-map LOCAL-POLICY
permit 10 match ip address TRACEROUTE
set ip next-hop 1.1.1.2
!
route-map LOCAL-DIVERT permit 10
set ip next-hop 180.1.1.2

Advertisements

~ by bigevil on September 10, 2009.

 
%d bloggers like this: