regarding to the post published at ine site (http://blog.ine.com/2013/09/06/modifying-traceroute-replies/), I have a question. I wonder if I can get the same result with redirecting locally generated traffic to loopback interface and apply NAT to the loopback. as the original scenario has shown, I have 4 routers with a loopback on each and OSPF everywhere. I'm going to configure R2 to send its loopback IP address to the routers that run traceroute test. for example, I want to run traceroute on R1 toward R4 loopback IP and excpect that R1 sees R2's loopback IP address in the first traceroute reply packet, instead of the R2's physical address (if the scenario is not clear, please take a look at the original post that I mentioned at the beginning). my R2 config is as follows:
R2:
interface Loopback0
ip address 2.2.2.2 255.255.255.0
ip nat inside
ip ospf 1 area 0
!
interface FastEthernet0/0
ip address 23.23.23.2 255.255.255.0
ip nat outside
ip ospf 1 area 0
!
interface Serial0/0
ip address 24.24.24.2 255.255.255.0
ip nat outside
ip ospf 1 area 0
!
interface FastEthernet0/1
ip address 12.12.12.2 255.255.255.0
ip nat outside
!
ip local policy route-map LOCAL_POLICY_4NAT
!
ip nat inside source list FOR_NAT_2 interface Loopback0 overload
!
ip access-list extended FOR_NAT
permit icmp any any port-unreachable
permit icmp any any time-exceeded
!
ip access-list extended FOR_NAT_2
permit icmp any any
!
route-map LOCAL_POLICY_4NAT permit 10
match ip address FOR_NAT
set interface Loopback0
--------------------------------
--------------------------------
now traceroute results from R1 toward R4's loopback:
R1(config)#do trace 4.4.4.4 ttl 0 3
0 12.12.12.2 52 msec 68 msec 48 msec
1 12.12.12.2 72 msec 68 msec 68 msec
2 24.24.24.4 72 msec 60 msec 16 msec
although NAT is triggered on R2, but it translated 4.4.4.4 to 2.2.2.2, instead of its locally generated traffic. any idea?