OSI Reference Model Link Layer

OSI Reference Model Link Layer

Protocol Stack: ISO OSI Model CSCE 515: Application Computer Network Programming Presentation OSI Models & Data link layer Session Transport Network Wenyuan Xu Data link Physical Department of Computer Science and Engineering University of South Carolina ISO: the International Standards Organization OSI: Open Systems Interconnection Reference Model (1984) Some slides are made by Dave Hollinger and Badri Nath 2007 CSCE515 – Computer Network Programming Layer 1: Physical Layer Layer 2: Data Link Layer Responsibilities: Application Provides reliable transfer of information Application between two adjacent nodes Presentation Presentation Provides frame-level error control Provides flow control Session Responsibilities: Session Issues: Transport Transmission of a raw bit stream Forms the physical interface between devices Transport framing (dividing data into chunks) Network Issues: header & trailer bits mechanical and electrical interfaces Network addressing Data link time per bit Data link distances Physical Physical 10110110101 01100010011 10110000001 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming Layer 3: Network Layer Layer 4: Transport Layer Application Application Responsibilities: Presentation Responsibilities: Presentation provides virtual end-to-end links path selection between end- Session systems (routing). Session between peer processes. Transport Dynamic routing Transport end-to-end flow control Fixed routing Network fragmentation & reassembly Network Issues: translation between different headers Data link network types Data link error detection Physical Physical reliable communication 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming Layer 5: Session Layer Layer 6: Presentation Layer Application Application Responsibilities: Responsibilities: Presentation Establishes, manages, and terminates a Presentation Represents data properly communication session with remote Session systems Session Data encryption Data compression Transport Groups several user-level connections Transport into a single “session” Data conversion Network Many protocol suites do not include a Network Many protocol suites do not include a Session Layer. Data link Data link Presentation Layer. Physical Physical 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming Layer 7: Application Layer Problems Seven layers not widely accepted Standardized before implemented Application Responsibilities: Top three layers fuzzy Presentation Anything not provided by any of the other Session layers Internet or TCP/IP layering widespread Implements communication between two Transport applications of the same type Network Examples: FTP Data link HTTP SMTP/POP3/IMAP (email) Physical 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming TCP/IP Layering Architecture Hybrid Reference Model OSI model TCP/IP model Host A Host B Application A simplified model The network layer Presentation Application Hosts drop packets Application Application into this layer, layer Session routes towards destination- only Transport Transport promise- try my best Transport Transport Network Network The transport layer Network Network Network Reliable/unreliable Data link Host to Network byte oriented stream Data link Data link Data link Physical Layer Physical Physical Physical Router 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming Header encapsulation and stripping Layering & Headers Each layer needs to add some control Host A Data Host B information to the data in order to do it’s job. AH Data Application Application This information is typically pre-appended to the data before being given to the lower TH AH Data Transport Transport layer. Network NH TH AH Data Network Data link DH NH TH AH Data DT Data link Once the lower layers deliver the data and Physical Physical control information - the peer layer uses the control information. 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming What are the headers? Network layer header - examples Physical: protocol suite version protocol no header - just a bunch of bits. type of service header checksum length of the data source network address Data Link: packet identifier fragment number destination network address of the receiving endpoints address time to live address of the sending endpoint length of the data checksum. 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming Important Summary Addresses Data-Link: Each communication endpoint must have communication between machines on the an address. same network. Consider 2 processes communicating over Network: an internet: communication between machines on the network must be specified possibly different networks. the host (end-system) must be specified Transport: the process must be specified. communication between processes (running on machines on possibly different networks). 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming Addresses at Layers Repeater Physical Layer Copies bits from one network to another no address necessary Does not look at any bits Data Link Layer address must be able to select any host on the network. Allows the extension of a network beyond Network Layer physical length limitations address must be able to provide information to enable routing. Transport Layer address must identify the destination process. REPEATER 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming Bridge Router Copies frames from one network to Copies packets from one network to another. another Makes decisions about what route a packet should take (looks at network headers). Can operate selectively - does not copy all frames (must look at data-link headers). Extends the network beyond physical length limitations. ROUTERROUTER BRIDGE 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming Gateway Which layer? Operates as a router Repeater & Hub Data conversions above the network layer. physical layer Conversions: Bridge & Switch encapsulation - use an intermediate network data link layer translation - connect different application Router protocols network layer encryption - could be done by a gateway Gateway network layer and above. 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming Hardware vs. Software Repeaters are typically hardware devices. Bridges can be implemented in hardware or software. Data Link Layer Routers & Gateways are typically Protocol implemented in software so that they can be extended to handle new protocols. Many workstations can operate as routers or gateways. 2007 CSCE515 – Computer Network Programming Date Link Layer Functionality Encoding Convert bits to signals and recover bits from Signals propagate over a physical medium received signals Modulate electromagnetic waves Encoding e.g. vary voltage Decide on a minimum unit for sending bits Encode binary date onto signals e.g. 0 as low signal and 1 as high signal Frame creation Known as non-return to zero (NRZ) Error detection and /or correction of frames Non-return to zero inverted (NRZI) Parity, CRC Make a transition from current signal to encode a 1; stay at current signal to encode a 0 Flow control Manchester ARQ, Sliding WINDOW Transmit xor of the NRZ encoded data and the clock Only 50% efficient 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming Framing Error Control The date unit at the date link layer is called a No physical link is perfect “frame” Bits will be corrupted A frame is a group of bits, typically in sequence We can either: Issues: Detect errors and request retransmission Frame creation Frame delineation Or correct errors without retransmission Use starting and ending characters (tags) to mark boundaries of frame Error Detection Problem: what if tag characters occur in the date or Parity bits control portions of the frame Polynomial codes or checksums Insert extra escape character when a tag appears in date field 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming Parity bits Polynomial codes Append a single parity bit to a sequence of bits Can detect errors on large chunks of data If using ‘odd’ parity, the parity bit is chosen to Has low overhead make the total number of 1’s in the bit sequence odd More robust than parity bit If ‘even’ parity, the parity bit makes the total Requires the use of a “code polynomial” number of 1’s in the bit sequence even Example x2+1 Q: for even parity, what’s the parity bit for 00010101? Message 1011 -> 1 *x3 + 0 *x2 + 1 *x + 1 = x3 + x + 1 Problem: Only detects when there are an odd number of bit errors 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming Cyclic redundancy check Decoding a CRC CRC: Example of a polynomial code Procedure Procedure: 1. Let n be the length of the checksummed 1. Let r be the degree of the code polynomial. Append message in bits r zero bits to the end of the transmitted bit string. Call 2. Divide the checksummed message by the the entire bit string S(x) code polynomial using modulo 2 division. If 2. Divide S(x) by the code polynomial using modulo 2 division. the remainder is zero, there is no error detected. 3. Subtract the remainder from S(x) using

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us