Understanding of host route table

Deadly 提交于 2019-12-11 08:30:37

问题


I have the host computer with Ethernet adapter configured by this way: IP address 192.170.100.10, subnet mask 255.255.255.0. There is also hardware device which works like IP server, configured as: 192.170.100.20, 255.255.255.0. When I connect this device to the host Ethernet adapter, the following information is added to route print command output (Windows):

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
    192.170.100.0    255.255.255.0   192.170.100.10  192.170.100.10       20
   192.170.100.10  255.255.255.255        127.0.0.1       127.0.0.1       20
  192.170.100.255  255.255.255.255   192.170.100.10  192.170.100.10       20

I need some explanation of this output: how these entries are added, how they are used to route network packets 192.170.100.* to this adapter.


回答1:


192.170.100.0    255.255.255.0   192.170.100.10  192.170.100.10       20

Means that anything on the 192.170.100.0 network will use 192.170.100.10 as it's gateway

192.170.100.10  255.255.255.255        127.0.0.1       127.0.0.1       20

Means that anything looking for 192.170.100.10 will actually get sent to the loopback (local) address.

192.170.100.255  255.255.255.255   192.170.100.10  192.170.100.10       20

Is the broadcast address for the 192.170.100.0 network.




回答2:


Line 1: Send everything that goes to 192.170.100.* out via your network card at 192.170.100.10, if no rule exists, that is more special

Line 2: Send packets to yourself NOT via cour network card, but via Loopback

Line 3: Send broadcasts via your network card.

As there is no rule for anything other than 192.170.100.* you will not be able to reach other nets



来源:https://stackoverflow.com/questions/8576759/understanding-of-host-route-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!