intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

CCENT/CCNA ICND1 Official Exam Certification Guide - Chapter 2

Chia sẻ: Nguyen Nhi | Ngày: | Loại File: PDF | Số trang:24

91
lượt xem
17
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

The TCP/IP and OSI Networking Models Mô hình kết nối mạng hạn, hoặc kiến ​​trúc mạng dùng để chỉ một tập hợp các văn bản tổ chức. Cá nhân, các tài liệu này mô tả một chức năng nhỏ cần thiết cho một mạng. Những tài liệu này có thể định nghĩa một giao thức, mà là một tập hợp các quy tắc hợp lý rằng các thiết bị phải tuân theo để giao tiếp. Các tài liệu khác có thể xác định một số yêu cầu vật chất cho mạng, ví dụ, nó có thể xác định các...

Chủ đề:
Lưu

Nội dung Text: CCENT/CCNA ICND1 Official Exam Certification Guide - Chapter 2

  1. 1828xbook.fm Page 17 Thursday, July 26, 2007 3:10 PM 2 CHAPTER The TCP/IP and OSI Networking Models The term networking model, or networking architecture, refers to an organized set of documents. Individually, these documents describe one small function required for a network. These documents may define a protocol, which is a set of logical rules that devices must follow to communicate. Other documents may define some physical requirements for networking, for example, it may define the voltage and current levels used on a particular cable. Collectively, the documents referenced in a networking model define all the details of how to create a complete working network. To create a working network, the devices in that network need to follow the details referenced by a particular networking model. When multiple computers and other networking devices implement these protocols, physical specifications, and rules, and the devices are then connected correctly, the computers can successfully communicate. You can think of a networking model as you think of a set of architectural plans for building a house. Sure, you can build a house without the architectural plans, but it will work better if you follow the plans. And because you probably have a lot of different people working on building your house, such as framers, electricians, bricklayers, painters, and so on, it helps if they can all reference the same plan. Similarly, you could build your own network, write your own software, build your own networking cards, and create a network without using any existing networking model. However, it is much easier to simply buy and use products that already conform to some well-known networking model. And because the networking product vendors use the same networking model, their products should work well together. The CCNA exams include detailed coverage of one networking model—the Transmission Control Protocol/Internet Protocol, or TCP/IP. TCP/IP is the most pervasively used networking model in the history of networking. You can find support for TCP/IP on practically every computer operating system in existence today, from mobile phones to mainframe computers. Almost every network built using Cisco products today supports TCP/IP. Not surprisingly, the CCNA exams focus heavily on TCP/IP.
  2. 1828xbook.fm Page 18 Thursday, July 26, 2007 3:10 PM 18 Chapter 2: The TCP/IP and OSI Networking Models The ICND1 exam, and the ICND2 exam to a small extent, also covers a second networking model, called the Open System Interconnection (OSI) reference model. Historically, OSI was the first large effort to create a vendor-neutral networking model, a model that was intended to be used by any and every computer in the world. Because OSI was the first major effort to create a vendor-neutral networking architectural model, many of the terms used in networking today come from the OSI model. “Do I Know This Already?” Quiz The “Do I Know This Already?” quiz allows you to assess if you should read the entire chapter. If you miss no more than one of these 10 self-assessment questions, you might want to move ahead to the “Exam Preparation Tasks” section. Table 2-1 lists the major headings in this chapter and the “Do I Know This Already?” quiz questions covering the material in those headings so you can assess your knowledge of these specific areas. The answers to the “Do I Know This Already?” quiz appear in Appendix A. “Do I Know This Already?” Foundation Topics Section-to-Question Mapping Table 2-1 Foundation Topics Section Questions The TCP/IP Protocol Architecture 1–6 The OSI Reference Model 7–10 Which of the following protocols are examples of TCP/IP transport layer protocols? 1. Ethernet a. HTTP b. IP c. UDP d. SMTP e. TCP f. Which of the following protocols are examples of TCP/IP network access layer 2. protocols? Ethernet a. HTTP b. IP c. UDP d. SMTP e.
  3. 1828xbook.fm Page 19 Thursday, July 26, 2007 3:10 PM “Do I Know This Already?” Quiz 19 TCP f. PPP g. The process of HTTP asking TCP to send some data and make sure that it is received 3. correctly is an example of what? Same-layer interaction a. Adjacent-layer interaction b. The OSI model c. All the other answers are correct. d. The process of TCP on one computer marking a segment as segment 1, and the 4. receiving computer then acknowledging the receipt of segment 1, is an example of what? Data encapsulation a. Same-layer interaction b. Adjacent-layer interaction c. The OSI model d. None of these answers are correct. e. The process of a web server adding a TCP header to a web page, followed by adding 5. an IP header, and then a data link header and trailer is an example of what? Data encapsulation a. Same-layer interaction b. The OSI model c. All of these answers are correct. d. Which of the following terms is used specifically to identify the entity that is created 6. when encapsulating data inside data link layer headers and trailers? Data a. Chunk b. Segment c. Frame d. Packet e. None of these—there is no encapsulation by the data link layer. f.
  4. 1828xbook.fm Page 20 Thursday, July 26, 2007 3:10 PM 20 Chapter 2: The TCP/IP and OSI Networking Models Which OSI layer defines the functions of logical network-wide addressing and routing? 7. Layer 1 a. Layer 2 b. Layer 3 c. Layer 4 d. Layer 5 e. Layer 6 f. Layer 7 g. Which OSI layer defines the standards for cabling and connectors? 8. Layer 1 a. Layer 2 b. Layer 3 c. Layer 4 d. Layer 5 e. Layer 6 f. Layer 7 g. Which OSI layer defines the standards for data formats and encryption? 9. Layer 1 a. Layer 2 b. Layer 3 c. Layer 4 d. Layer 5 e. Layer 6 f. Layer 7 g. Which of the following terms are not valid terms for the names of the seven OSI layers? 10. Application a. Data link b. Transmission c. Presentation d. Internet e. Session f.
  5. 1828xbook.fm Page 21 Thursday, July 26, 2007 3:10 PM Foundation Topics 21 Foundation Topics It is practically impossible to find a computer today that does not support the set of networking protocols called TCP/IP. Every Microsoft, Linux, and UNIX operating system includes support for TCP/IP. Hand-held digital assistants and cell phones support TCP/IP. And because Cisco sells products that create the infrastructure that allows all of these computers to talk with each other using TCP/IP, Cisco products also include extensive support for TCP/IP. The world has not always been so simple. Once upon a time, there were no networking protocols, including TCP/IP. Vendors created the first networking protocols; these protocols supported only that vendor’s computers, and the details were not even published to the public. As time went on, vendors formalized and published their networking protocols, enabling other vendors to create products that could communicate with their computers. For instance, IBM published its Systems Network Architecture (SNA) networking model in 1974. After SNA was published, other computer vendors created products that allowed their computers to communicate with IBM computers using SNA. This solution worked, but it had some negatives, including the fact that it meant that the larger computer vendors tended to rule the networking market. A better solution was to create an open standardized networking model that all vendors would support. The International Organization for Standardization (ISO) took on this task starting as early as the late 1970s, beginning work on what would become known as the Open System Interconnection (OSI) networking model. ISO had a noble goal for the OSI model: to standardize data networking protocols to allow communication between all computers across the entire planet. ISO worked toward this ambitious and noble goal, with participants from most of the technologically developed nations on Earth participating in the process. A second, less formal effort to create a standardized, public networking model sprouted forth from a U.S. Defense Department contract. Researchers at various universities volunteered to help further develop the protocols surrounding the original department’s work. These efforts resulted in a competing networking model called TCP/IP. By the late 1980s, the world had many competing vendor-proprietary networking models plus two competing standardized networking models. So what happened? TCP/IP won in the end. Proprietary protocols are still in use today in many networks, but much less so than in the 1980s and 1990s. The OSI model, whose development suffered in part because of a slower formal standardization process as compared with TCP/IP, never succeeded in the marketplace. And TCP/IP, the networking model created almost entirely by a bunch of volunteers, has become the most prolific set of data networking protocols ever.
  6. 1828xbook.fm Page 22 Thursday, July 26, 2007 3:10 PM 22 Chapter 2: The TCP/IP and OSI Networking Models In this chapter, you will read about some of the basics of TCP/IP. Although you will learn some interesting facts about TCP/IP, the true goal of this chapter is to help you understand what a networking model or networking architecture really is and how one works. Also in this chapter, you will learn about some of the jargon used with OSI. Will any of you ever work on a computer that is using the full OSI protocols instead of TCP/IP? Probably not. However, you will often use terms relating to OSI. Also, the ICND1 exam covers the basics of OSI, so this chapter also covers OSI to prepare you for questions about it on the exam. The TCP/IP Protocol Architecture TCP/IP defines a large collection of protocols that allow computers to communicate. TCP/IP defines the details of each of these protocols inside documents called Requests for Comments (RFC). By implementing the required protocols defined in TCP/IP RFCs, a computer can be relatively confident that it can communicate with other computers that also implement TCP/IP. An easy comparison can be made between telephones and computers that use TCP/IP. You go to the store and buy a phone from one of a dozen different vendors. When you get home and plug in the phone to the same cable in which your old phone was connected, the new phone works. The phone vendors know the standards for phones in their country and build their phones to match those standards. Similarly, a computer that implements the standard networking protocols defined by TCP/IP can communicate with other computers that also use the TCP/IP standards. Like other networking architectures, TCP/IP classifies the various protocols into different categories or layers. Table 2-2 outlines the main categories in the TCP/IP architectural model. TCP/IP Architectural Model and Example Protocols Table 2-2 TCP/IP Architecture Layer Example Protocols Application HTTP, POP3, SMTP Transport TCP, UDP Internet IP Network access Ethernet, Frame Relay The TCP/IP model represented in column 1 of the table lists the four layers of TCP/IP, and column 2 of the table lists several of the most popular TCP/IP protocols. If someone
  7. 1828xbook.fm Page 23 Thursday, July 26, 2007 3:10 PM The TCP/IP Protocol Architecture 23 makes up a new application, the protocols used directly by the application would be considered to be application layer protocols. For example, when the World Wide Web (WWW) was first created, a new application layer protocol was created for the purpose of asking for web pages and receiving the contents of the web pages. Similarly, the network access layer includes protocols and standards such as Ethernet. If someone makes up a new type of LAN, those protocols would be considered to be a part of the network access layer. In the next several sections, you will learn the basics about each of these four layers in the TCP/IP architecture and how they work together. The TCP/IP Application Layer TCP/IP application layer protocols provide services to the application software running on a computer. The application layer does not define the application itself, but rather it defines services that applications need—such as the capability to transfer a file in the case of HTTP. In short, the application layer provides an interface between software running on a computer and the network itself. Arguably, the most popular TCP/IP application today is the web browser. Many major software vendors either have already changed or are changing their software to support access from a web browser. And thankfully, using a web browser is easy—you start a web browser on your computer and select a website by typing in the name of the website, and the web page appears. What really happens to allow that web page to appear on your web browser? Imagine that Bob opens his browser. His browser has been configured to automatically ask for web server Larry’s default web page, or home page. The general logic looks like that in Figure 2-1. Basic Application Logic to Get a Web Page Figure 2-1 TCP/IP Network Web Web Browser Server Give Me Your Home Page Here Is File home.htm Larry Bob So what really happened? Bob’s initial request actually asks Larry to send his home page back to Bob. Larry’s web server software has been configured to know that the default web page is contained in a file called home.htm. Bob receives the file from Larry and displays the contents of the file in the web browser window.
  8. 1828xbook.fm Page 24 Thursday, July 26, 2007 3:10 PM 24 Chapter 2: The TCP/IP and OSI Networking Models Taking a closer look, this example uses two TCP/IP application layer protocols. First, the request for the file and the actual transfer of the file are performed according to the Hypertext Transfer Protocol (HTTP). Many of you have probably noticed that most websites’ URLs—universal resource locators (often called web addresses), the text that identifies web pages—begin with the letters “http,” to imply that HTTP will be used to transfer the web pages. The other protocol used is the Hypertext Markup Language (HTML). HTML is one of many specifications that define how Bob’s web browser should interpret the text inside the file he just received. For instance, the file might contain directions about making certain text be a certain size, color, and so on. In most cases, the file also includes directions about other files that Bob’s web browser should get—files that contain such things as pictures and animation. HTTP would then be used to get those additional files from Larry, the web server. A closer look at how Bob and Larry cooperate in this example reveals some details about how networking protocols work. Consider Figure 2-2, which simply revises Figure 2-1, showing the locations of HTTP headers and data. HTTP Get Request and HTTP Reply Figure 2-2 Larry Bob HTTP Header: Get home.htm HTTP OK Contents home.htm Web Server Web Browser To get the web page from Larry, Bob sends something called an HTTP header to Larry. This header includes the command to “get” a file. The request typically contains the name of the file (home.htm in this case), or, if no filename is mentioned, the web server assumes that Bob wants the default web page. The response from Larry includes an HTTP header as well, with something as simple as “OK” returned in the header. In reality, the header includes an HTTP return code, which indicates whether the request can be serviced. For instance, if you have ever looked for a web page that was not found, then you received an HTTP 404 “not found” error, which means that you received an HTTP return code of 404. When the requested file is found, the return code is 200, meaning that the request is being processed. This simple example between Bob and Larry introduces one of the most important general concepts behind networking models: when a particular layer on one computer wants to communicate with the same layer on another computer, the two computers use headers to hold the information that they want to communicate. The headers are part of what is transmitted between the two computers. This process is called same-layer interaction.
  9. 1828xbook.fm Page 25 Thursday, July 26, 2007 3:10 PM The TCP/IP Protocol Architecture 25 The application layer protocol (HTTP, in this case) on Bob is communicating with Larry’s application layer. They each do so by creating and sending application layer headers to each other—sometimes with application data following the header and sometimes not, as seen in Figure 2-2. Regardless of what the application layer protocol happens to be, they all use the same general concept of communicating with the application layer on the other computer using application layer headers. TCP/IP application layer protocols provide services to the application software running on a computer. The application layer does not define the application itself, but rather it defines services that applications need, such as the ability to transfer a file in the case of HTTP. In short, the application layer provides an interface between software running on a computer and the network itself. The TCP/IP Transport Layer The TCP/IP application layer includes a relatively large number of protocols, with HTTP being only one of those. The TCP/IP transport layer consists of two main protocol options: the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). To get a true appreciation for what TCP/IP transport layer protocols do, read Chapter 6, “Fundamentals of TCP/IP Transport, Applications, and Security.” However, in this section, you will learn about one of the key features of TCP, which enables us to cover some more general concepts about how networking models behave. To appreciate what the transport layer protocols do, you must think about the layer above the transport layer, the application layer. Why? Well, each layer provides a service to the layer above it. For example, in Figure 2-2, Bob and Larry used HTTP to transfer the home page from Larry to Bob. But what would have happened if Bob’s HTTP get request had been lost in transit through the TCP/IP network? Or, what would have happened if Larry’s response, which included the contents of the home page, had been lost? Well, as you might expect, in either case the page would not have shown up in Bob’s browser. So, TCP/IP needs a mechanism to guarantee delivery of data across a network. Because many application layer protocols probably want a way to guarantee delivery of data across a network, TCP provides an error-recovery feature to the application protocols by using acknowledgments. Figure 2-3 outlines the basic acknowledgment logic. NOTE The data shown in the rectangles in Figure 2-3, which includes the transport layer header and its encapsulated data, is called a segment.
  10. 1828xbook.fm Page 26 Thursday, July 26, 2007 3:10 PM 26 Chapter 2: The TCP/IP and OSI Networking Models TCP Services Provided to HTTP Figure 2-3 Web Server Web Browser Larry Bob Please Reliably Send This, Mr. TCP! HTTP GET TCP HTTP GET TCP Acknowledgment HTTP OK Web Page TCP TCP Acknowledgment As Figure 2-3 shows, the HTTP software asks for TCP to reliably deliver the HTTP get request. TCP sends the HTTP data from Bob to Larry, and the data arrives successfully. Larry’s TCP software acknowledges receipt of the data and also gives the HTTP get request to the web server software. The reverse happens with Larry’s response, which also arrives at Bob successfully. Of course, the benefits of TCP error recovery cannot be seen unless the data is lost. (Chapter 6 shows an example of how TCP recovers lost data.) For now, assume that if either transmission in Figure 2-3 were lost, HTTP would not take any direct action, but TCP would resend the data and ensure that it was received successfully. This example demonstrates a function called adjacent-layer interaction, which defines the concepts of how adjacent layers in a networking model, on the same computer, work together. The higher-layer protocol (HTTP) needs to do something it cannot do (error recovery). So, the higher layer asks for the next lower-layer protocol (TCP) to perform the service, and the next lower layer performs the service. The lower layer provides a service to the layer above it. Table 2-3 summarizes the key points about how adjacent layers work together on a single computer and how one layer on one computer works with the same networking layer on another computer. Summary: Same-Layer and Adjacent-Layer Interactions Table 2-3 Concept Description Same-layer interaction on The two computers use a protocol to communicate with the same different computers layer on another computer. The protocol defined by each layer uses a header that is transmitted between the computers, to communicate what each computer wants to do. Adjacent-layer interaction On a single computer, one layer provides a service to a higher layer. The on the same computer software or hardware that implements the higher layer requests that the next lower layer perform the needed function.
  11. 1828xbook.fm Page 27 Thursday, July 26, 2007 3:10 PM The TCP/IP Protocol Architecture 27 All the examples describing the application and transport layers ignored many details relating to the physical network. The application and transport layers work the same way regardless of whether the endpoint host computers are on the same LAN or are separated by the entire Internet. The lower two layers of TCP/IP, the internet layer and the network access layer, must understand the underlying physical network because they define the protocols used to deliver the data from one host to another. The TCP/IP Internet Layer Imagine that you just wrote a letter to your favorite person on the other side of the country and that you also wrote a letter to someone on the other side of town. It is time to send the letters. Is there much difference in how you treat each letter? Not really. You put a different address on the envelope for each letter because the letters need to go to two different places. You put stamps on both letters and put them in the same mailbox. The postal service takes care of all the details of figuring out how to get each letter to the right place, whether it is across town or across the country. When the postal service processes the cross-country letter, it sends the letter to another post office, then another, and so on, until the letter gets delivered across the country. The local letter might go to the post office in your town and then simply be delivered to your friend across town, without going to another post office. So what does this all matter to networking? Well, the internet layer of the TCP/IP networking model, primarily defined by the Internet Protocol (IP), works much like the postal service. IP defines addresses so that each host computer can have a different IP address, just as the postal service defines addressing that allows unique addresses for each house, apartment, and business. Similarly, IP defines the process of routing so that devices called routers can choose where to send packets of data so that they are delivered to the correct destination. Just as the postal service created the necessary infrastructure to be able to deliver letters—post offices, sorting machines, trucks, planes, and personnel—the internet layer defines the details of how a network infrastructure should be created so that the network can deliver data to all computers in the network. Chapter 5, “Fundamentals of IP Addressing and Routing,” describes the TCP/IP internet layer further, with other details scattered throughout this book and the CCNA ICND2 Official Exam Certification Guide. But to help you understand the basics of the internet layer, take a look at Bob’s request for Larry’s home page, now with some information about IP, in Figure 2-4. The LAN cabling details are not important for this figure, so both LANs simply are represented by the lines shown near Bob and Larry, respectively. When Bob sends the data, he is sending an IP packet, which includes the IP header, the transport layer header (TCP, in this example), the application header (HTTP, in this case), and any application data (none, in this case). The IP header includes both a source and a destination
  12. 1828xbook.fm Page 28 Thursday, July 26, 2007 3:10 PM 28 Chapter 2: The TCP/IP and OSI Networking Models IP address field, with Larry’s IP address (1.1.1.1) as the destination address and Bob’s IP address (2.2.2.2) as the source. IP Services Provided to TCP Figure 2-4 Bob - 2.2.2.2 Larry - 1.1.1.1 HTTP GET R2 TCP HTTP GET R1 IP TCP HTTP GET Destination: 1.1.1.1 R3 Source: 2.2.2.2 NOTE The data shown in the bottom rectangle in Figure 2-4, which includes the internet layer header and its encapsulated data, is called a packet. Bob sends the packet to R2. R2 then examines the destination IP address (1.1.1.1) and makes a routing decision to send the packet to R1, because R2 knows enough about the network topology to know that 1.1.1.1 (Larry) is on the other side of R1. Similarly, when R1 gets the packet, it forwards the packet over the Ethernet to Larry. And if the link between R2 and R1 fails, IP allows R2 to learn of the alternate route through R3 to reach 1.1.1.1. IP defines logical addresses, called IP addresses, which allow each TCP/IP-speaking device (called IP hosts) to have an address with which to communicate. IP also defines routing, the process of how a router should forward, or route, packets of data. All the CCNA exams cover IP fairly deeply. For the ICND1 exam, this book’s Chapter 5 covers more of the basics, with Chapters 11 through 15 covering IP in much more detail. The TCP/IP Network Access Layer The network access layer defines the protocols and hardware required to deliver data across some physical network. The term network access refers to the fact that this layer defines how to physically connect a host computer to the physical media over which data can be transmitted. For instance, Ethernet is one example protocol at the TCP/IP network access layer. Ethernet defines the required cabling, addressing, and protocols used to create an Ethernet LAN. Likewise, the connectors, cables, voltage levels, and protocols used to deliver data across WAN links are defined in a variety of other protocols that also fall into the network access layer. Chapters 3 and 4 cover the fundamentals of LANs and WANs, respectively.
  13. 1828xbook.fm Page 29 Thursday, July 26, 2007 3:10 PM The TCP/IP Protocol Architecture 29 Just like every layer in any networking model, the TCP/IP network access layer provides services to the layer above it in the model. The best way to understand the basics of the TCP/IP network access layer is to examine the services that it provides to IP. IP relies on the network access layer to deliver IP packets across a physical network. IP understands the overall network topology, things such as which routers are connected to each other, which host computers are connected to which physical networks, and what the IP addressing scheme looks like. However, the IP protocol purposefully does not include the details about each of the underlying physical networks. Therefore, the Internet layer, as implemented by IP, uses the services of the network access layer to deliver the packets over each physical network, respectively. The network access layer includes a large number of protocols. For instance, the network access layer includes all the variations of Ethernet protocols and other LAN standards. This layer also includes the popular WAN standards, such as the Point-to-Point Protocol (PPP) and Frame Relay. The same familiar network is shown in Figure 2-5, with Ethernet and PPP used as the two network access layer protocols. Ethernet and PPP Services Provided to IP Figure 2-5 Larry Bob 1.1.1.1 2.2.2.2 R1 R2 IP Data IP Data PPP IP Data PPP Eth. IP Data Eth. Eth. IP Data Eth. NOTE The data shown in several of the rectangles in Figure 2-5—those including the Ethernet header/trailer and PPP header/trailer—are called frames. To fully appreciate Figure 2-5, first think a little more deeply about how IP accomplishes its goal of delivering the packet from Bob to Larry. To send a packet to Larry, Bob sends the IP packet to router R2. To do so, Bob uses Ethernet to get the packet to R2—a process that requires Bob to follow Ethernet protocol rules, placing the IP packet (IP header and data) between an Ethernet header and Ethernet trailer. Because the goal of the IP routing process is to deliver the IP packet—the IP header and data—to the destination host, R2 no longer needs the Ethernet header and trailer received from Bob. So, R2 strips the Ethernet header and trailer, leaving the original IP packet. To send the IP packet from R2 to R1, R2 places a PPP header in front of the IP packet and a PPP trailer at the end, and sends this data frame over the WAN link to R1.
  14. 1828xbook.fm Page 30 Thursday, July 26, 2007 3:10 PM 30 Chapter 2: The TCP/IP and OSI Networking Models Similarly, after the packet is received by R1, R1 removes the PPP header and trailer because PPP’s job is to deliver the IP packet across the serial link. R1 then decides that it should forward the packet over the Ethernet to Larry. To do so, R1 adds a brand-new Ethernet header and trailer to the packet and forwards it to Larry. In effect, IP uses the network access layer protocols to deliver an IP packet to the next router or host, with each router repeating the process until the packet arrives at the destination. Each network access protocol uses headers to encode the information needed to successfully deliver the data across the physical network, in much the same way as other layers use headers to achieve their goals. CAUTION Many people describe the network access layer of the TCP/IP model as two layers, the data link layer and the physical layer. The reasons for the popularity of these alternate terms are explained in the section covering OSI, because the terms originated with the OSI model. In short, the TCP/IP network access layer includes the protocols, cabling standards, headers, and trailers that define how to send data across a wide variety of types of physical networks. Data Encapsulation Terminology As you can see from the explanations of how HTTP, TCP, IP, and the network access layer protocols Ethernet and PPP do their jobs, each layer adds its own header (and sometimes trailer) to the data supplied by the higher layer. The term encapsulation refers to the process of putting headers and trailers around some data. For example, the web server encapsulated the home page inside an HTTP header in Figure 2-2. The TCP layer encapsulated the HTTP headers and data inside a TCP header in Figure 2-3. IP encapsulated the TCP headers and the data inside an IP header in Figure 2-4. Finally, the network access layer encapsulated the IP packets inside both a header and a trailer in Figure 2-5. The process by which a TCP/IP host sends data can be viewed as a five-step process. The first four steps relate to the encapsulation performed by the four TCP/IP layers, and the last step is the actual physical transmission of the data by the host. The steps are summarized in the following list: Step 1 Create and encapsulate the application data with any required application layer headers. For example, the HTTP OK message can be returned in an HTTP header, followed by part of the contents of a web page. Step 2 Encapsulate the data supplied by the application layer inside a transport layer header. For end-user applications, a TCP or UDP header is typically used.
  15. 1828xbook.fm Page 31 Thursday, July 26, 2007 3:10 PM The TCP/IP Protocol Architecture 31 Step 3 Encapsulate the data supplied by the transport layer inside an internet layer (IP) header. IP is the only protocol available in the TCP/IP network model. Step 4 Encapsulate the data supplied by the internet layer inside a network access layer header and trailer. This is the only layer that uses both a header and a trailer. Step 5 Transmit the bits. The physical layer encodes a signal onto the medium to transmit the frame. The numbers in Figure 2-6 correspond to the five steps in the list, graphically showing the same concepts. Note that because the application layer often does not need to add a header, the figure does not show a specific application layer header. Five Steps of Data Encapsulation—TCP/IP Figure 2-6 Data 1. Application TCP Data 2. Transport IP TCP Data 3. Internet Network LH IP TCP Data LT 4. Access Transmit Bits 5. *The letters LH and LT stand for link header and link trailer, respectively, and refer to the data link layer header and trailer. Finally, take particular care to remember the terms segment, packet, and frame, and the meaning of each. Each term refers to the headers and possibly trailers defined by a particular layer, and the data encapsulated following that header. Each term, however, refers to a different layer—segment for the transport layer, packet for the internet layer, and frame for the network access layer. Figure 2-7 shows each layer along with the associated term. Perspectives on Encapsulation and “Data” Figure 2-7 TCP Data Segment IP Data Packet LH Data LT Frame
  16. 1828xbook.fm Page 32 Thursday, July 26, 2007 3:10 PM 32 Chapter 2: The TCP/IP and OSI Networking Models Note that Figure 2-7 also shows the encapsulated data as simply “data.” When focusing on the work done by a particular layer, the encapsulated data typically is unimportant. For example, an IP packet may indeed have a TCP header after the IP header, an HTTP header after the TCP header, and data for a web page after the HTTP header—but when discussing IP, you probably just care about the IP header, so everything after the IP header is just called “data.” So, when drawing IP packets, everything after the IP header is typically shown simply as “data.” The OSI Reference Model To pass the ICND1 exam, you must be conversant in a protocol specification with which you are very unlikely to ever have any hands-on experience—the OSI reference model. The difficulty these days when discussing the OSI protocol specifications is that you have no point of reference, because most people cannot simply walk down the hall and use a computer whose main, or even optional, networking protocols conform to the entire OSI model. OSI is the Open System Interconnection reference model for communications. OSI as a whole never succeeded in the marketplace, although some of the original protocols that comprised the OSI model are still used. So, why do you even need to think about OSI for the CCNA exams? Well, the OSI model now is mainly used as a point of reference for discussing other protocol specifications. And because being either a CCENT or CCNA requires you to understand some of the concepts and terms behind networking architecture and models, and because other protocols (including TCP/IP) are almost always compared to OSI, using OSI terminology, you need to know some things about OSI. Comparing OSI and TCP/IP The OSI reference model consists of seven layers. Each layer defines a set of typical networking functions. When OSI was in active development in the 1980s and 1990s, the OSI committees created new protocols and specifications to implement the functions specified by each layer. In other cases, just as for TCP/IP, the OSI committees did not create new protocols or standards, but instead referenced other protocols that were already defined. For instance, the IEEE defines Ethernet standards, so the OSI committees did not waste time specifying a new type of Ethernet; it simply referred to the IEEE Ethernet standards. Today the OSI model can be used as a standard of comparison to other networking models. Figure 2-8 compares the seven-layer OSI model with the four-layer TCP/IP model. Also, for perspective, the figure also shows some example protocols and the related layers.
  17. 1828xbook.fm Page 33 Thursday, July 26, 2007 3:10 PM The OSI Reference Model 33 Using OSI Layers for Referencing Other Protocols Figure 2-8 OSI TCP/IP NetWare Application HTTP, SMTP, Presentation Application POP3, VoIP Session Transport Transport SPX Internet IPX Network Data Link Network Mac Access Protocols Physical Because OSI does have a very well-defined set of functions associated with each of its seven layers, you can examine any networking protocol or specification and make some determination of whether it most closely matches OSI Layer 1, 2, or 3, and so on. For instance, TCP/IP’s internet layer, as implemented mainly by IP, equates most directly to the OSI network layer. So, most people say that IP is a network layer protocol, or a Layer 3 protocol, using OSI terminology and numbers for the layer. Of course, if you numbered the TCP/IP model, starting at the bottom, IP would be in Layer 2—but, by convention, everyone uses the OSI standard when describing other protocols. So, using this convention, IP is a network layer protocol. While Figure 2-8 seems to imply that the OSI network layer and the TCP/IP internet layer are at least similar, the figure does not point out why they are similar. To appreciate why the TCP/IP layers correspond to a particular OSI layer, you need to have a better understanding of OSI. For example, the OSI network layer defines logical addressing and routing, as does the TCP/IP internet layer. While the details differ significantly, because the OSI network layer and TCP/IP internet layer define similar goals and features, the TCP/IP internet layer matches the OSI network layer. Similarly, the TCP/IP transport layer defines many functions, including error recovery, as does the OSI transport layer—so TCP is called a transport layer, or Layer 4, protocol. Not all TCP/IP layers correspond to a single OSI layer. In particular, the TCP/IP network access layer defines both the physical network specifications and the protocols used to control the physical network. OSI separates the physical network specifications into the physical layer and the control functions into the data link layer. In fact, many people think of TCP/IP as a five-layer model, replacing the TCP/IP’s network access layer with two layers, namely a physical layer and a data link layer, to match OSI. NOTE For the exams, be aware of both views about whether TCP/IP has a single network access layer or two lower layers (data link and physical).
  18. 1828xbook.fm Page 34 Thursday, July 26, 2007 3:10 PM 34 Chapter 2: The TCP/IP and OSI Networking Models OSI Layers and Their Functions Cisco requires that CCNAs demonstrate a basic understanding of the functions defined by each OSI layer, as well as remembering the names of the layers. It is also important that, for each device or protocol referenced throughout the book, you understand which layers of the OSI model most closely match the functions defined by that device or protocol. The upper layers of the OSI reference model (application, presentation, and session—Layers 7, 6, and 5) define functions focused on the application. The lower four layers (transport, network, data link, and physical—Layers 4, 3, 2, and 1) define functions focused on end- to-end delivery of the data. The CCNA exams focus on issues in the lower layers—in particular, with Layer 2, upon which LAN switching is based, and Layer 3, upon which routing is based. Table 2-4 defines the functions of the seven layers. OSI Reference Model Layer Definitions Table 2-4 Layer Functional Description 7 Layer 7 provides an interface between the communications software and any applications that need to communicate outside the computer on which the application resides. It also defines processes for user authentication. 6 This layer’s main purpose is to define and negotiate data formats, such as ASCII text, EBCDIC text, binary, BCD, and JPEG. Encryption also is defined by OSI as a presentation layer service. 5 The session layer defines how to start, control, and end conversations (called sessions). This includes the control and management of multiple bidirectional messages so that the application can be notified if only some of a series of messages are completed. This allows the presentation layer to have a seamless view of an incoming stream of data. 4 Layer 4 protocols provide a large number of services, as described in Chapter 6 of this book. Although OSI Layers 5 through 7 focus on issues related to the application, Layer 4 focuses on issues related to data delivery to another computer—for instance, error recovery and flow control. 3 The network layer defines three main features: logical addressing, routing (forwarding), and path determination. The routing concepts define how devices (typically routers) forward packets to their final destination. Logical addressing defines how each device can have an address that can be used by the routing process. Path determination refers to the work done by routing protocols by which all possible routes are learned, but the best route is chosen for use. 2 The data link layer defines the rules (protocols) that determine when a device can send data over a particular medium. Data link protocols also define the format of a header and trailer that allows devices attached to the medium to send and receive data successfully. The data link trailer, which follows the encapsulated data, typically defines a Frame Check Sequence (FCS) field, which allows the receiving device to detect transmission errors. 1 This layer typically refers to standards from other organizations. These standards deal with the physical characteristics of the transmission medium, including connectors, pins, use of pins, electrical currents, encoding, light modulation, and the rules for how to activate and deactivate the use of the physical medium.
  19. 1828xbook.fm Page 35 Thursday, July 26, 2007 3:10 PM The OSI Reference Model 35 Table 2-5 lists most of the devices and protocols covered in the CCNA exams, and their comparable OSI layers. Note that many of the devices must actually understand the protocols at multiple OSI layers, so the layer listed in the table actually refers to the highest layer that the device normally thinks about when performing its core work. For example, routers need to think about Layer 3 concepts, but they must also support features at both Layers 1 and 2. OSI Reference Model—Example Devices and Protocols Table 2-5 Layer Name Protocols and Specifications Devices Application, presentation, Telnet, HTTP, FTP, SMTP, Firewall, intrusion detection session (Layers 5–7) POP3, VoIP, SNMP system Transport (Layer 4) TCP, UDP Network (Layer 3) IP Router Data link (Layer 2) Ethernet (IEEE 802.3), HDLC, LAN switch, wireless access Frame Relay, PPP point, cable modem, DSL modem Physical (Layer 1) RJ-45, EIA/TIA-232, V.35, LAN hub, repeater Ethernet (IEEE 802.3) Besides remembering the basics of the features of each OSI layer (as in Table 2-4), and some example protocols and devices at each layer (as in Table 2-5), you should also memorize the names of the layers. You can simply memorize them, but some people like to use a mnemonic phrase to make memorization easier. In the following three phrases, the first letter of each word is the same as the first letter of an OSI layer name, in the order specified in parentheses: All People Seem To Need Data Processing (Layers 7 to 1) ■ Please Do Not Take Sausage Pizzas Away (Layers 1 to 7) ■ Pew! Dead Ninja Turtles Smell Particularly Awful (Layers 1 to 7) ■ OSI Layering Concepts and Benefits Many benefits can be gained from the process of breaking up the functions or tasks of networking into smaller chunks, called layers, and defining standard interfaces between these layers. The layers break a large, complex set of concepts and protocols into smaller pieces, making it easier to talk about, easier to implement with hardware and software, and easier to troubleshoot. The following list summarizes the benefits of layered protocol specifications: Less Complex—Compared to not using a model, network models break the concepts ■ into smaller parts.
  20. 1828xbook.fm Page 36 Thursday, July 26, 2007 3:10 PM 36 Chapter 2: The TCP/IP and OSI Networking Models Standard Interfaces—The standard interface definitions between each layer allow for ■ multiple vendors to create products that compete to be used for a given function, along with all the benefits of open competition. Easier to learn—Humans can more easily discuss and learn about the many details of ■ a protocol specification. Easier to develop—Reduced complexity allows easier program changes and faster ■ product development. Multivendor interoperability—Creating products to meet the same networking ■ standards means that computers and networking gear from multiple vendors can work in the same network. Modular engineering—One vendor can write software that implements higher ■ layers—for example, a web browser—and another vendor can write software that implements the lower layers—for example, Microsoft’s built-in TCP/IP software in its operating systems. The benefits of layering can be seen in the familiar postal service analogy. A person writing a letter does not have to think about how the postal service will deliver a letter across the country. The postal worker in the middle of the country does not have to worry about the contents of the letter. Likewise, layering enables one software package or hardware device to implement functions from one layer and assume that other software/hardware will perform the functions defined by the other layers. For instance, a web browser does not need to think about what the network topology looks like, the Ethernet card in the PC does not need to think about the contents of the web page, and a router in the middle of the network does not need to worry about the contents of the web page or whether the computer that sent the packet was using an Ethernet card or some other networking card. OSI Encapsulation Terminology Like TCP/IP, OSI defines processes by which a higher layer asks for services from the next lower layer. To provide the services, the lower layer encapsulates the higher layer’s data behind a header. The final topic of this chapter explains some of the terminology and concepts related to OSI encapsulation. The TCP/IP model uses terms such as segment, packet, and frame to refer to various layers and their respective encapsulated data (see Figure 2-7). OSI uses a more generic term: protocol data unit, or PDU. A PDU represents the bits that include the headers and trailers for that layer, as well as the encapsulated data. For instance, an IP packet, as shown in Figure 2-7, is a PDU. In fact, an IP packet is a Layer 3 PDU because IP is a Layer 3
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2