Understanding of host route table

2019-07-22 09:33发布

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.

2条回答
beautiful°
2楼-- · 2019-07-22 09:52
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.

查看更多
等我变得足够好
3楼-- · 2019-07-22 10:06

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

查看更多
登录 后发表回答