Upcoming SlideShare
×

Introduction to the OSI 7 layer model and Data Link Layer

9,949 views

Published on

Published in: Education, Technology
14 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Nic3...........

Are you sure you want to  Yes  No
• nice,,,

http://7osilayers.com

Are you sure you want to  Yes  No
Views
Total views
9,949
On SlideShare
0
From Embeds
0
Number of Embeds
712
Actions
Shares
0
498
2
Likes
14
Embeds 0
No embeds

No notes for slide

Introduction to the OSI 7 layer model and Data Link Layer

1. 1. Introduction to OSI 7 layer model and Data Link Layer in Detail VNIT ACM Student Chapter - Mustaqim Moulavi
2. 2. Introduction to Number system <ul><li>Binary number system </li></ul>
3. 3. Introduction to Number system <ul><li>Hexadecimal number system </li></ul><ul><li>0000 = 0 = (0) 10 </li></ul><ul><li>0001 = 1 = (1) 10 </li></ul><ul><li>0010 = 2 </li></ul><ul><li>. </li></ul><ul><li>1010 = A = (10) 10 </li></ul><ul><li>. </li></ul><ul><li>1110 = E = (14) 10 </li></ul><ul><li>1111 = F = (15) 10 </li></ul>
4. 4. 7 Layer OSI Model of Networking Architecture <ul><li>ISO/ Open System Interconnection Reference Model </li></ul><ul><li>It divides network </li></ul><ul><li>architecture into seven </li></ul><ul><li>layers which, from top </li></ul><ul><li>to bottom </li></ul><ul><li>A layer is a collection of conceptually similar functions that provide services to the layer above it and receives service from the layer below it. </li></ul>
5. 5. 7 Layer OSI Model of Networking Architecture <ul><ul><li>Outlines WHAT needs to be done to send data from one computer to another. </li></ul></ul><ul><ul><li>Each layer Provides services to the layer above it </li></ul></ul><ul><ul><li>And gets services </li></ul></ul><ul><ul><li>From layer below it </li></ul></ul><ul><ul><li>You can see it like </li></ul></ul><ul><ul><li>Each layer is customer </li></ul></ul><ul><ul><li>Of the layer below it </li></ul></ul><ul><ul><li>And provides services to </li></ul></ul><ul><ul><li>Layer above it </li></ul></ul>
6. 6. 7 Layer OSI Model of Networking Architecture What each layer does?
7. 7. Remembering the 7 Layers <ul><li>7 - A pplication A ll </li></ul><ul><li>6 - P resentation P eople </li></ul><ul><li>5 - S ession S eem </li></ul><ul><li>4 - T ransport T o </li></ul><ul><li>3 - N etwork N eed </li></ul><ul><li>2 - D ata Link D ata </li></ul><ul><li>1 - P hysical P rocessing </li></ul>
8. 8. Topics for today’s seminar <ul><li>Data Link Layer in Detail in 3 parts </li></ul><ul><li>The Basic Design principles for Layer 2 i.e. Link Layer communication between only 2 nodes and dealing with problems </li></ul><ul><li>Working of Real networks - Ethernet (LAN) system at the Link Layer level </li></ul><ul><li>Wireshark Demo showing the actual live data flowing in the network in the form of packets, decoding them and understanding what all this data packets means.* </li></ul>
9. 9. Some terminology: <ul><li>hosts and routers are nodes </li></ul><ul><li>communication channels that connect adjacent nodes along communication path are links </li></ul><ul><ul><li>wired links </li></ul></ul><ul><ul><li>wireless links </li></ul></ul><ul><ul><li>LANs </li></ul></ul><ul><li>layer-2 packet is a frame , encapsulates datagram </li></ul>“ link”
11. 11. Link layer: context <ul><li>Datagram transferred by different link protocols over different links: </li></ul><ul><ul><li>e.g., Ethernet on first link, frame relay on intermediate links, 802.11 on last link </li></ul></ul><ul><li>Each link protocol provides different services </li></ul><ul><ul><li>e.g., may or may not provide rdt over link </li></ul></ul><ul><li>transportation analogy </li></ul><ul><li>trip from kanyakumari to delhi </li></ul><ul><ul><li>ship: kanyakumari to chennai </li></ul></ul><ul><ul><li>plane: chennai to mumbai </li></ul></ul><ul><ul><li>train: mumbai to delhi </li></ul></ul><ul><li>tourist = datagram </li></ul><ul><li>transport segment = communication link </li></ul><ul><li>transportation mode = link layer protocol </li></ul><ul><li>travel agent = routing algorithm </li></ul>
12. 12. Why data link layer is required? <ul><li>The data sent in the physical layer is in the form of 0 and 1. physical layer doesn't understand what it means. </li></ul><ul><li>It is like 2 blind persons communicating with only 2 words YES and NO. </li></ul><ul><li>No one knows where a sentence starts and where it ends and what it means. </li></ul><ul><li>Moreover Communication circuits make errors occasionally. </li></ul><ul><li>The function of the link layer is to provide error free communication and make some meaning out of the data sent/receieved. </li></ul>
13. 13. Specific functions of the link layer <ul><li>The task of data link layer is to convert the raw bit stream offered by the physical layer into a stream of frames for use by the network layer </li></ul><ul><li>Providing reliable service to the layer above it i.e. network layer </li></ul><ul><li>Dealing with transmission errors. </li></ul><ul><li>Regulating the flow of data so that slow receivers are not swamped by fast senders </li></ul>
15. 15. Link Layer Services (more) <ul><li>Flow Control: </li></ul><ul><ul><li>pacing between adjacent sending and receiving nodes </li></ul></ul><ul><li>Error Detection : </li></ul><ul><ul><li>errors caused by signal attenuation, noise. </li></ul></ul><ul><ul><li>receiver detects presence of errors: </li></ul></ul><ul><ul><ul><li>signals sender for retransmission or drops frame (used in fiber optics and wired networks) </li></ul></ul></ul><ul><li>Error Correction: </li></ul><ul><ul><li>receiver identifies and corrects bit error(s) without resorting to retransmission (used in wifi) </li></ul></ul>
16. 16. Adaptors Communicating <ul><li>sending side: </li></ul><ul><ul><li>encapsulates datagram in a frame </li></ul></ul><ul><ul><li>adds error checking bits, flow control, etc. </li></ul></ul><ul><li>receiving side </li></ul><ul><ul><li>looks for errors, flow control, etc </li></ul></ul><ul><ul><li>extracts datagram, passes to receiving node </li></ul></ul>sending node datagram adapter adapter link layer protocol frame frame
17. 17. One of the Methods of Framing <ul><li>Starting and ending flags with bit stuffing </li></ul><ul><li>Each frame begins and ends with a special bit pattern (flag byte) 01111110 </li></ul><ul><li>Whenever the senders data link layer encounters five consecutive ones in the data it automatically stuffs a zero bit into the outgoing bit stream </li></ul>Thus if the receiver looses track of where it is all it has to do is to scan input for flag sequences since they can only occur at frame boundaries and never within the data.
18. 18. Reliable delivery <ul><li>The outgoing frames are numbered and the receiver sends an acknowledgement for that particular frame </li></ul><ul><li>So the sender knows which frames the receiver has received. </li></ul><ul><li>Sender knows which frame to send again and which shouldn’t be sent again. </li></ul><ul><li>This ensures the reliable delivery of the data </li></ul>
19. 19. Flow control <ul><li>Sender wants to send fast than the capacity of the receiver. </li></ul><ul><li>The frames might be lost in this case </li></ul><ul><li>Feedback based flow control </li></ul><ul><li>Receiver sends back information to sender giving it permission to send more data </li></ul><ul><li>For example when a connection is setup the receiver might say “you may send me n frames now but after they have been sent do not send any more until I have told you to continue” </li></ul>
20. 20. Error Detection <ul><li>EDC= Error Detection and Correction bits (redundancy) </li></ul><ul><li>D = Data protected by error checking, may include header fields </li></ul><ul><li>Error detection not 100% reliable! </li></ul><ul><ul><li>protocol may miss some errors, but rarely </li></ul></ul><ul><ul><li>larger EDC field yields better detection and correction </li></ul></ul>
21. 21. Parity Checking Single Bit Parity: Detect single bit errors Two Dimensional Bit Parity : Detect and correct single bit errors Chances are 50:50
22. 22. <ul><li>Sender: </li></ul><ul><li>treat segment contents as sequence of 16-bit integers </li></ul><ul><li>checksum: addition (1’s complement sum) of segment contents </li></ul><ul><li>sender puts checksum value into UDP checksum field </li></ul><ul><li>Receiver: </li></ul><ul><li>compute checksum of received segment </li></ul><ul><li>check if computed checksum equals checksum field value: </li></ul><ul><ul><li>NO - error detected </li></ul></ul><ul><ul><li>YES - no error detected. But maybe errors nonetheless? More later …. </li></ul></ul>Goal: detect “errors” (e.g., flipped bits) in transmitted segment (note: used at transport layer only )
23. 23. Checksumming: Cyclic Redundancy Check used at link layer <ul><li>view data bits, D , as a binary number </li></ul><ul><li>choose r+1 bit pattern (generator function), G </li></ul><ul><li>goal: choose r CRC bits, R , such that </li></ul><ul><ul><li><D+R> exactly divisible by G (modulo 2) </li></ul></ul><ul><ul><li>receiver knows G, divides <D,R> by G. If non-zero remainder: error detected! </li></ul></ul><ul><li>widely used in practice </li></ul>
24. 24. CRC Example <ul><li>D = 101110 </li></ul><ul><li>Add r = 000 after D (for purpose of division only) </li></ul><ul><li>G= 1001 </li></ul><ul><li>Remainder R = 011 </li></ul><ul><li>Add remainder R to D </li></ul><ul><li>D+R = 101110(011) </li></ul><ul><li>This bitpattern is divisible by generator function and so will be error free </li></ul><ul><li>IEEE 802 G function = 1000001001100000010001110110110111 </li></ul>
25. 25. Working of Ethernet MAC Addresses and ARP <ul><li>32-bit IP address: </li></ul><ul><ul><li>network-layer address </li></ul></ul><ul><ul><li>used to get datagram to destination IP subnet </li></ul></ul><ul><li>MAC (or LAN or physical or Ethernet) address: </li></ul><ul><ul><li>used to get datagram from one interface to another physically-connected interface (same network) </li></ul></ul><ul><ul><li>48 bit MAC address (for most LANs) burned in the adapter ROM </li></ul></ul>