1 / 50

King Fahd University of Petroleum & Minerals Computer Engineering Dept

King Fahd University of Petroleum & Minerals Computer Engineering Dept. س 313 اتصالات و شبكات الحاسب الفصل 2003 - الأول د. أشرف شريف حسن محمود Phone: 860-1724 Email: ashraf@ccse.kfupm.edu.sa URL: http://www.ccse.kfupm.edu.sa/~ashraf/DC031_S313/DC031_313.htm. Lecture Contents .

thelmac
Download Presentation

King Fahd University of Petroleum & Minerals Computer Engineering Dept

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. King Fahd University of Petroleum & MineralsComputer Engineering Dept س 313 اتصالات و شبكات الحاسب الفصل 2003 - الأول د. أشرف شريف حسن محمود Phone: 860-1724 Email: ashraf@ccse.kfupm.edu.sa URL: http://www.ccse.kfupm.edu.sa/~ashraf/DC031_S313/DC031_313.htm Dr. Ashraf S. Hasan Mahmoud

  2. Lecture Contents • OSI (Revision) • The model • OSI layers • Protocol Functions • TCP/IP Protocol Suite Dr. Ashraf S. Hasan Mahmoud

  3. The OSI Model • Software model and abstraction • Defines set of layers and the services at these layers necessary to perform communication • Promotes (يشجع) compatibility of network designs • Logical partitioning: • Manageability and scalability Dr. Ashraf S. Hasan Mahmoud

  4. تطبيق A تطبيق B طبقة التطبيق Application Layer طبقة التطبيق Application Layer 7 6 5 4 3 2 1 7 6 5 4 3 2 1 طبقة التقديم Presentation Layer طبقة التقديم Presentation Layer اتصال افتراضي من A إلى B End-to-End Virtual Communication End-to-End طبقة المخاطبة Session Layer طبقة المخاطبة Session Layer طبقة النقل Transport Layer طبقة النقل Transport Layer طبقة الشبكة Network Layer طبقة الشبكة Network Layer شبكة Network Per Hub طبقة ربط البيانات Data Link Layer طبقة ربط البيانات Data Link Layer الطبقة المادية Physical Layer الطبقة المادية Physical Layer Node A Node B The OSI Model - Environment Dr. Ashraf S. Hasan Mahmoud

  5. The OSI Model – Environment (2) • Layer i on node A establishes a PEER RELATIONSHIP with layer i on the target node (node B) • Layer i communicates with its peer using services offered by layer i-1 Dr. Ashraf S. Hasan Mahmoud

  6. طبقة التطبيق Application Layer A-H user data طبقة التقديم Presentation Layer P-H A-PDU طبقة المخاطبة Session Layer P-H P-PDU طبقة النقل Transport Layer T-H S-PDU طبقة الشبكة Network Layer A-H T-PDU طبقة ربط البيانات Data Link Layer D-H N-PDU D-T الطبقة المادية Physical Layer D-PDU Node A – The Sender Sideالجهةالمرسلة outgoing data بيانات مرسلة تطبيق A 7 6 5 4 3 2 1 Dr. Ashraf S. Hasan Mahmoud Node A

  7. تطبيق B طبقة التطبيق Application Layer 7 6 5 4 3 2 1 A-H user data طبقة التقديم Presentation Layer P-H A-PDU طبقة المخاطبة Session Layer S-H P-PDU طبقة النقل Transport Layer T-H S-PDU طبقة الشبكة Network Layer N-H T-PDU طبقة ربط البيانات Data Link Layer D-H N-PDU D-T الطبقة المادية Physical Layer D-PDU Node B – The Receiver Sideالجهة المستقبلة received data بيانات مستقبلة Dr. Ashraf S. Hasan Mahmoud Node B

  8. Application Layer PDU P-H Protocol Data Units (PDUs) and Service Data Units (SDU) • The use of the Protocol Data Unit (PDU) • A layer i requests service from layer i-1 • Layer i passes information or PDU to layer i-1 • Layer i adds a header information (overhead) to PDU to form a Service Data Unit (SDU) Example – Presentation Layer level: = Presentation Layer SDU Dr. Ashraf S. Hasan Mahmoud

  9. Protocol Data Units (PDUs) and Service Data Units (SDU) – cont’d • Therefore peer layers communicate using or exchange يتبادلوا SDUs • No direct communication except for the physical layer – all other communication is indirect or virtual Dr. Ashraf S. Hasan Mahmoud

  10. Protocol Data Units (PDUs) and Service Data Units (SDU) – cont’d Application Layer PDU Application Layer PDU coming from upper layer Header taken out Header added P-H P-H طبقة التقديم Presentation Layer طبقة التقديم Presentation Layer P-SDU Communicate through Exchange of SDUs Node A Node B Dr. Ashraf S. Hasan Mahmoud

  11. Encapsulation / Decapsulation • Encapsulation (تغليف - إحاطة) of user data • When the peer layer i at destination receives SDU, it removes the header added by layer i at sender -- This process is called decapsulation (إزالة المغلّف) Dr. Ashraf S. Hasan Mahmoud

  12. Encapsulation / Decapsulation – cont’d Application Layer PDU Application Layer PDU coming from upper layer Header taken out Header added P-H Decapsulation إزالة الغلاف P-H Encapsulation تغليف طبقة التقديم Presentation Layer طبقة التقديم Presentation Layer P-SDU Communicate through Exchange of SDUs Node A Node B Dr. Ashraf S. Hasan Mahmoud

  13. Segmentation / Reassembly • Each layer may segment (تجزئة) SDU coming from upper layer to accommodate its own requirement – These are reassembled (Reassembly إعادة تجميع) at the destination Dr. Ashraf S. Hasan Mahmoud

  14. P-H P-H P-H P-H A-PDU A-PDU A-PDU A-PDU Segmentation / Reassembly – cont’d Application Layer PDU Application Layer PDU coming from upper layer Headers taken out Header added Segmentation (تجزيء) Reassembly (إعادة تجميع) طبقة التقديم Presentation Layer طبقة التقديم Presentation Layer P-SDU P-SDU Communicate through Exchange of SDUs Node A Node B Dr. Ashraf S. Hasan Mahmoud

  15. طبقة التطبيق 7 Application Layer 1 الطبقة المادية Physical Layer Interface Between Layers • كيفية اتصال طبقة بالطبقة التي هي أعلى أو أسفل Service to Layer N+1 طبقة N Layer N Protocol with peer layer N Service from Layer N-1 Dr. Ashraf S. Hasan Mahmoud

  16. Interface Between Layers – cont’d • Very similar to subroutine or function design in software engineering - يشبه إلى حد كبير استخدام القواعد العامة المتبعة في تصميم نظم البرمجة • Boundaries and functionalities are well designed – development of one layer has little or no effect on other layers - Dr. Ashraf S. Hasan Mahmoud

  17. Interface Components • Protocol specification (توصيف البروتوكول) : • Format of PDUs, and the semantic (meaning) of each field • عدد الحقول و أنواعها – و كذلك كيفية استخدامها و معانيها Example: Ctrl Addr Seq# N-1 PDU Seq#: sequence number رقم تسلسلي Addr: Addressعنوان Ctrl: Control تحكم N Header Dr. Ashraf S. Hasan Mahmoud

  18. Interface Between Layers – cont’d • Service definitionتعريف الخدمة : • What are the services provided to upper layer and the lower one - ما هي الخدمات؟ • Addressing: • Service Access Point (SAP): نقطة طلب\دخول الخدمة • E.g: Network Access Service Point (NSAP) is the address of an entity in the transport layer who uses the network service Dr. Ashraf S. Hasan Mahmoud

  19. SAP2 SAP1 Layer Nطبقة Interface Between Layers – cont’d Addressing نقط طلب\دخول الخدمة Service Definitions تعريف الخدمة Protocol Specification توصيف البروتوكول Dr. Ashraf S. Hasan Mahmoud

  20. Interface Between Layers - Service Primitives(آليّات الخدمة) • Service Primitives(أوّليّات/آليّات الخدمة) : • Request (طلب) : • Indication(إشعار) : • Response(جواب) • Confirm (تأكيد) • Like function calls (in software programming)! Dr. Ashraf S. Hasan Mahmoud

  21. protocol entity protocol entity N+1 SDU N+1 Service Layer N+1 N.request (1) N.confirm (4) N.response (3) N.indication (2) protocol entity protocol entity H N+1 PDU N Service = N SDU Layer N protocol entity N-1 Service protocol entity Layer N-1 Node A Node B Service Primitives – Confirmed (مؤكدة)Case Dr. Ashraf S. Hasan Mahmoud

  22. protocol entity protocol entity N+1 SDU N+1 Service Layer N+1 N.request (1) N.response (3) N.indication (2) protocol entity protocol entity H N+1 PDU N Service = N SDU Layer N protocol entity N-1 Service protocol entity Layer N-1 Node A Node B Service Primitives – Non-Confirmed(غير مؤكدة) Case Dr. Ashraf S. Hasan Mahmoud

  23. Packet-Switched Communication Model • File to be sent from node A to Node Bيراد إرسال الملف من العقدة أ إلى العقدة ب • File broken into multiple packets at A يقسّم الملف إلى عدة حزم في العقدة أ • Packets sent using physical layer through network الطبقة المادية ترسل الحزم عبر الشبكة Dr. Ashraf S. Hasan Mahmoud

  24. Packet-Switched Communication Model – cont’d • Packets received by Node B العقدة ب تستقبل الحزم المعلوماتية • Node B reassembles packets العقدة ب تعيد تجميع الحزم • Original file retrieved!استعادة الملف الأصلي Dr. Ashraf S. Hasan Mahmoud

  25. Connection Oriented (وصلة التَّوجُّه) versus Connectionless (عديمة الوصل) Communication • Packet-switched communication between two ends are either: • Connection Oriented(وصلة التَّوجُّه) , OR • Connectionless(عديمة الوصل) Dr. Ashraf S. Hasan Mahmoud

  26. Connection Oriented (وصلة التَّوجُّه) versus Connectionless (عديمة الوصل) Communication – cont’d • Connection-Oriented(وصلة التَّوجُّه) • Behaves like AS IF the two ends were connected using a dedicated physical mediumكما لو كان هناك وسط مادّي مخصص ما بين الطرفين • The link provides reliable communications (i.e. performs error control functions) – الوصلة توفر اتصال موثوق به • Sender expects an N.Confirm to know the message has been delivered – المرسل يتوقّع تأكيداً لوصول الرّسالة Dr. Ashraf S. Hasan Mahmoud

  27. Connection Oriented (وصلة التَّوجُّه) versus Connectionless (عديمة الوصل) Communication – cont’d • Connection-Oriented(وصلة التَّوجُّه) – cont’d • Communication can be broken down into three stages يمكن تقسيم خطوات الاتصّال إلى 3 مراحل: • Call setupإعداد المكالمة \ الاتصال : optimal route decidedتقرير أفضل المسالك • Data exchangeتبادل البيانات : transfer or exchange of data • Call terminationإنهاء المكالمة \ الاتصال : closure إغلاق of connection الوصلة Dr. Ashraf S. Hasan Mahmoud

  28. Connection Oriented (وصلة التَّوجُّه) versus Connectionless (عديمة الوصل) Communication – cont’d • Connectionless(عديمة الوصل) • Not necessary for all traffic (packets) does not follow same path between sender and receiver ليس بالضرورة أن تسلك كل الحزم المعلوماتية نفس الطريق من المرسل و حتّى المستقبل • Routing decision is done per-packet تقرير المسلك يتمّ لكل حزمة (عند وصولها) على حدة Dr. Ashraf S. Hasan Mahmoud

  29. Connection Oriented (وصلة التَّوجُّه) versus Connectionless (عديمة الوصل) Communication – cont’d • Connectionless(عديمة الوصل) – cont’d • The link usually provides unreliable communications (i.e. does not performs error control functions) الوصلة توفر اتصال لا يمكن الوثوق بها غالباً • Sender does not expects an N.Confirm to know the message has been delivered المرسل لا يتوقّع تأكيداً لوصول الرّسالة Dr. Ashraf S. Hasan Mahmoud

  30. The OSI Model – Physical Layer • Specifications المعايير : • Mechanical آليّة : dimensions, connectors, etc. • Electricalكهربيّة : signal levels, rates of change, etc • Functional وظائفيّة : functions performed by each circuit • Procedural إجرائيّة : steps required to transport bits from one end to the other • Main service to do “transmission of raw bits” Dr. Ashraf S. Hasan Mahmoud

  31. الطبقة الماديةPhysical Layer • الوظيفة الأساسية: نقل البيانات بعد تهيأتها علي شكل سيل من اللآحاد و اللأصفار (Bits) بين طرفي الاتصال • تنقل ال Bits يتم على صورة : • إشارات كهربية داخل الأسلاك أو • إشارات كهرومغناطيسية كما في اللاتصالات اللاسلكية أو • إشارات ضوئية كما في اللاتصالات عبر الألياف الضوئية Dr. Ashraf S. Hasan Mahmoud

  32. الطبقة الماديةPhysical Layer - تابع 2 • هي الطبقة الوحيدة التي تقوم بالتخاطب الحقيقي (إرسال و استقبال) بيانات • معايير يجب أن تحددها الطبقة المادية: • معايير ميكانيكيةMechanical Specifications : شكل الوصلة و أبعادها، عدد الأسلاك ، ... • معايير كهربيةElectrical Specifications : سعة الإشارة الكهربية (Voltage level)، تردد الإشارة، الدّارات الكهربية، ... • معايير وظيفية Functional Specifications : وظيفة كل دّارة كهربية • معايير إجرائية Procedural Specifications : الخطوات اللازمة لنقل ال Bits من طرف إلى طرف الاتصال الآخر Dr. Ashraf S. Hasan Mahmoud

  33. The OSI Model – Data Link Layer • Coverts the raw bit stream service provided by the physical layer to a reliable stream تحويل السيل المبدئي إلي سيل يمكن الاعتماد عليه: • Performs error detection and error control تقوم بعمليّات اكتشاف الأخطاء و التحكّم بها • Examples: HDLC, LAPB, LLC, etc Dr. Ashraf S. Hasan Mahmoud

  34. طبقة ربط البياناتData Layer • إرسال و استلام البيانات عبر وصلة الإتصال و التأكد من سلامتها • المعلومات اللازم تبادلها أطر (Frames) • تضيف بعض المعلومات الإضافية اللازمة لاكتشاف الأخطاء (Error Detection) Dr. Ashraf S. Hasan Mahmoud

  35. The OSI Model – Network Layer • Service الوظيفة: transfer of information between two end systems across communication network نقل حزم المعلومات بين طرفي الإتصال عبر الشبكة– End to end delivery of packets • Two end systems may be connected by طريقة ارتباط طرفي الاتصال: • Point-2-point: no need for network layer • Same network (see figure) • Different network Dr. Ashraf S. Hasan Mahmoud

  36. طبقة الشبكةNetwork Layer • الوظيفة توجيه و عنونة (Addressing) الرسائل و إنشاء أفضل مسار (Routing or Path Selection) بين الجهاز المرسل و الجهاز المستقبل عبر الشبكة • قد تقوم بتجزئة رزم البيانات التي تصلها من طبقة النقل إلى وحدات أو رزم أصغر حجما – هذه الوظيفة قد تقوم بها طبقات أخرى أيضاً Dr. Ashraf S. Hasan Mahmoud

  37. بروتوكول طبقة التطبيق 7 7 بروتوكول طبقة التقديم 6 6 بروتوكول طبقة المخاطبة 5 5 بروتوكول طبقة النقل 4 4 الشبكة 3 3 ربط البيانات 2 2 المادية 1 1 The OSI Model – Network Layer – cont’d - Point-to-Point تطبيق A تطبيق B No need for Network layer functions لا حاجة لوظائف طبقة الشبكة Dr. Ashraf S. Hasan Mahmoud

  38. 7 7 6 6 5 5 4 4 3 3 2 2 1 1 The OSI Model – Network Layer – cont’d - Same Network (2 LAN Segments) تطبيق A تطبيق B بروتوكول طبقة التطبيق بروتوكول طبقة التقديم بروتوكول طبقة المخاطبة بروتوكول طبقة النقل بروتوكول طبقة الشبكة ربط البيانات ربط البيانات ربط البيانات 2 2 المادية المادية المادية 1 1* 1* 1 Dr. Ashraf S. Hasan Mahmoud

  39. 7 7 6 6 5 5 4 4 3 3 2 2 1 1 The OSI Model – Network Layer – cont’d - Same Network (WAN) تطبيق A تطبيق B بروتوكول طبقة التطبيق بروتوكول طبقة التقديم بروتوكول طبقة المخاطبة بروتوكول طبقة النقل الشبكة الشبكة الشبكة 3 3 ربط البيانات ربط البيانات ربط البيانات 2 2* 2* 2 المادية المادية المادية 1 1* 1* 1 Dr. Ashraf S. Hasan Mahmoud

  40. 7 7 6 6 5 5 طبقة النقل طبقة النقل طبقة النقل 4 4 4 4 3 3 3* 3* 3 3 2 2 1 1 The OSI Model – Network Layer – cont’d - Different Network تطبيق A تطبيق B بروتوكول طبقة التطبيق بروتوكول طبقة التقديم بروتوكول طبقة المخاطبة الشبكة الشبكة الشبكة ربط البيانات ربط البيانات ربط البيانات 2 2* 2* 2 المادية المادية المادية 1 1* 1* 1 Dr. Ashraf S. Hasan Mahmoud

  41. The OSI Model – Transport Layer • Service: mechanism of exchanging data (or messages) between the two end systems: • For connection oriented networks: • Error-free delivery • Ordered delivery • No loss or duplication • Attempts to provide a certain quality of service (QoS) {certain max error rate, delay jitter, etc) through optimizing the the network layer services • Example: TCP (connection oriented), UDP (connectionless) Dr. Ashraf S. Hasan Mahmoud

  42. The OSI Model – Session Layer • Service: mechanism of controlling the dialogue between applications at end systemsآليّة للتحكم بالمخاطبة بين الطرفين • Dialogue Discipline (قواعد الحوار) • Grouping (التجميع) • Recovery (التّعافي) Dr. Ashraf S. Hasan Mahmoud

  43. The OSI Model – Presentation • Service: defines format of data (format, encryption, and compression) to be exchanged between applications – تحدد شكل البيانات (من حيث الهيئة ، التّشفير ، ضغطها) المتبادلة بين التطبيقات Dr. Ashraf S. Hasan Mahmoud

  44. The OSI Model – Application • Service: A means for user applications (email, ftp, etc) to access the services provided by the OSI model – )السّماح لتطبيقات المستخدِم (مثل البريد الإلكتروني ، بروتوكول نقل الملفّات ، إلخ) باستخدام الخدمات التي يوفّرها النّموذج المعياري Dr. Ashraf S. Hasan Mahmoud

  45. The TCP/IP Modelالنّموذج • TCP/IP is the result of R&D conducted on experimental packet switched network (ARPANET) and funded by Defense Advanced Research Agency (DARPA) – نموذج تجريبي صمّمته وزارة الدّفاع الأمريكيّة في بداية السبعينيّات • TCP/IP is NOW the dominant commercial architecture – The foundation of the internet and its applications هو الآن النّموذج الأكثر انتشارا – أساس الإنترنت و تطبيقاتها - Dr. Ashraf S. Hasan Mahmoud

  46. The TCP/IP Model • Model has five independent layers: • Application layer: comm between processes or applications on separate hosts • Transport layer: end-2-end transfer service – may include reliability mechanisms • Internet layer: routing data from source to destination through one or more networks • Network access layer: logical interface between end systems and the network • Physical layer: defines mechanism of transmitting raw bits depending on media characteristic Dr. Ashraf S. Hasan Mahmoud

  47. The TCP/IP Model (using the OSI Model as a reference) Dr. Ashraf S. Hasan Mahmoud

  48. Example of TCP/IP Communications • Does not show segmentation (or fragmentation in IP terms) Dr. Ashraf S. Hasan Mahmoud

  49. TCP/IP Control Information (Partial) • TCP control info: • Destination port numberرقم المنفذ في المستقبل • Sequence number رقم تسلسلي • Checksum – used for error detectionلاكتشاف الأخطاء • IP control info: • IP address العنوان حسب بروتوكول الإنترنت • Network Access control info: • Destination network access address (this is not the IP!!) • Facilities request (e.g. priorities) Dr. Ashraf S. Hasan Mahmoud

  50. TCP/IP Protocols Applications Transport services These applications do not require the TCP service IP layer Dr. Ashraf S. Hasan Mahmoud

More Related