I can't find any info regarding this in the man-pages. How would one go about only printing the gateway using traceroute?
traceroute you've to enter maximum
hop as 1 using
m1 option as follows.
traceroute -m1 google.com
According to basic rules of computer network Gateway and host must be connected to same
NIC of router. Otherwise Data Link Layer will unable to deliver packets from hosts to Gateway. So it's
hop should be 1.
So by setting maximum hop as one and tracing any host will prit Gateway only.