主机路由表的理解

发布于 2024-12-22 14:44:35 字数 581 浏览 1 评论 0原文

我的主机带有以太网适配器,配置如下:IP地址192.170.100.10,子网掩码255.255.255.0。还有一个类似IP服务器的硬件设备,配置为:192.170.100.20、255.255.255.0。当我将此设备连接到主机以太网适配器时,以下信息将添加到 route print 命令输出 (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

我需要对此输出的一些解释:如何添加这些条目,如何使用它们将网络数据包 192.170.100.* 路由到此适配器。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

2024-12-29 14:44:35

第 1 行:通过 192.170.100.10 处的网卡将所有发送到 192.170.100.* 的内容发送出去,如果不存在规则,那就更特殊

第 2 行:不通过您的网卡,而是通过 Loopback 向自己发送数据包

第 3 行:通过网卡发送广播。

由于除了 192.170.100.* 之外没有任何规则,您将无法访问其他网络

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

兲鉂ぱ嘚淚 2024-12-29 14:44:35
192.170.100.0    255.255.255.0   192.170.100.10  192.170.100.10       20

意味着 192.170.100.0 网络上的任何内容都将使用 192.170.100.10 作为网关。

192.170.100.10  255.255.255.255        127.0.0.1       127.0.0.1       20

这意味着任何寻找 192.170.100.10 的内容实际上都会被发送到环回(本地)地址。

192.170.100.255  255.255.255.255   192.170.100.10  192.170.100.10       20

是 192.170.100.0 网络的广播地址。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文