gpt4 book ai didi

networking - CIDR 条目和路由表

转载 作者:行者123 更新时间:2023-12-05 02:24:38 28 4
gpt4 key购买 nike

我有一个问题问以下问题:

Suppose a router has the following CIDR entries in its routing table:

Net/Prefix Next Hop
128.96.39.0/24 Interface 0
128.96.39.128/25 Interface 1
128.96.40.0/25 Router 2
192.4.153.0/26 Router 3
default Router 4

For each of the following IP addresses, what does the router do if a packet with that address arrives?

  1. 128.96.39.10;
  2. 128.96.40.12;
  3. 128.96.39.151;
  4. 192.4.153.17;
  5. 192.4.153.90.

我知道 /24 表示分配给网络地址的 24 位意味着分配给主机的 8 位。如何从以十进制表示的 IP 地址获取子网掩码,然后从那里确定 IP 的去向?

最佳答案

嗯,最具体的子网总是首先使用:

/25 比/24 更具体。在您的示例中,这意味着:

  1. 接口(interface) 0
  2. 路由器 2
  3. 接口(interface) 1
  4. 路由器 3
  5. 路由器 4

关于networking - CIDR 条目和路由表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10258616/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com