TCP/IP Model
//
As mentioned earlier, the OSI reference model and the TCP/IP model are two open standard networking models that are very similar. However, the latter has found more acceptance today and the TCP/IP protocol suite is more commonly used. Just like the OSI reference model, the TCP/IP model takes a layered approach. In this section we will look at all the layers of the TCP/IP model and various protocols used in those layers.
//
The TCP/IP model is a condensed version of the OSI reference model consisting of the following 4 layers:
//
Application Layer**
Transport Layer**
Internet Layer**
Network Access Layer**
The functions of these four layers are comparable to the functions of the seven layers of the OSI model. Figure 1-9 shows the comparison between the layers of the two models.
//
The following sections discuss each of the four layers and protocols in those layers in detail.
//
Figure 1-9 Comparison between TCP/IP and OSI models
//
Application Layer
//
The Application Layer of the TCP/IP Model consists of various protocols that perform all the functions of the OSI model’s Application, Presentation and Session layers. This includes interaction with the application, data translation and encoding, dialogue control and communication coordination between systems.
//
The following are few of the most common Application Layer protocols used today:
//
Telnet – Telnet is a terminal emulation protocol used to access the resourses of a remote host. A host, called the Telnet server, runs a telnet server application (or daemon in Unix terms) that receives a connection from a remote host called the Telnet client. This connection is presented to the operating system of the telnet server as though it is a terminal connection connected directly (using keyboard and mouse). It is a text-based connection and usually provides access to the command line interface of the host. Remember that the application used by the client is usually named telnet also in most operating systems. You should not confuse the telnet application with the Telnet protocol.
HTTP – The Hypertext Transfer Protocol is foundation of the World Wide Web. It is used to transfer Webpages and such resources from the Web Server or HTTP server to the Web Client or the HTTP client. When you use a web browser such as Internet Explorer or Firefox, you are using a web client. It uses HTTP to transfer web pages that you request from the remote servers.
//
FTP – File Transfer Protocol is a protocol used for transferring files between two hosts. Just like telnet and HTTP, one host runs the FTP server application (or daemon) and is called the FTP server while the FTP client runs the FTP client application. A client connecting to the FTP server may be required to authenticate before being given access to the file structure. Once authenticated, the client can view directory listings, get and send files, and perform some other file related functions. Just like telnet, the FTP client application available in most operating systems is called ftp. So the protocol and the application should not be confused.
//
SMTP – Simple Mail Transfer Protocol is used to send e-mails. When you configure an email client to send e-mails you are using SMTP. The mail client acts as a SMTP client here. SMTP is also used between two mails servers to send and receive emails. However the end client does not receive emails using SMTP. The end clients use the POP3 protocol to do that.
//
TFTP – Trivial File Transfer Protocol is a stripped down version of FTP. Where FTP allows a user to see a directory listing and perform some directory related functions, TFTP only allows sending and receiving of files. It is a small and fast protocol, but it does not support authentication. Because of this inherent security risk, it is not widely used.
DNS – Every host in a network has a logical address called the IP address (discussed later in the chapter). These addresses are a bunch of numbers. When you go to a website such as www.cisco.com you are actually going to a host which has an IP address, but you do not have to remember the IP Address of every WebSite you visit. This is because Domain Name Service (DNS) helps map a name such as www.cisco.com to the IP address of the host where the site resides. This obviously makes it easier to find resources on a network. When you type in the address of a website in your browser, the system first sends out a DNS query to its DNS server to resolve the name to an IP address. Once the name is resolved, a HTTP session is established with the IP Address.
//
DHCP – As you know, every host requires a logical address such as an IP address to communicate in a network. The host gets this logical address either by manual configuration or by a protocol such as Dynamic Host Configuration Protocol (DHCP). Using DHCP, a host can be provided with an IP address automatically. To understand the importance of DHCP, imagine having to manage 5000 hosts in a network and assigning them IP address manually! Apart from the IP address, a host needs other information such as the address of the DNS server it needs to contact to resolve names, gateways, subnet masks, etc. DHCP can be used to provide all these information along with the IP address.
//
Transport Layer
//
The protocols discussed above are few of the protocols available in the Application layer. There are many more protocols available. All of them take the user data and add a header and pass it down to the Transport layer to be sent across the network to the destination. The TCP/IP transport layer’s function is same as the OSI layer’s transport layer. It is concerned with end-to-end transportation of data and setups up a logical connection between the hosts.
//
Two protocols available in this layer are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). TCP is a connection oriented and reliable protocol that uses windowing to control the flow and provides ordered delivery of the data in segments. On the other hand, UDP simply transfers the data without the bells and whistles. Though these two protocols are different in many ways, they perform the same function of transferring data and they use a concept called port numbers to do this. The following sections cover port numbers before looking into TCP and UDP in detail.
//
Port Numbers
//
A host in a network may send traffic to or receive from multiple hosts at the same time. The system would have no way to know which data belongs to which application. TCP and UDP solve this problem by using port numbers in their header. Common application layer protocols have been assigned port numbers in the range of 1 to 1024. These ports are known as well-known ports. Applications implementing these protocols listen on these port numbers. TCP and UDP on the receiving host know which application to send the data to based on the port numbers received in the headers.
On the source host each TCP or UDP session is assigned a random port number above the range of 1024. So that returning traffic from the destination can be identified as belonging to the originating application. Combination of the IP address, Protocol (TCP or UDP) and the Port number forms a socket at both the receiving and sending hosts. Since each socket is unique, an application can send and receive data to and from multiple hosts. Figure 1-10 shows two hosts communicating using TCP. Notice that the hosts on the left and right are sending traffic to the host in the center and both of them are sending traffic destined to Port 80, but from different source ports. The host in the center is able to handle both the connections simultaneously because the combination of IP address, Port numbers and Protocols makes each connection different.
//
Figure 1-10 Multiple Sessions using Port Numbers
//
Table 1-1 shows the transport layer protocol and port numbers used by different common application layer protocols.
//
Table 1-1 Well-known Port Numbers
TCP / IP รุ่น
//
ตามที่ระบุไว้ก่อนหน้านี้รูปแบบการอ้างอิง OSI และ TCP / IP รูปแบบที่มีสองมาตรฐานเปิดแบบจำลองเครือข่ายที่มีลักษณะคล้ายกันมาก อย่างไรก็ตามหลังได้รับการยอมรับมากขึ้นพบว่าในวันนี้และ TCP / IP ชุดโปรโตคอลที่มีการใช้กันอย่างแพร่หลาย เช่นเดียวกับรูปแบบการอ้างอิง OSI, TCP / IP รูปแบบการใช้วิธีการที่ชั้น ในส่วนนี้เราจะดูที่ชั้นทั้งหมดของ TCP / IP และรูปแบบต่างๆที่ใช้โปรโตคอลในชั้นเหล่านั้น.
//
TCP / IP เป็นรูปแบบฉบับย่อของรูปแบบการอ้างอิง OSI ประกอบด้วย 4 ชั้นต่อไปนี้:
//
แอพลิเคชัน ชั้น **
ขนส่งเลเยอร์ **
อินเทอร์เน็ตชั้น **
ชั้นการเข้าถึงเครือข่าย **
ฟังก์ชั่นเหล่านี้สี่ชั้นจะเปรียบกับการทำงานของเจ็ดชั้นของแบบจำลอง OSI รูปที่ 1-9 แสดงการเปรียบเทียบระหว่างชั้นของทั้งสองรุ่นที่.
//
ส่วนต่อไปนี้หารือกันของสี่ชั้นและโปรโตคอลในชั้นผู้ที่อยู่ในรายละเอียด.
//
รูปที่ 1-9 การเปรียบเทียบระหว่าง TCP / IP และ OSI รุ่น
//
Application Layer
//
แอพลิเคชันชั้นของ TCP / IP รุ่นประกอบด้วยโปรโตคอลต่างๆที่มีประสิทธิภาพการทำงานทั้งหมดของแอพลิเคชันแบบจำลอง OSI ของการนำเสนอและชั้นเซสชัน ซึ่งรวมถึงการมีปฏิสัมพันธ์กับแอพลิเคชัน, การแปลและการเข้ารหัสข้อมูลการควบคุมการเจรจาและการประสานงานในการติดต่อสื่อสารระหว่างระบบ.
//
ต่อไปนี้เป็นเพียงไม่กี่ของโปรโตคอลชั้นแอพลิเคชันที่พบมากที่สุดที่ใช้ในปัจจุบัน:
//
Telnet - Telnet เป็นโปรโตคอลจำลอง terminal ใช้ในการเข้าถึง resourses ของพื้นที่ห่างไกล พื้นที่ที่เรียกว่าเซิร์ฟเวอร์ Telnet วิ่งแอพลิเคชันเซิร์ฟเวอร์เทลเน็ต (หรือภูตในแง่ Unix) ที่ได้รับการเชื่อมต่อจากพื้นที่ห่างไกลที่เรียกว่าลูกค้า Telnet ดำเนิน การเชื่อมต่อนี้จะนำเสนอให้ระบบปฏิบัติการของเซิร์ฟเวอร์เทลเน็ตที่ราวกับว่ามันคือการเชื่อมต่อสถานีเชื่อมต่อโดยตรง (โดยใช้แป้นพิมพ์และเมาส์) มันคือการเชื่อมต่อแบบข้อความและมักจะให้การเข้าถึงอินเตอร์เฟซบรรทัดคำสั่งของโฮสต์ โปรดจำไว้ว่าแอพลิเคชันที่ใช้โดยลูกค้ามักจะเป็นชื่อเทลเน็ตยังอยู่ในระบบปฏิบัติการส่วนใหญ่ คุณไม่ควรสร้างความสับสนให้แอปพลิเคเทลเน็ตกับโปรโตคอล Telnet ได้. HTTP - เดอะแบบ Hypertext Transfer Protocol เป็นรากฐานของเวิลด์ไวด์เว็บ มันถูกใช้ในการถ่ายโอนเว็บเพจและทรัพยากรดังกล่าวจากเว็บเซิร์ฟเวอร์หรือเซิร์ฟเวอร์ HTTP เพื่อไคลเอ็นต์ของเว็บหรือลูกค้าของ HTTP เมื่อคุณใช้เว็บเบราเซอร์เช่น Internet Explorer หรือ Firefox คุณจะใช้โปรแกรมเว็บ มันใช้ HTTP ในการถ่ายโอนหน้าเว็บที่คุณร้องขอจากเซิร์ฟเวอร์ระยะไกล. // FTP - การถ่ายโอนไฟล์พิธีสารเป็นโปรโตคอลที่ใช้สำหรับการถ่ายโอนไฟล์ระหว่างสองเจ้าภาพ เช่นเดียวกับเทลเน็ตและ HTTP, โฮสต์รันแอพลิเคชันเซิร์ฟเวอร์ FTP (หรือภูต) และถูกเรียกว่าเซิร์ฟเวอร์ FTP ในขณะที่ลูกค้า FTP รันโปรแกรมไคลเอนต์ FTP ลูกค้าเชื่อมต่อกับเซิร์ฟเวอร์ FTP อาจจำเป็นต้องใช้ในการตรวจสอบก่อนที่จะถูกได้รับการเข้าถึงโครงสร้างไฟล์ รับรองความถูกต้องเมื่อลูกค้าสามารถดูรายชื่อไดเรกทอรีรับและส่งไฟล์และดำเนินการบางไฟล์อื่น ๆ ฟังก์ชั่นที่เกี่ยวข้อง เช่นเดียวกับเทลเน็ตโปรแกรม FTP ไคลเอนต์ที่มีอยู่ในระบบปฏิบัติการส่วนใหญ่จะเรียกว่า FTP ที่ ดังนั้นโปรโตคอลและการประยุกต์ใช้ไม่ควรจะสับสน. // SMTP - ธรรมดา Mail Transfer Protocol ที่ใช้ในการส่งอีเมล เมื่อคุณกำหนดค่าไคลเอนต์อีเมลที่จะส่งอีเมลที่คุณกำลังใช้ SMTP ลูกค้า mail ทำหน้าที่เป็นลูกค้า SMTP ที่นี่ SMTP จะใช้ในระหว่างเซิร์ฟเวอร์สองอีเมลไปส่งและรับอีเมล แต่ลูกค้าที่สิ้นสุดไม่ได้รับอีเมลโดยใช้ SMTP ลูกค้าปลายใช้โปรโตคอล POP3 จะทำอย่างนั้น. // TFTP - เล็กน้อยโปรโตคอลการถ่ายโอนไฟล์เป็นรุ่นปล้นลงของ FTP ในกรณีที่ FTP ช่วยให้ผู้ใช้เพื่อดูรายการไดเรกทอรีและปฏิบัติหน้าที่ที่เกี่ยวข้องกับไดเรกทอรีบาง TFTP เพียง แต่ช่วยให้การส่งและรับไฟล์ มันเป็นโปรโตคอลขนาดเล็กและรวดเร็ว แต่ก็ไม่สนับสนุนการรับรองความถูกต้อง เพราะความเสี่ยงด้านความปลอดภัยโดยธรรมชาตินี้ก็ไม่ได้ใช้กันอย่างแพร่หลาย. DNS - โฮสต์ในเครือข่ายทุกคนมีที่อยู่ตรรกะที่เรียกว่าที่อยู่ IP (กล่าวถึงในบท) ที่อยู่เหล่านี้เป็นกลุ่มของตัวเลข เมื่อคุณไปที่เว็บไซต์เช่น www.cisco.com คุณเป็นจริงจะเป็นเจ้าภาพซึ่งมีที่อยู่ IP แต่คุณไม่ต้องจำอยู่ IP ของเว็บไซต์ที่คุณเยี่ยมชม นี้เป็นเพราะบริการชื่อโดเมน (DNS) จะช่วยให้แมชื่อเช่น www.cisco.com ไปยังที่อยู่ IP ของโฮสต์ที่อยู่เว็บไซต์ นี้เห็นได้ชัดทำให้ง่ายต่อการค้นหาแหล่งข้อมูลบนเครือข่าย เมื่อคุณพิมพ์ที่อยู่ของเว็บไซต์ในเบราว์เซอร์ของคุณระบบแรกที่ส่งแบบสอบถาม DNS ไปยังเซิร์ฟเวอร์ DNS ในการแก้ไขชื่อที่อยู่ IP เมื่อชื่อได้รับการแก้ไขเซสชั่น HTTP จะจัดตั้งขึ้นที่มี IP แอดเดรส. // DHCP - ที่คุณรู้ว่าทุกพื้นที่ต้องเป็นที่อยู่ตรรกะเช่นที่อยู่ IP ในการสื่อสารในเครือข่าย โฮสต์ที่ได้รับนี้อยู่ตรรกะทั้งโดยการกำหนดค่าด้วยตนเองหรือโดยการโพรโทคอเช่นแบบไดนามิก Host Configuration Protocol (DHCP) ใช้ DHCP โฮสต์สามารถให้กับที่อยู่ IP โดยอัตโนมัติ เพื่อให้เข้าใจถึงความสำคัญของการ DHCP การคิดที่มีการจัดการ 5000 โฮสต์ในเครือข่ายของพวกเขาและการกำหนดที่อยู่ IP ด้วยตนเอง! นอกเหนือจากที่อยู่ IP, โฮสต์ต้องการข้อมูลอื่น ๆ เช่นที่อยู่ของเซิร์ฟเวอร์ DNS ที่จะต้องมีการติดต่อในการแก้ไขชื่อเกตเวย์, มาสก์เครือข่ายย่อย ฯลฯ DHCP สามารถใช้ในการให้ข้อมูลทั้งหมดเหล่านี้พร้อมกับที่อยู่ IP. / / Transport Layer // โปรโตคอลที่กล่าวข้างต้นมีเพียงไม่กี่ของโปรโตคอลที่มีอยู่ในชั้นแอพลิเคชัน มีโปรโตคอลอื่น ๆ อีกมากมายที่มีอยู่ ทั้งหมดของพวกเขาจะใช้ข้อมูลของผู้ใช้และเพิ่มส่วนหัวและผ่านมันลงไปที่ชั้นการขนส่งที่จะส่งผ่านเครือข่ายไปยังปลายทาง TCP / IP ฟังก์ชั่นการขนส่งของชั้นเป็นเช่นเดียวกับชั้นของการขนส่ง OSI ชั้นของ มันเป็นเรื่องที่เกี่ยวข้องกับการขนส่งแบบ end-to-end ของข้อมูลและกับการติดตั้งค่าการเชื่อมต่อตรรกะระหว่างโฮสต์. // สองโปรโตคอลที่มีอยู่ในชั้นนี้มีการส่ง Control Protocol (TCP) และ User Datagram Protocol (UDP) TCP คือการเชื่อมต่อที่มุ่งเน้นและโปรโตคอลที่เชื่อถือได้ว่าใช้ Windowing เพื่อควบคุมการไหลและให้มีคำสั่งให้ส่งมอบข้อมูลในส่วน ในทางตรงกันข้าม, UDP ก็ถ่ายโอนข้อมูลโดยไม่ต้องระฆังและนกหวีด แม้ว่าทั้งสองโปรโตคอลที่แตกต่างกันในหลาย ๆ วิธีที่พวกเขาปฏิบัติหน้าที่เดียวกันของการถ่ายโอนข้อมูลและพวกเขาใช้แนวคิดที่เรียกว่าหมายเลขพอร์ตการทำเช่นนี้ ส่วนต่อไปนี้ครอบคลุมหมายเลขพอร์ตก่อนที่จะมองเข้าไปใน TCP และ UDP ในรายละเอียด. // หมายเลขพอร์ต// โฮสต์ในเครือข่ายอาจส่งเข้าชมหรือได้รับจากหลายครอบครัวในเวลาเดียวกัน ระบบจะมีวิธีการที่จะทราบว่าข้อมูลเป็นของที่ใช้ไม่ได้ TCP และ UDP แก้ปัญหานี้โดยใช้หมายเลขพอร์ตในส่วนหัวของพวกเขา วิธีการใช้งานทั่วไปชั้นได้รับมอบหมายหมายเลขพอร์ตในช่วง 1 ถึง 1024 พอร์ตเหล่านี้เป็นที่รู้จักกันเป็นที่รู้จักกันดีพอร์ต การประยุกต์ใช้งานการใช้โปรโตคอลเหล่านี้ฟังบนหมายเลขพอร์ตเหล่านี้ TCP และ UDP ในพื้นที่ที่ได้รับทราบว่าโปรแกรมที่จะส่งข้อมูลไปยังขึ้นอยู่กับหมายเลขพอร์ตที่ได้รับในส่วนหัว. ในแหล่งที่เป็นเจ้าภาพในแต่ละ TCP หรือ UDP เซสชั่นที่มีการกำหนดหมายเลขพอร์ตแบบสุ่มเหนือช่วงของ 1024 เพื่อให้การจราจรกลับมา จากปลายทางสามารถระบุได้ว่าเป็นแอพลิเคชันที่มา การรวมกันของที่อยู่ IP, Protocol (TCP หรือ UDP) และหมายเลขพอร์ตรูปแบบซ็อกเก็ตทั้งในการรับและส่งเจ้าภาพ เนื่องจากแต่ละซ็อกเก็ตที่ไม่ซ้ำกันโปรแกรมที่สามารถส่งและรับข้อมูลจากหลายครอบครัว รูปที่ 1-10 แสดงให้เห็นถึงการสื่อสารสองครอบครัวใช้ TCP ขอให้สังเกตว่าเจ้าภาพทางด้านซ้ายและขวาจะถูกส่งเข้าชมไปยังโฮสต์ในศูนย์และทั้งสองของพวกเขาถูกส่งเข้าชมปลายทางที่ท่าเรือ 80 แต่จากแหล่งที่มาที่แตกต่างกันพอร์ต เจ้าภาพในศูนย์จะสามารถจัดการกับการเชื่อมต่อทั้งพร้อมกันเพราะการรวมกันของที่อยู่ IP หมายเลขพอร์ตโปรโตคอลและทำให้การเชื่อมต่อที่แตกต่างกันในแต่ละ. // รูปที่ 1-10 การประชุมหลายโดยใช้หมายเลขพอร์ต// ตาราง 1-1 แสดงให้เห็นชั้นของการขนส่ง โปรโตคอลและหมายเลขพอร์ตที่ใช้ร่วมกันโดยการประยุกต์ใช้โปรโตคอลชั้นที่แตกต่างกัน. // ตาราง 1-1 ที่รู้จักกันดีหมายเลขพอร์ต
การแปล กรุณารอสักครู่..
