How to read the route table?

Posted on

Problem :

Host: win8 ip: 192.168.1.102

Virtual Machina: gentoo ip:192.168.1.108

I type the command route -n to see the route table.

The route table is :

root@gentoo-jl ~ # route -n    
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.253   0.0.0.0         UG    1      0        0 eth0
127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo
192.168.1.0     0.0.0.0         255.255.255.0   U     1      0        0 eth0

and I don’t know how to read the route table.

Can anybody tell me how to read the table?

And when I ping my host(192.168.1.102) in my vm machina(192.168.1.108), what is the path from source to the destination?

Solution :

man route and see the OUTPUT section.

Because the 192.168.1.102 and 192.168.1.108 are in the same subnet. The ping packet will go to 192.168.1.102 directly.

Leave a Reply

Your email address will not be published. Required fields are marked *