Bài giảng Mạng máy tính - Phần 2

Giao thức và kiến trúc phân tầng:

-Thế nào là giao thức (protocols)?

-Kiến trúc phân tầng và các hệ thống cấp bậc giao thức (protocol hierarchies)

-Các vấn đề cần lưu ý khi thiết kế các tầng

-Phương thức hoạt động: hướng kết nối và phi kết nối

-Mô hình tham chiếu OSI (The Open Systems Interconnection Reference Model)

-Mô hình TCP/IP (The Transmission Control Protocol/Internet Protocol Model)

-So sánh giữa mô hình tham chiếu OSI và TCP/IP

 

ppt68 trang | Chia sẻ: ngochuyen96 | Lượt xem: 1080 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Bài giảng Mạng máy tính - Phần 2, để xem tài liệu hoàn chỉnh bạn click vào nút TẢI VỀ ở trên
d Architecture*Phân phát thông điệp tin cậy từ hệ thốngđầu cuối này đến hệ thống đầu cuối kiaReliable end-to-end delivery of a messageLayered Architecture*Session Layer- Session setup (authentication)- Recovery from failure (broken session)Layered Architecture*Tầng Phiên (session layer)- Thiết lập phiên truyền thông (xác thực )- Khôi phục phiên truyền khi gặp sự cố (phiên truyền bị đứt)Layered Architecture*Presentation LayerConversion of data to common formatExample: Little endian vs. big endian byte ordersLayered Architecture*Tầng Trình diễn (presentation layer)Chuyển đổi dữ liệu về một khuôn dạng chungLayered Architecture*Application Layer- Process-to-process communicationAll layers exist to support this layer	X500: Directory Service	X400: hay là MHS Message Handling Systems	FTAM: File Transfer, Access and ManagementLayered Architecture*Tầng Ứng dụng (application layer)- Truyền thông giữa tiến trình – tiến trình Các tầng khác tồn tại để hỗ trợ tầng này	X500: Directory Service (Dịch vụ thư mục)	X400: hay là MHS Message Handling Systems	FTAM: File Transfer, Access and ManagementLayered Architecture*Summary of OSI layersLayered Architecture*Tóm tắt các tầng trong mô hình OSIApplication7Presentation6Session5Transport4Network3Physical1Data link2cho phép users truy cập các tài nguyên mạngthiết lập, duy trì và hủy bỏ các phiên truyềnchuyển các gói dữ liệu từ nguồn đến đích; cung cấp tính năng liên mạngtruyền dòng bits qua phương tiện truyền; cung cấp các đặc tả kỹ thuật về cơ, điệnchuyển đổi, mã hóa và nén dữ liệucung cấp sự phân phát thông điệp tin cậy giữa các tiến trìnhtổ chức các bits thành khung; vận chuyển dữ liệu giữa các nodes trong cùng một mạngLayered Architecture*TCP/IP SuiteApplication7Presentation6Session5Transport4Network3Physical1Data link2Application4Transport3Internet2Host-to-Network1TCP/IP SuiteOSI ModelLayered Architecture*TCP/IP Suite and OSI modelLayered Architecture*Internet Protocol “Zoo”applicationSMTPTelnetNFS/Sun RPCFTPDNSHTTPRealAudioRealVideoLayered Architecture*The Internet (Network) layerroutingtableRouting protocolspath selectionRIP, OSPF, BGPIP protocoladdressing conventionspacket handling conventionsICMP protocolerror reportingrouter “signaling”Transport layer: TCP, UDPLink layerphysical layerNetworklayerLayered Architecture*Tầng InternetBảng định tuyếnCác thành phần (chức năng) chính của tầng mạng trên Internet (được thực hiện tại các host và router)Giao thức định tuyếnchọn đườngRIP, OSPF, BGPGiao thức IPqui ước về địa chỉkhuôn dạng gói tinNhững qui ước xử lý gói tinGiao thức ICMPbáo lỗirouter “báo hiệu”Tầng vận chuyển: TCP, UDPTầng liên kết dữ liệuTầng Vật lýNetworklayerLayered Architecture*Internet Protocol (IP)Universal service in a heterogeneous worldIP over everythingVirtual overlay networkGlobally unique logical address for a hostAddress resolutionlogical to physical address mappingLayered Architecture*Internet Protocol (IP)Liên kết các công nghệ mạng khác nhau và cung cấp sự kết nối toàn cầu trong một thế giới không đồng nhất.Tạo cảm giác về một mạng đơn đồng nhất.Gán địa chỉ logic duy nhất, toàn cầu cho mỗi hostPhân giải địa chỉÁnh xạ từ địa chỉ logic sang địa chỉ vật lý để thực hiện sự phân phát các gói tin.Layered Architecture*Internet ProtocolConnectionless unreliable datagram servicePackets carry a source and a destination addressEach packet routed independentlyNo guarantee that network will not lose packetsError recovery is up to end-to-end protocolsLayered Architecture*Internet ProtocolDịch vụ datagram phi kết nối, không tin cậyCác gói tin chứa địa chỉ nguồn và đíchCác packets được truyền đi độc lập với nhauCác packets có thể bị mấtPhục hồi lỗi tùy thuộc vào các giao thức đầu cuối (end-to-end protocols)Layered Architecture*Transport between NeighborsUsing underlying link layer transmission mechanismExample: Ethernet, Token Ring, PPPMapping from logical IP address to physical MAC addressAddress Resolution Protocol (ARP)Layered Architecture*Vận chuyển giữa các nút trong một mạngSử dụng các cơ chế truyền dữ liệu của tầng liên kết dữ liệuExample: Ethernet, Token Ring, PPPÁnh xạ từ địa chỉ logic (IP address) sang địa chỉ vật lý (MAC address)Address Resolution Protocol (ARP) – giao thức phân giải địa chỉLayered Architecture*End to End Transport ProtocolsTCP service:connection-oriented: setup required between client, serverreliable transport between sender and receiverflow control: sender won’t overwhelm receivercongestion control: throttle sender when network overloadedUDP service:unreliable data transfer between sender and receiverdoes not provide: connection setup, reliability, flow control, congestion controlQ:Why UDP?Layered Architecture*Các giao thức vận chuyểnGiao thức TCP:Hướng kết nối: phải thiết lập kết nối giữa client, serverVận chuyển tin cậy giữa bên gửi và nhậnKiểm soát luồng (flow control): bên gửi không làm ngập bên nhậnKiểm soát tắc nghẽn: điều chỉnh tốc độ bên gửi khi mạng quá tảiGiao thức UDP:Vận chuyển dữ liệu không tin cậy giữa bên gửi và nhậnKhông cung cấp: thiết lập kết nối, kiểm soát luồng, kiểm soát tắc nghẽnTại sao dùng UDP?Layered Architecture*Internet PhilosophyNetwork provides barebones serviceConnectionless unreliable datagram by IPValue-added functions performed “end to end”Error recovery and flow control by TCPEnd user/application knows betterPacket loss may be tolerable for voiceAlso known as “end-to-end argument”Layered Architecture*Triết lý của InternetMạng chỉ cung cấp những dịch vụ thiết yếu nhấtIP chuyển dữ liệu phi kết nối, không tin cậyCác chức năng gia tăng khác được thực hiện ở các đầu cuốiPhục hồi lỗi và kiểm soát luồng được thực hiện bởi TCPỨng dụng đầu cuối biết nhiều hơnMất packet có thể chấp nhận được đối với voiceMọi sự kiểm soát được đưa về các hệ thống đầu cuối.Layered Architecture*Mối quan hệ giữa các tầng và địa chỉ trong TCP/IPLayered Architecture*Địa chỉ Vật lý (physical addresses)Layered Architecture*Địa chỉ IP (IP addresses)Layered Architecture*Địa chỉ cổng (port addresses)Layered Architecture*Client-Server ParadigmTypical network app has two pieces: client and serverapplicationtransportnetworkdata linkphysicalapplicationtransportnetworkdata linkphysicalClient:initiates contact with server (“speaks first”)typically requests service from serverServer:provides requested service to clientrequestreplyLayered Architecture*Mô hình Client-ServerThông thường một ứng dụng mạng gồm 2 phần: client và serverapplicationtransportnetworkdata linkphysicalapplicationtransportnetworkdata linkphysicalClient:khởi tạo kết nối với server (“nói trước”)thường là yêu cầu dịch vụ nào đó từ serverServer:Cung cấp dịch vụ được yêu cầu cho clientrequestreplyLayered Architecture*The Web: The HTTP ProtocolHyperText Transfer ProtocolWeb’s application layer protocolclient/server modelclient: browser that requests, receives, “displays” Web objectsserver: Web server sends objects in response to requestsPC runningExplorerServer runningNCSA WebserverMac runningNavigatorhttp requesthttp requesthttp responsehttp responseLayered Architecture*Ví dụ: Dịch vụ Web (giao thức HTTP)HyperText Transfer Protocolgiao thức tầng ứng dụng cho dịch vụ Webmô hình client/serverclient: là trình duyệt, nó yêu cầu, nhận và “hiển thị” các đối tượng Webserver: là Web server, nó gởi các đối tượng để trả lời cho các yêu cầu từ clientPC runningExplorerServer runningNCSA WebserverMac runningNavigatorhttp requesthttp requesthttp responsehttp responseLayered Architecture*Protocol PacketsProtocol data units (PDUs): packets exchanged between peer entitiesService data units (SDUs): packets handed to a layer by an upper layerData at one layer is encapsulated in packet at a lower layerEnvelope within envelope: PDU = SDU + (optional) header or trailerLayered Architecture*Đơn vị dữ liệu giao thức và đơn vị dữ liệu dịch vụĐơn vị dữ liệu giao thức - Protocol data units (PDUs): các gói dữ liệu được trao đổi giữa các thực thể đồng tầngĐơn vị dữ liệu dịch vụ - Service data units (SDUs): các gói dữ liệu do tầng phía trên đưa xuốngDữ liệu tại một tầng được bao bọc trong gói (packet) tại tầng dướiEnvelope within envelope: PDU = SDU + header or (optional) trailerLayered Architecture*Minh họa quá trình đóng góiLayered Architecture*Một ví dụ về sự đóng gói: gởi E-mailLayered Architecture*Comments on LayeringAdvantagesModularization eases maintenance and updatingDrawbacks?Which layer should implement what functionality?Hop-by-hop basis or end-to-end basisDuplication of functionality between layersError recovery at link layer and transport layerLayered Architecture*Nhận xét về việc phân tầngƯu điểmModule hóa giúp cho việc duy trì và cập nhật dễ dàng hơnNhược điểmTầng nào nên thực hiện chức năng gì?Dựa trên nền tảng hop-by-hop hay end-to-endSự trùng lặp chức năng giữa các tầngTầng liên kết dữ liệu và tầng vận chuyển đều có chức năng phục hồi lỗiLayered Architecture*So sánh giữa OSI và TCP/IPGiống nhau:Một chồng giao thức độc lậpChức năng của các tầng na ná giống nhau (roughly similar)Khác nhau (về mặt mô hình tham chiếu):Số tầng (7 vs. 4)OSI phân biệt rõ: services, interfaces, protocols => protocols được che dấu tốt hơn và dễ dàng thay thế hơn khi công nghệ thay đổiOSI: mô hình được nghĩ ra trước, protocols được phát minh sauOSI: tầng mạng hỗ trợ cả hai connectionless & connection-oriented communication; tầng vận chuyển chỉ hỗ trợ connection-oriented communication Layered Architecture*A critique of the OSI model and ProtocolsBad timingBad technologyBad implementationsBad politicsLayered Architecture*A critique of the TCP/IP Reference ModelThe model does not clearly distinguish the concepts of service, interface, and protocol.The TCP/IP model is not at all general and is poorly suited to describing any protocol stack other than TCP/IP. The host-to-network layer is not really a layer at all in the normal sense of the term as used in the context of layered protocols. The TCP/IP model does not distinguish (or even mention) the physical and data link layers. Some protocols are a bit of an embarrassment now. 

File đính kèm:

  • pptbai giang mang may tinh phan 2.ppt
Bài giảng liên quan