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

 

Source: Big Evil

This entry was posted in Cisco R&S. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s