?? ch10.htm
字號:
<HTML><HEAD><TITLE>Chapter 10 -- Subnetting an Intranet</TITLE><META></HEAD><BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#CE2910"><H1><FONT SIZE=6 COLOR=#FF0000>Chapter 10</FONT></H1><H1><FONT SIZE=6 COLOR=#FF0000>Subnetting an Intranet</FONT></H1><HR><P><CENTER><B><FONT SIZE=5><A NAME="CONTENTS">CONTENTS</A></FONT></B></CENTER><UL><LI><A HREF="#SubnettinganIntranet">Subnetting an Intranet</A></UL><HR><P>Intranets come in different sizes. In a small company, an intranetcan be composed of only a handful of computers. In a medium-sizedbusiness, it may include dozens or hundreds of computers. Andin a large corporation, there may be thousands of computers spreadacross the globe, all connected to a single intranet. When intranetsget large, they need to be subdivided into individual <I>subnets</I>or <I>subnetworks.</I><P>To understand how subnetting works, you first need to understandIP addresses. Every IP address is a 32-bit numeric address thatuniquely identifies a network and then a specific host on thatnetwork. The IP address is divided into two sections: the networksection, called the <I>netid,</I> and the host section, calledthe <I>hostid</I>.<P>Each 32-bit IP address is handled differently, according to what<I>class</I> of network the address refers to. There are threemain classes of network addresses: <I>Class A</I>, <I>Class B,</I>and <I>Class C</I>. In some classes, more of the 32-bit addressspace is devoted to the netid, while in others, more of the addressspace is devoted to the hostid. In a Class A network, the netidis composed of 8 bits, while the hostid is composed of 24 bits.In a Class B network, both the netid and the hostid are composedof 16 bits. In a Class C network, the netid is composed of 24bits, while the hostid is composed of 8 bits. There's a simpleway of knowing what class a network is in. If the first numberof the IP address is less than 128, the network is a Class A address.If the first number is from 128 to 191, it's a Class B network.If the first number is from 192 to 223, it's a Class C network.Numbers above 223 are reserved for other purposes. The smallerthe netid, the fewer number of networks that can be subnetted,but the larger number of hosts on the network. A Class A ratingis best for large networks while a Class C is best for small ones.<P>To create a subnet, the demarcation line on the IP address ismoved between the netid and the hostid, to give the netid morebits to work with and to take away bits from the hostid. To dothis, a special number called a <I>subnet mask</I> is used.<P>Subnetting is used when intranets grow over a certain size andthey begin to have problems. One problem is management of hostIP addresses-making sure that every computer on the network hasa proper, up-to-date host address, and that old host addressesare put out of use until needed in the future. In a corporationspread out over several locations-or across the world-it's difficult,if not impossible, to have one person responsible for managingthe host addresses at every location and department in the company.<P>Another problem has to do with a variety of hardware limitationsof networks. Dissimilar networks may all be part of an intranet.An intranet may have some sections that are Ethernet, other sectionsthat are Token Ring networks, and conceivably other sections thatuse different networking technologies altogether. There is noeasy way for an intranet router to link these dissimilar networkstogether and route the information to the proper places.<P>Another set of problems has to do with the physical limitationsof network technology. In some kinds of networks, there are somestrict limitations on how far cables can extend in the network.In other words, you can't go over a certain distance of cablingwithout using repeaters or routers. A "thick" Ethernetcable, for example, can only be extended to 500 meters, whilea "thin" Ethernet cable can only go to 300 meters. Routerscan be used to link these cables together, so that an intranetcan be extended well beyond those distances. But when that isdone, each length of wire is essentially considered its own subnetwork.<P>Yet one more set of problems has to do with the volume of trafficthat travels across an intranet. Often in a corporation, in agiven department, most of the traffic is intradepartmental traffic-inother words, mail and other data that people within a departmentsend to each another. The volume of traffic outside to other departmentsis considerably less. What's called for is a way to confine intradepartmentaltraffic inside the departments, to cut down on the amount of datathat needs to be routed and managed across the entire intranet.<P>Subnetting solves all these problems and more. When an intranetis divided into subnets, one central administrator doesn't haveto manage every aspect of the entire intranet. Instead, each subnetcan take care of its own administration. That means smaller organizationswithin the larger organization can take care of problems suchas address management and a variety of troubleshooting chores.If an intranet is subnetted by divisions or departments, it meansthat each division or department can guide the development ofits own network, while adhering to general intranet architecture.Doing this allows departments or divisions more freedom to usetechnology to pursue their business goals.<P>Subnets also get around problems that arise when an intranet haswithin it different kinds of network architecture, such as Ethernetand Token Ring technologies. Normally-if there is no subnetting-arouter can't link these different networks together because theydon't have their own addresses. However, if each of the differentnetworks is its own subnet-and so has its own network address-routerscan then link them together and properly route intranet traffic.<P>Subnetting can also cut down on the traffic traveling across theintranet and its routers. Since much network traffic may be confinedwithin departments, having each department be its own subnet meansthat all that traffic need never cross an intranet router andcross the intranet-it will stay within its own subnet.<P>Subnetting can also increase the security on an intranet. If thepayroll department, for example, were on its own subnet, thenmuch of its traffic would not have to travel across an intranet.Having its data traveling across the intranet could mean thatsomeone could conceivably hack into the data to read it. Confiningthe data to its own subnet makes that much less likely to happen.<P>Dividing an intranet into subnets can also make the entire intranetmore stable. If an intranet is divided in this way, then if onesubnet goes down or is often unstable, it won't affect the restof the intranet. <P>This all may sound rather confusing. To see how it's done, let'stake a look at a network, and see how to use the IP address tocreate subnets. Let's say we have a Class B network. That networkis assigned the address of 130.97.0.0. When a network is givenan address, it is assigned the netid numbers-in this case, the130.97-and it can assign the host numbers (in this case, 0.0)in any way that it chooses.<P>The 130.97.0.0 network is a single intranet. It's getting toolarge to manage, though, and we've decided to divide it into twosubnets. What we do is fairly straightforward. We take a numberfrom the hostid field and use it to identify each of the subnets.So one subnet gets the address 130.97.1.0, and the other getsthe address 130.97.2.0. Individual machines on the first subnetget addresses of 130.97.1.1, 130.97.1.2, and so on. Individualmachines on the second subnet get addresses of 130.97.2.1, 130.97.2.2and so on.<P>Sounds simple. But we have a problem. The Internet doesn't recognize130.97.1.0 and 130.97.2.0 as separate networks. It treats themboth as 130.97.0.0 since the "1" and "2" thatwe're using as a netid is only known to the Internet as a hostid.So our intranet router will not be able to route incoming trafficto the proper network.<P>To solve the problem, a subnet mask is used. A subnet mask isa 32-bit number in IP form used by intranet routers and hoststhat will help routers understand how to route information tothe proper subnet. To the outside Internet, there is still onlyone network, but the subnet mask allows routers inside the intranetto send traffic to the proper host.<P>A subnet mask is a number such as 255.255.255.0 (the built-indefault for Class C addresses; the Class B default is 255.255.0.0and the default for Class A is 255.0.0.0). A router takes thesubnet mask and applies that number against the IP number of incomingmail to the network by using it to perform a calculation. Basedon the resulting IP number, it will route mail to the proper subnet,and then to a particular computer on the subnet. For consistency,everyone in a particular intranet will use the same subnet mask.<H2><A NAME="SubnettinganIntranet"><FONT SIZE=5 COLOR=#FF0000>Subnetting an Intranet</FONT></A></H2><P>When intranets are over a certain size, or are spread over severalgeographical locations, it becomes difficult to manage them asa single network. To solve the problem, the single intranet canbe subdivided into several <I>subnets</I>, subsections of an intranetthat make them easier to manage. To the outside world, the intranetstill looks as if it's a single network.<OL><LI>If you're building an intranet and want it to be connectedto the Internet, you'll need a unique IP address for your intranetnetwork, which the InterNIC Registration Services will handle.There are three classes of intranet you can have: Class A, ClassB, or Class C. Generally, a Class A rating is best for the largestnetworks, while a Class C is best for the smallest. A Class Anetwork can be composed of 127 networks, and a total of 16,777,214nodes on the network. A Class B network can be composed of 16,383networks, and a total of 65,534 nodes. A Class C network can becomposed of 2,097,151 networks, and 254 nodes.<LI>When an intranet is assigned an address, it is assigned thefirst two IP numbers of the Internet numeric address (called the<I>netid</I> field) and the remaining two numbers (called the<I>hostid</I> field) are left blank, so that the intranet itselfcan assign them, such as 147.106.0.0. The hostid field consistsof a number for a subnet and a host number.<LI>When an intranet is connected to the Internet, a router handlesthe job of sending packets into the intranet from the Internet.In our example, all incoming mail and data comes to a router fora network with the netid of 147.106.0.0.<LI>When intranets grow-for example, if there is a departmentlocated in another building, city, or country-there needs to besome way to manage network traffic. It may be impractical andphysically impossible to route all the data necessary among manydifferent computers spread across a building or the world. A secondnetwork-called a <I>subnetwork</I> or <I>subnet</I>-needs to becreated.<LI>In order to have a router handle all incoming traffic fora subnetted intranet, the first byte of the hostid field is used.The bits that are used to distinguish among subnets are called<I>subnet numbers</I>. In our example, there are two subnets onthe intranet. To the outside world, there appears to be only onenetwork.<LI>Each computer on each subnet gets its own IP address, as ina normal intranet. The combination of the netid field, the subnetnumber, and then finally a host number, forms the IP address.<LI>The router must be informed that the hostid field in subnetsmust be treated differently than non-subnetted hostid fields,otherwise it won't be able to properly route data. In order todo this, a <I>subnet mask</I> is used. A subnet mask is a 32-bitnumber such as 255.255.0.0 that is used in concert with the numbersin the hostid field. When a calculation is performed using thesubnet mask and the IP address, the router knows where to routethe mail. The subnet mask is put in people's network configurationfiles.</OL><HR><CENTER><P><A HREF="ch9.htm"><IMG SRC="PC.GIF" BORDER=0 HEIGHT=88 WIDTH=140></A><A HREF="#CONTENTS"><IMG SRC="CC.GIF" BORDER=0 HEIGHT=88 WIDTH=140></A><A HREF="contents.htm"><IMG SRC="HB.GIF" BORDER=0 HEIGHT=88 WIDTH=140></A><A HREF="ch11.htm"><IMG SRC="NC.GIF" BORDER=0 HEIGHT=88 WIDTH=140></A><HR WIDTH="100%"></P></CENTER></BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -