您现在的位置:学赛首页 > IT英语 > 网络 > 正文
计算机英语基础知识 B 篇
http://www.educity.cn 作者:不详 来源:网络 2006年7月17日 发表评论 进入社区

  Subnet mask
  The second item, which is required for TCP/IP to work, is the subnet mask. The subnet mask is used by the TCP/IP protocol to determine whether a host is on the local subnet or on a remote network.

  In TCP/IP, the parts of the IP address that are used as the network and host addresses are not fixed, so the network and host addresses above cannot be determined unless you have more information. This information is supplied in another 32-bit number called a subnet mask. In this example, the subnet mask is 255.255.255.0. It is not obvious what this number means unless you know that 255 in binary notation equals 11111111; so, the subnet mask is:
   11111111.11111111.11111111.0000000
    
  Lining up the IP address and the subnet mask together, the network and host portions of the address can be separated:
    11000000.10101000.01111011.10000100 -- IP address (192.168.123.132)
    11111111.11111111.11111111.00000000 -- Subnet mask (255.255.255.0)
     
  The first 24 bits (the number of ones in the subnet mask) are identified as the network address, with the last 8 bits (the number of remaining zeros in the subnet mask) identified as the host address. This gives you the following:
    11000000.10101000.01111011.00000000 -- Network address (192.168.123.0)
    00000000.00000000.00000000.10000100 -- Host address (000.000.000.132)
    
  So now you know, for this example using a 255.255.255.0 subnet mask, that the network ID is 192.168.123.0, and the host address is 0.0.0.132. When a packet arrives on the 192.168.123.0 subnet (from the local subnet or a remote network), and it has a destination address of 192.168.123.132, your computer will receive it from the network and process it.

  Almost all decimal subnet masks convert to binary numbers that are all ones on the left and all zeros on the right. Some other common subnet masks are:
    Decimal                 Binary
    255.255.255.192         1111111.11111111.1111111.11000000
    255.255.255.224         1111111.11111111.1111111.11100000
    
  Internet RFC 1878 describes the valid subnets and subnet masks that can be used on TCP/IP networks.

  Network classes

  Internet addresses are allocated by the InterNIC , the organization that administers the Internet. These IP addresses are divided into classes. The most common of these are classes A, B, and C. Classes D and E exist, but are not generally used by end users. Each of the address classes has a different default subnet mask. You can identify the class of an IP address by looking at its first octet. Following are the ranges of Class A, B, and C Internet addresses, each with an example address: ? Class A networks use a default subnet mask of 255.0.0.0 and have 0-127 as their first octet. The address 10.52.36.11 is a class A address. Its first octet is 10, which is between 1 and 126, inclusive.
? Class B networks use a default subnet mask of 255.255.0.0 and have 128-191 as their first octet. The address 172.16.52.63 is a class B address. Its first octet is 172, which is between 128 and 191, inclusive.
? Class C networks use a default subnet mask of 255.255.255.0 and have 192-223 as their first octet. The address 192.168.123.132 is a class C address. Its first octet is 192, which is between 192 and 223, inclusive.
In some scenarios, the default subnet mask values do not fit the needs of the organization, because of the physical topology of the network, or because the numbers of networks (or hosts) do not fit within the default subnet mask restrictions. The next section explains how networks can be divided using subnet masks.

  子网掩码

  第二项是子网掩码,它是 TCP/IP 正常工作所必需的。TCP/IP 协议使用子网掩码确定主机是在本地子网中还是在远程网络中。

  在 TCP/IP 中,将哪部分 IP 地址用作网络地址和主机地址并不固定,所以除非您掌握详细的信息,否则无法确定上述网络地址和主机地址。此信息在另一个 32 位数字中提供,称为子网掩码。在本例中,子网掩码为 255.255.255.0。如果您不知道二进制表示法中的 255 等于 11111111,可能并不清楚该数字表示的含义;照此分析,子网掩码为:
11111111.11111111.11111111.0000000
    
  将 IP 地址和子网掩码排列在一起比较,就可以分清该地址的网络部分和主机部分:
  11000000.10101000.01111011.10000100 -- IP 地址 (192.168.123.132)
  11111111.11111111.11111111.00000000 -- 子网掩码 (255.255.255.0)
    
  前 24 位(子网掩码中的数字 1)被标识为网络地址,后 8 位(子网掩码中剩余的数字 0)被标识为主机地址。据此可以得到:
  11000000.10101000.01111011.00000000 -- 网络地址 (192.168.123.0)
  00000000.00000000.00000000.10000100 -- 主机地址 (000.000.000.132)
    
  这样,我们就可以知道,在这个使用 255.255.255.0 子网掩码的示例中,网络 ID 为 192.168.123.0,主机地址为 0.0.0.132。当数据包到达 192.168.123.0 子网(从本地子网或远程网络),而且它的目标地址为 192.168.123.132 时,您的计算机将从网络接收它并对它进行处理。

  几乎所有十进制子网掩码都转换为左侧全部是一、右侧全部是零的二进制数字。其他一些常见的子网掩码有:
    十进制                  二进制
   255.255.255.192         1111111.11111111.1111111.11000000
   255.255.255.224         1111111.11111111.1111111.11100000
    
  Internet RFC 1878描述了可在 TCP/IP 网络中使用的有效子网和子网掩码。

  网络类

  Internet 地址由管理 Internet 的机构 InterNIC  来分配。这些 IP 地址分成若干类。其中最常见的是 A、B 和 C 类。也有 D 和 E 类,但是最终用户通常不会使用。每个地址类都有不同的默认子网掩码。可以通过查看 IP 地址的第一个八位组来识别该 IP 地址的类别。下面是 A、B 和 C 类 Internet 地址的范围,每一类地址都有一个示例: ? A 类网络使用的默认子网掩码为 255.0.0.0,第一个八位组为 0-127。地址 10.52.36.11 就是一个 A 类地址。它的第一个八位组为 10,介于 1 至 126 之间(包括 1 和 126)。
? B 类网络使用的默认子网掩码为 255.255.0.0,第一个八位组为 128-191。地址 172.16.52.63 就是一个 B 类地址。它的第一个八位组为 172,介于 128 至 191 之间(包括 128 和 191)。
? C 类网络使用的默认子网掩码为 255.255.255.0,第一个八位组为 192-223。地址 192.168.123.132 就是一个 C 类地址。它的第一个八位组为 192,介于 192 至 223 之间(包括 192 和 223)。
在某些情况下,由于网络的物理拓扑或因为网络(或主机)的数目在默认的子网掩码限制之下并不适用,所以默认子网掩码值可能不适合机构的需要。下一部分将解释如何使用子网掩码划分网络。