Set ip / interface as gateway



A while ago I posted another question in this forum which I solved by running 1-1 NAT. ( This is a follow-up question on that.

When I do a traceroute to one of my machines behind the 1-1 NAT the last two hops are identical so it seems like this:

Hop 1
Hop 2
Hop 3


Is this a configuration issue or intended behaviour? It’d look nicer if the second-to-last hop was either the gw ip or didn’t show at all. At the moment the vyos (gw) does not have any ip assigned itself it only forwards ip’s using 1-1 NAT. I understand that I probably need to assign it its own ip if I want the hop to show but right now I’m just curious wether its possible or not before I do so.

Thanks in advance!


Sounds logical since the second-to-last is the router itself, the last being your host but due to the NAT it it is shown with the IP of the router.


Yeah ok, so what you’re saying is that it is expected and the way it should work? If I wanted to put the router as a hop with its own ip or remove the router hop entirely (or client if thats easier), how would I go about doing that? I probably won’t do it but I’m asking in principle to try and understand the theory. Thanks!


You can’t eliminate a hop from a traceroute.

I mean if you have a traceoute with :

hop 10 ip x.x.x.x
hop 11 ip y.y.y.y
hop 12 ip z.z.z.z

you can’t eliminate hop 11 to get

hop 10 ip x.x.x.x
hop 11 ip z.z.z.z

but you can have you router (or you host; or both) that do not respond to traceroute, so it became

hop 10 ip x.x.x.x
hop 11 ... request time out
hop 12 ip z.z.z.z

But it’s not a good idea, ICMP should not be blocked.


Right, I understand that. I won’t try and hide any hops. Thanks!

Would it be possible so instead of having two identical ips at the end of the traceroute have the gateway another ip assigned to it so instead of showing .13 and then .13 again it shows .10 followed by .13 (.10 being the ip of the gateway)?