計算機英語基礎(chǔ)知識C篇

字號:

Subnetting
    A Class A, B, or C TCP/IP network can be further divided, or subnetted, by a system administrator. This becomes necessary as you reconcile the logical address scheme of the Internet (the abstract world of IP addresses and subnets) with the physical networks in use by the real world.
    A system administrator who is allocated a block of IP addresses may be administering networks that are not organized in a way that easily fits these addresses. For example, you have a wide area network with 150 hosts on three networks (in different cities) that are connected by a TCP/IP router. Each of these three networks has 50 hosts. You are allocated the class C network 192.168.123.0. (For illustration, this address is actually from a range that is not allocated on the Internet.) This means that you can use the addresses 192.168.123.1 to 192.168.123.254 for your 150 hosts.
    Two addresses that cannot be used in your example are 192.168.123.0 and 192.168.123.255 because binary addresses with a host portion of all ones and all zeros are invalid. The zero address is invalid because it is used to specify a network without specifying a host. The 255 address (in binary notation, a host address of all ones) is used to broadcast a message to every host on a network. Just remember that the first and last address in any network or subnet cannot be assigned to any individual host.
    You should now be able to give IP addresses to 254 hosts. This works fine if all 150 computers are on a single network. However, your 150 computers are on three separate physical networks. Instead of requesting more address blocks for each network, you divide your network into subnets that enable you to use one block of addresses on multiple physical networks.
    In this case, you divide your network into four subnets by using a subnet mask that makes the network address larger and the possible range of host addresses smaller. In other words, you are 'borrowing' some of the bits usually used for the host address, and using them for the network portion of the address. The subnet mask 255.255.255.192 gives you four networks of 62 hosts each. This works because in binary notation, 255.255.255.192 is the same as 1111111.11111111.1111111.11000000. The first two digits of the last octet become network addresses, so you get the additional networks 00000000 (0), 01000000 (64), 10000000 (128) and 11000000 (192). (Some administrators will only use two of the subnetworks using 255.255.255.192 as a subnet mask. For more information on this topic, see RFC 1878.) In these four networks, the last 6 binary digits can be used for host addresses.
    Using a subnet mask of 255.255.255.192, your 192.168.123.0 network then becomes the four networks 192.168.123.0, 192.168.123.64, 192.168.123.128 and 192.168.123.192. These four networks would have as valid host addresses:
     192.168.123.1-62
     192.168.123.65-126
     192.168.123.129-190
     192.168.123.193-254
    Remember, again, that binary host addresses with all ones or all zeros are invalid, so you cannot use addresses with the last octet of 0, 63, 64, 127, 128, 191, 192, or 255.
    You can see how this works by looking at two host addresses, 192.168.123.71 and 192.168.123.133. If you used the default Class C subnet mask of 255.255.255.0, both addresses are on the 192.168.123.0 network. However, if you use the subnet mask of 255.255.255.192, they are on different networks; 192.168.123.71 is on the 192.168.123.64 network, 192.168.123.133 is on the 192.168.123.128 network.
    子網(wǎng)配置
    系統(tǒng)管理員可以進一步劃分 A、B 或 C 類 TCP/IP 網(wǎng)絡(luò)或?qū)@些網(wǎng)絡(luò)進行子網(wǎng)配置。當您將 Internet 的邏輯地址結(jié)構(gòu)(IP 地址和子網(wǎng)的抽象世界)與真實世界中使用的物理網(wǎng)絡(luò)進行協(xié)調(diào)時,就有必要進行子網(wǎng)配置。
    接受 IP 地址塊分配的系統(tǒng)管理員可以用輕松符合這些地址的方式管理未經(jīng)組織的網(wǎng)絡(luò)。例如,您有一個廣域網(wǎng),在該廣域網(wǎng)中,TCP/IP 路由器連接的三個網(wǎng)絡(luò)(位于不同城市)中有 150 個主機。這三個網(wǎng)絡(luò)中的每個網(wǎng)絡(luò)都有 50 個主機。向您分配了 C 類網(wǎng)絡(luò) 192.168.123.0。(此地址是為了便于說明,實際上來自 Internet 中未分配的范圍。)這意味著可以將地址 192.168.123.1 至 192.168.123.254 用于您的 150 個主機。
    在示例中不能使用的兩個地址為 192.168.123.0 和 192.168.123.255,因為主機部分全部為一和全部為零的二進制地址無效。零地址無效的原因是使用它在未指定主機的情況下指定了網(wǎng)絡(luò)。255 地址(在二進制表示法中全部為一的主機地址)用來向網(wǎng)絡(luò)中的每個主機廣播消息。只需記住,任何網(wǎng)絡(luò)或子網(wǎng)中的第一個地址和最后一個地址不能分配給任何單獨主機。
    現(xiàn)在,您應(yīng)該能夠?qū)?IP 地址給予 254 個主機。如果所有 150 臺計算機都在一個網(wǎng)絡(luò)中,則此操作會進行得很順利。但是,您的 150 臺計算機位于三個單獨的物理網(wǎng)絡(luò)中。不用為每個網(wǎng)絡(luò)請求更多地址塊,只需將網(wǎng)絡(luò)分成使您可以在多個物理網(wǎng)絡(luò)中使用一個地址塊的子網(wǎng)。
    在此情況下,使用使網(wǎng)絡(luò)地址更大和可能的主機地址范圍更小的子網(wǎng)掩碼將網(wǎng)絡(luò)分成四個子網(wǎng)。也就是說,您正在“借用”某些通常用于主機地址的位,并將它們用于地址的網(wǎng)絡(luò)部分。子網(wǎng)掩碼 255.255.255.192 給予您四個網(wǎng)絡(luò),每個網(wǎng)絡(luò)有 62 個主機。由于用二進制表示 255.255.255.192 與 1111111.11111111.1111111.11000000 相同,所以此操作可以順利進行。最后一個八位組的前兩位數(shù)字變?yōu)榫W(wǎng)絡(luò)地址,所以您獲得了附加網(wǎng)絡(luò) 00000000 (0)、01000000 (64)、10000000 (128) 和 11000000 (192)。(某些管理員只使用將 255.255.255.192 作為子網(wǎng)掩碼的其中兩個子網(wǎng)。有關(guān)此主題的更多信息,請參閱 RFC 1878。)在這四個網(wǎng)絡(luò)中,最后 6 個二進制數(shù)字可用于主機地址。
    使用子網(wǎng)掩碼 255.255.255.192,則您的 192.168.123.0 網(wǎng)絡(luò)變?yōu)樗膫€網(wǎng)絡(luò) 192.168.123.0、 192.168.123.64、192.168.123.128 和 192.168.123.192。這四個網(wǎng)絡(luò)將擁有以下有效主機地址:
     192.168.123.1-62
     192.168.123.65-126
     192.168.123.129-190
     192.168.123.193-254
    再次重審,全部為一或全部為零的二進制主機地址無效,所以您不能使用最后一個八位組為 0、63、64、127、128、191、192 或 255 的地址。
    現(xiàn)在,看兩個主機地址 192.168.123.71 和 192.168.123.133,您就會了解其原理。如果使用默認 C 類子網(wǎng)掩碼 255.255.255.0,則這兩個地址都位于 192.168.123.0 網(wǎng)絡(luò)中。但是,如果使用子網(wǎng)掩碼 255.255.255.192,則它們位于不同網(wǎng)絡(luò)中;192.168.123.71 位于 192.168.123.64 網(wǎng)絡(luò)中,192.168.123.133 位于 192.168.123.128 網(wǎng)絡(luò)中。