protocol stack iso osi model
play

Protocol Stack: ISO OSI Model CSCE 515: Application Computer - PDF document

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


  1. 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 � Provides frame-level error control Presentation � Provides flow control Session � Responsibilities: Session � Issues: � Transmission of a raw bit stream Transport � framing (dividing data into chunks) � Forms the physical interface between devices Transport header & trailer bits Issues: � Network � Network � addressing � mechanical and electrical interfaces 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- between peer processes. Session Session systems (routing). Dynamic routing � end-to-end flow control � Transport Transport Fixed routing � � Issues: Network � fragmentation & reassembly Network � translation between different � headers Data link Data link network types � error detection Physical Physical � reliable communication 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming

  2. 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 � Data encryption Session Session systems � Data compression � Groups several user-level connections Transport 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. Presentation Layer. Data link Data link 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 layers � Internet or TCP/IP layering widespread Session � 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/ I P model Host A Host B � A simplified model Application � The network layer Application Application Application Presentation Hosts drop packets � into this layer, layer Session routes towards destination- only Transport Transport Transport Transport promise- try my best The transport layer Network Network � Network Network Network � Reliable/unreliable Data link Data link Data link byte oriented stream Data link Host to Network Layer Physical Physical Physical Physical Router 2007 CSCE515 – Computer Network Programming 2007 CSCE515 – Computer Network Programming

  3. Layering & Headers Header encapsulation and stripping � Each layer needs to add some control information to the data in order to do it’s Data Host A Host B job. AH Data � This information is typically pre-appended Application Application to the data before being given to the lower TH AH Data Transport Transport layer. Network Network NH TH AH Data � Once the lower layers deliver the data and Data link Data link DH NH TH AH Data DT 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 protocol � � type of service � header checksum header checksum � no header - just a bunch of bits. � length of the data � source network source network � address address � packet identifier Data Link: � destination network destination network � � fragment number � address of the receiving endpoints address 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 an address. � communication between machines on the 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

  4. 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 � Allows the extension of a network beyond � address must be able to select any host on the network. physical length limitations � Network Layer � 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. ROUTER ROUTER 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

  5. Hardware vs. Software � Repeaters are typically hardware devices. � Bridges can be implemented in hardware Data Link Layer or software. Protocol � Routers & Gateways are typically 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 � Signals propagate over a physical medium � Convert bits to signals and recover bits from � Modulate electromagnetic waves received signals � e.g. vary voltage � Encoding � Encode binary date onto signals � Decide on a minimum unit for sending bits � 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 � Or correct errors without retransmission � Frame delineation � 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

Recommend


More recommend