Route get output


 
Thread Tools Search this Thread
Special Forums IP Networking Route get output
# 1  
Old 07-16-2015
Route get output

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:

Code:
   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:

Code:
   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.
# 2  
Old 07-16-2015
what o/s and what route command are you entering; also, what does netstat -rn show, what does netstat -in show; show the traceroute command you used
# 3  
Old 07-18-2015
I am using Mac OS X 10.8.

Code:
nslookup
> google.com
Server:		75.75.75.75
Address:	75.75.75.75#53

Non-authoritative answer:
Name:	google.com
Address: 216.58.219.206

Code:
route get 75.75.75.75
route get localhost

Code:
bash-3.2$ traceroute cdns01.comcast.net
traceroute to cdns01.comcast.net (75.75.75.75), 64 hops max, 52 byte packets
 1  173-166-16-222-newengland.hfc.comcastbusiness.net (173.166.16.222)  2.078 ms  2.236 ms  3.268 ms
 2  96.120.67.213 (96.120.67.213)  10.097 ms  13.087 ms  8.564 ms
 3  68.85.160.197 (68.85.160.197)  8.152 ms  8.500 ms  11.837 ms
 4  te-3-9-0-0-ar01.needham.ma.boston.comcast.net (68.87.182.61)  18.488 ms  17.155 ms  18.911 ms
 5  te-4-1-ur01-d.chelmsfdrdc2.ma.boston.comcast.net (68.87.145.230)  15.623 ms  17.150 ms  13.453 ms
 6  cdns01.comcast.net (75.75.75.75)  13.639 ms *  19.808 ms

Code:
bash-3.2$ netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            192.168.0.254      UGSc           14        0     en1
127                127.0.0.1          UCS             0        0     lo0
127.0.0.1          127.0.0.1          UH              1      832     lo0
169.254            link#5             UCS             0        0     en1
192.168.0          link#5             UCS             4        0     en1
192.168.0.1        0:14:22:12:ed:f2   UHLWIi          0      138     en1   1122
192.168.0.29       a4:c3:61:3e:6a:4   UHLWIi          0        0     en1    582
192.168.0.68       6c:62:6d:b:b6:61   UHLWIi          0        0     en1   1056
192.168.0.73       127.0.0.1          UHS             0        0     lo0
192.168.0.254      74:44:1:d2:ea:9d   UHLWIir        16       34     en1   1197

Internet6:
Destination                             Gateway                         Flags         Netif Expire
::1                                     link#1                          UHL             lo0
fe80::%lo0/64                           fe80::1%lo0                     UcI             lo0
fe80::1%lo0                             link#1                          UHLI            lo0
fe80::%en1/64                           link#5                          UCI             en1
fe80::22c9:d0ff:feb5:2925%en1           20:c9:d0:b5:29:25               UHLI            lo0
ff01::%lo0/32                           fe80::1%lo0                     UmCI            lo0
ff01::%en1/32                           link#5                          UmCI            en1
ff02::%lo0/32                           fe80::1%lo0                     UmCI            lo0
ff02::%en1/32                           link#5                          UmCI            en1

Code:
bash-3.2$ netstat -in
Name  Mtu   Network       Address            Ipkts Ierrs    Opkts Oerrs  Coll
lo0   16384 <Link#1>                          3565     0     3565     0     0
lo0   16384 fe80::1%lo0 fe80:1::1             3565     -     3565     -     -
lo0   16384 127           127.0.0.1           3565     -     3565     -     -
lo0   16384 ::1/128     ::1                   3565     -     3565     -     -
gif0* 1280  <Link#2>                             0     0        0     0     0
stf0* 1280  <Link#3>                             0     0        0     0     0
en0   1500  <Link#4>    a8:20:66:09:b5:5d        0     0        0     0     0
en1   1500  <Link#5>    20:c9:d0:b5:29:25  1014117     0   616986     0     0
en1   1500  fe80::22c9: fe80:5::22c9:d0ff  1014117     -   616986     -     -
en1   1500  192.168.0     192.168.0.73     1014117     -   616986     -     -
fw0   4078  <Link#6>    00:3e:e1:ff:fe:4c:07:1a        0     0        0     0     0
p2p0  2304  <Link#7>    02:c9:d0:b5:29:25        0     0        0     0     0

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

telnet with a certain route

OS : *NIX Shell : any I want to test telnet for a certain port on a certain machine, but via a VIP which is in front of that machine. Basically I want to follow the same route as the application does. Is there any possiblility to force telnet to follow a certain route (via the VIP I mentioned)... (2 Replies)
Discussion started by: black_fender
2 Replies

2. Red Hat

No route to host

I get below error when using telnet and ssh ?? Why ? the ip address of linux server is 10.155.25.22 =tstgcota ?? # netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.75.0 0.0.0.0 255.255.255.0 U 0 0... (6 Replies)
Discussion started by: chuikingman
6 Replies

3. IP Networking

Route to nowhere?

Hi, HP-UX 11iV2, but it's probably universal (tcp/ip) I have a production and a test server. The test server gets the application updated nightly from the production server software. The application accesses a set of process servers on a separate subnet (192.163.22.30,31,32), but reachable... (1 Reply)
Discussion started by: monroedoug
1 Replies

4. UNIX for Dummies Questions & Answers

Static Route

Hi, Request you to please tell me the command or the process to add the static route in redhat linux. Thanks in Advance. Regards Arun (2 Replies)
Discussion started by: Arun.Kakarla
2 Replies

5. Solaris

SOLARIS does not route

hi, i installed solaris 9 on an SPARC server with two network interfaces. behind each interface is a small lan. i can reach every computer in every lan using one of the other interface when i am logged in the solaris. but if a computer from one lan has to connect to a computer on the other lan,... (4 Replies)
Discussion started by: bong02
4 Replies

6. IP Networking

Do I need to add a route??

I have two networks connected by cisco routers. My first subnet is 192.168.0.0 and my second is 192.168.1.0. My SCO unix machine is on the 192.168.1.0 subnet with an IP of 192.168.1.231. It can see the entire .1.0 subnet but nothing on the other network. My cicso router(gateway) to the other... (6 Replies)
Discussion started by: agoodrich
6 Replies

7. UNIX for Dummies Questions & Answers

no route to host

I not able to ping outside the internet. i am able to ping my 192. ip address. when i try to ping a 68. ip address i get no route to host. what should i do to correct this issue. I have sco openserver 5.05 (6 Replies)
Discussion started by: scoman2
6 Replies

8. AIX

route add

Hello , We have 3 rs/6000 server's running aix on our local network, so each time I try to ping one of these servers we get a "network is down" error , I've been instructed to use to route add command which is ... #route add server.ip router.ip after this the ping command works fine ,... (6 Replies)
Discussion started by: cubicle^dweller
6 Replies

9. IP Networking

Route deleted

I am running SCOUnix OpenServer 5.0.5. For some reason a route in my routing table is being deleted and I do not know why. As far as I can see, it is nothing obvious that is deleting the route. The rest of the table is fine, only one particular entry is being delete. I run S99routes to reestablish... (3 Replies)
Discussion started by: walkerd810
3 Replies

10. UNIX for Dummies Questions & Answers

Route Adding

I am trying to add a route for an interface on my unix server. The interface is qfe0. How do I type out the route add command. The Normal way is route add 1.1.1.0 1.1.1.1 When I want it to bind to a certain interface how to I enter the command. (1 Reply)
Discussion started by: Hordak
1 Replies
Login or Register to Ask a Question