I'm having some trouble understanding the output of the route command. Specifically, the "route to" and "destination" fields. I'm guessing "route to: <address>" means when the queried host receives packets, it sends them to <address> by default, and "destination: <address>" means <address> is the destination for packets routed by that host. But these two fields seem to always be the same. What exactly is the difference between them?
I queried localhost and got the following output:
route to: localhost
destination: localhost
interface: lo0
flags: <UP,HOST,DONE,LOCAL>
recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
49152 49152 0 0 0 0 16384 0
I queried what I thought was the local router/DNS server/DHCP server, obtained through nslookup, and I got this:
route to: cdns01.comcast.net
destination: cdns01.comcast.net
gateway: 10.90.30.1
interface: en1
flags: <UP,GATEWAY,HOST,DONE,WASCLONED,IFSCOPE,IFREF>
recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
0 0 0 0 0 0 1500 0
I did a traceroute on the same IP address and found it to be five router hops away, in a completely different city. I thought the local DNS server was usually on the local router. I don't recall changing it at any point.
I also noticed that "route to" and "destination" are both set to the hostname for the host queried, meaning the routing table for Host A has Host A as both the route to value and the destination value.
Could someone please explain this to me? I'm very confused.
Also, are "interface" and "gateway" the interface and gateway for the queried host, or are they the interface and gateway that my computer uses to connect to the queried host?
Also, I am on a business LAN, not a home network. I don't know if that makes any difference.