460 likes | 593 Views
COP 5611 Operating Systems Spring 2010. Dan C. Marinescu Office: HEC 439 B Office hours: M-Wd 2:00-3:00 PM. Lecture 10. Reading Assignment: Chapter 7 from the online textbook A progress report for the project is due on every Monday. Last time : Network properties Today: Layering
E N D
COP 5611 Operating Systems Spring 2010 Dan C. Marinescu Office: HEC 439 B Office hours: M-Wd 2:00-3:00 PM
Lecture 10 Reading Assignment: Chapter 7 from the online textbook A progress report for the project is due on every Monday. Last time: Network properties Today: Layering Link layer Network layer Next time Routing 2 2 2 2 2
Layering • Simplify the design • Example- RPC
Network layers for store and forward networks • Every module has three interfaces: • To the layers above • To the layers below • To the peer layer on another system • Each layer hides the operation of the layer below from the layer above and provides its own interpretation of the important features of the layers below. • A minimum of three layers are necessary: • Link layer move data from one point to another. Includes • Network layer forward data through intermediate node towards the destination • End-to-end-layer provides all the functions required by the application including • Encapsulation: each layer treats information received from the layers above as raw data and adds control information (headers and trailers) understood only byits peer.
Layering in different network architectures • OSI –has 7 layers • The upper four layers are: • Application • Presentation translate data formats and emulate the semnatics of RPC • Transport deal with lost, duplicate, out of order, segments • Session deals with connectivity • Internet is based on a model including • Application • Transport – transports segments • Network – transports packets • Data Link – transports frames • Applications are very diverse and it makes no sense for a lower layer to implement functions required by higher layers. • The end-to-end argument application knows best
Example of an end-to end argument • Should we have a checksum implemented at the link layer or should leave it for the application protocol e.g., a file transfer protocol? • If we implement it at the link layer • Advantage: detect earlier an error • Disadvantage: the data may still be affected by errors when buffered at the upper layers.
Application, Transport, Network, and Data Link Layer Protocols
Network composition • Network composition: • Mapped composition A network layer is built directly on another network layer by mapping directly higer-layer network addresses to lower-layer network addresses. Example: • Internetworking interconnect several networks together, e.g., the Internet • Recursive composition a network layer rests on a link layer that it is itself a complete network. Examples: • Overlay networks. E.g., Gnutella
Network composition. The overlay network Gnutella uses for its link layer an end-to-end transport protocol of the Internet. In turn, the Internet uses for one of its links an end-to-end transport protocol of a dial-up phone system
More about the link layer • Function: push bits from one place to another • In this architecture the link layer combines: • MAC (medium access control layer) • The physical layer • Analog worlds • Capacity of a communication channel • Capacity of a noisy communication channel C= B x log (1+ signal/noise) B is the bandwidth in Hz signal/noise – ratio of signal power to noise power • Signals attenuation • Signals are distorted over long distances
How to push bits from A to B which do not share the same clock? First raise the READY line
Error detection and error correction Encode data with an error detection code. Use error correction if necessary.
Framing • A pattern of bits serve as a frame delimiter – e.g., seven 1’s • Bit stuffing: • The sender: add a 0 whenever it encounters a pattern of six 1’s in data • The receiver: remove a 0 following a pattern of six 1’s in data • Add a frame header • Add a frame trailer
Link properties • We distinguish several types of links: • Point-to-point • Broadcast links • Each link imposes a maximum transmission unit (MTU) the largest frame size which affects • Timing, un upper bound on link commitment time • Error, the longer the frame the larger the probability of error for a given error rate on the link • Buffer space at each end
The network layer • A network can be viewed as consisting of • Network core – carries out segments from one communicating entity to another • Network periphery – hosting the communicating entities at attachment points • Addressing – each communicating entity must have a unique address.
Network model The network layer transports packets The network core consists of routers which forward packets using routing tables The input for network layer on a host at the periphery of the network is a segment in a segment buffer at the transport layer. The output is a link buffer
All hosts must have logical addresses All devices have a physical address of the interface Must obtain a logical address