1 / 77

An Introduction to Computer Networks

An Introduction to Computer Networks. Lecture 2: Foundation. University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani. Outline. Introduction Statistical Multiplexing Inter-Process Communication Network Architecture Performance Metrics. Introduction.

kreeli
Download Presentation

An Introduction to Computer Networks

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. An Introductionto Computer Networks Lecture 2: Foundation University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani

  2. Outline • Introduction • Statistical Multiplexing • Inter-Process Communication • Network Architecture • Performance Metrics Introduction to computer Network

  3. Introduction • Building a network to support diverse ranges of applications • Distributed computing. • Multimedia. • Telecommunication. • E-commerce, etc. • What kind of technology do we need? • Hardware. • Software. Introduction to computer Network

  4. First Step • What is computer Network? • Different views. • Differences from other networks, Its generality. • What is requirements? Different perspective: • Network provider • Network designer • Application programmer Introduction to computer Network

  5. Design goals • Connectivity • Scalability • Simplicity • For designers. • Most importantly for users. • Efficiency • cost • performance • Support for common user services. Introduction to computer Network

  6. Admin Admin An Ex. the mail system MIT Stanford Nick Dave Introduction to computer Network

  7. Characteristics of the mail system • Each envelope is individually routed. • No time guarantee for delivery. • No guarantee of delivery in sequence. • No guarantee of delivery at all! • Things get lost • How can we acknowledge delivery? • Retransmission • How to determine when to retransmit? Timeout? • Need local copies of contents of each envelope. • How long to keep each copy. • What if an acknowledgement is lost? Introduction to computer Network

  8. Admin Admin Network Layer Link Layer The mail system MIT Stanford Application Layer Nick Dave Transport Layer Introduction to computer Network

  9. Application Layer Transport Layer O.S. O.S. Network Layer Link Layer Data Data Header Header The Internet Athena.MIT.edu Leland.Stanford.edu Nick Dave Datagram Introduction to computer Network

  10. Characteristics of the Internet • Each packet is individually routed. • No time guarantee for delivery. • No guarantee of delivery in sequence. • No guarantee of delivery at all! • Things get lost • Acknowledgements • Retransmission • How to determine when to retransmit? Timeout? • Need local copies of contents of each packet. • How long to keep each copy? • What if an acknowledgement is lost? Introduction to computer Network

  11. Characteristics of the Internet (2) • No guarantee of integrity of data. • Packets can be fragmented. • Packets may be duplicated. Introduction to computer Network

  12. Admin Admin Network Layer Link Layer An Introduction to the mail system MIT Stanford Application Layer Nick Dave Transport Layer Introduction to computer Network

  13. Some questions about the mail system • How many sorting offices are needed and where should they be located? • How much sorting capacity is needed? • Should we allocate for Mother’s Day? • How can we guarantee timely delivery? • What prevents delay guarantees? • Or delay variation guarantees? • How do we protect against fraudulent mail deliverers, or fraudulent senders? Introduction to computer Network

  14. More questions about the mail system • What happens when a router fails? • How can we prevent swamping the routers with data too quickly? • How can we prevent sending data too slowly? Introduction to computer Network

  15. Building Blocks • Nodes: PC, special-purpose hardware… • hosts • switches, routers and gateways • Links: coax cable, optical fiber… • point-to-point • multiple access Introduction to computer Network

  16. Switched Networks • two or more nodes connected by a link, or A network can be defined recursively as... • two or more networks connected by two or more nodes Introduction to computer Network

  17. Strategies • Circuit switching: carry bit streams • Connection oriented. • original telephone network • Dedicated resource. • Packet switching: store-and-forward messages • Connectionless (IP) or connection oriented (ATM) • Internet • Shared resource. • Packet switching is the focus of computer Networks. Introduction to computer Network

  18. Source Destination A B Circuit Switching • It’s the method used by the telephone network. • A call has three phases: • Establish circuit from end-to-end (“dialing”), • Communicate, • Close circuit (“tear down”). • Originally, a circuit was an end-to-end physical wire. • Nowadays, a circuit is like a virtual private wire: each call has its own private, guaranteed data rate from end-to-end. Introduction to computer Network

  19. Each phone call is allocated 64kb/s. So, a 2.5Gb/s trunk line can carry about 39,000 calls. Circuit Switching Telephone Network Destination “Callee” Source “Caller” Central Office “C.O.” Central Office “C.O.” Trunk Exchange Introduction to computer Network

  20. A B Packet Switching R2 Source Destination R1 R3 R4 • It’s the method used by the Internet. • Each packet is individually routed packet-by-packet, using the router’s local routing table. • The routers maintain no per-flow state. • Different packets may take different paths. • Several packets may arrive for the same output link at the same time, therefore a packet switch has buffers. Introduction to computer Network

  21. “4” “4” Packet SwitchingSimple router model Link 1, ingress Link 1, egress Choose Egress Link 2 Link 2, ingress Choose Egress Link 2, egress R1 Link 1 Link 3 Link 3, ingress Choose Egress Link 3, egress Link 4 Link 4, ingress Choose Egress Link 4, egress Introduction to computer Network

  22. Addressing and Routing • Address: byte-string that identifies a node • usually unique • Routing: process of forwarding messages to the destination node based on its destination address • Types of addresses • unicast: node-specific • broadcast: all nodes on the network • multicast: some subset of nodes on the network Introduction to computer Network

  23. L1 R1 L2 R2 Switch 1 Switch 2 L3 R3 Multiplexing (resource sharing) • Time-Division Multiplexing (TDM) • Frequency-Division Multiplexing (FDM) Introduction to computer Network

  24. Statistical Multiplexing • On-demand time-division • Schedule link on a per-packet basis • Packets from different sources interleaved on link • scheduling • fairness, quality of service • Buffer packets that are contending for the link • Buffer (queue) overflow is called congestion … Introduction to computer Network

  25. Statistical MultiplexingBasic idea One flow Two flows rate rate Average rate time Many flows rate time Average rates of: 1, 2, 10, 100, 1000 flows. • Network traffic is bursty.i.e. the rate changes frequently. • Peaks from independent flowsgenerally occur at different times. • Conclusion: The more flows we have, the smoother the traffic. time Introduction to computer Network

  26. Packet Switching • A node in a packet switching network Node incoming links outgoing links Memory Introduction to computer Network

  27. Packet SwitchingStatistical Multiplexing Packets for one output Queue Length X(t) Dropped packets 1 Data Hdr R X(t) B R 2 Data Hdr Link rate, R R Packet buffer N Data Hdr Time • Because the buffer absorbs temporary bursts, the egress link need not operate at rate (NxR). • But the buffer has finite size, B, so losses will occur. Introduction to computer Network

  28. Statistical Multiplexing A Rate C C A time B Rate C C B time Introduction to computer Network

  29. Statistical Multiplexing Gain A+B Rate 2C R < 2C A R B time Statistical multiplexing gain = 2C/R Other definitions of SMG: The ratio of rates that give rise to a particular queue occupancy, or particular loss probability. Introduction to computer Network

  30. Why does the Internet usepacket switching? • Efficient use of expensive links: • The links are assumed to be expensive and scarce. • Packet switching allows many, bursty flows to share the same link efficiently. • “Circuit switching is rarely used for data networks, ... because of very inefficient use of the links” - Gallager • Resilience to failure of links & routers: • ”For high reliability, ... [the Internet] was to be a datagram subnet, so if some lines and [routers] were destroyed, messages could be ... rerouted” - Tanenbaum Introduction to computer Network

  31. Some Definitions • Packet length, P, is the length of a packet in bits. • Link length, L, is the length of a link in meters. • Data rate, R, is the rate at which bits can be sent, in bits/second, or b/s.1 • Propagation delay, PROP, is the time for one bit to travel along a link of length, L. PROP = L/c. • Transmission time, TRANSP, is the time to transmit a packet of length P. TRANSP = P/R. • Latency is the time from when the first bit begins transmission, until the last bit has been received. On a link: Latency = PROP + TRANSP. 1. Note that a kilobit/second, kb/s, is 1000 bits/second, not 1024 bits/second. Introduction to computer Network

  32. A B Host A TRANSP1 “Store-and-Forward” at each Router TRANSP2 R1 PROP1 TRANSP3 R2 PROP2 TRANSP4 R3 PROP3 Host B PROP4 Packet Switching R2 Source Destination R1 R3 R4 Introduction to computer Network

  33. M/R M/R Host A Host A R1 R1 R2 R2 R3 R3 Host B Host B Packet Switching vs. Message switching Breaking message into packets allows parallel transmission across all links, reducing end to end latency. It also prevents a link from being “hogged” for a long time by one message. Introduction to computer Network

  34. Host Host Application Host Channel Application Host Host Inter-Process Communication • Turn host-to-host connectivity into process-to-process communication regardless where the process are. • Give a unified view and fill gaps between what applications expect and what the underlying technology provides. Introduction to computer Network

  35. IPC Abstractions • Request/Reply (Client-server) • distributed file systems (NFS) • digital libraries (web) • File Transfer (FTP) • Guarantee delivering data, and might protect privacy and integrity also. • common communication patterns. Introduction to computer Network

  36. IPC Abstractions(Cont) • Stream-Based- sequence or stream of bits. • Video on demand: sequence of frames. Delay constrained, but can be fetched before hand. For example, a Monitor with 352x240 pixels and 24 bit color. (352 x 240 x 24)/8=247.5KB Assuming 30 frame per second => 7500KBps = 60Mbps • video Conferencing- tightly delay bounded. VIC From Berkeley. • Both application can tolerate packet loss. • Questions? • What functionality each channel should provide? • Where the functionality has to be implemented? In the end points or in the network? Introduction to computer Network

  37. Reliability in the network? What Goes Wrong in the Network? • Bit-level errors (electrical interference), a bit is corrupted or a burst error. • Packet-level errors (congestion) • Messages are delayed • Messages are deliver out-of-order • Third parties eavesdrop, (lost packets) • Link and node failures Introduction to computer Network

  38. Layering • Use abstractions to hide complexity and decompose to manageable components. • Abstraction naturally lead to layering • Alternative abstractions at each layer Application programs Request/Reply Message Stream channel channel Host-to-host connectivity Hardware Introduction to computer Network

  39. Layering • Advantages • Modularity – protocols are easier to manage and maintain • Abstract functionality –lower layers can be changed without affecting the upper layers • Reuse – upper layers can reuse the functionality provided by lower layers • Disadvantages • Information hiding – inefficient implementations Introduction to computer Network

  40. Protocols • Building blocks of a network architecture, or layer abstraction. • Each protocol object has two different interfaces • service interface: operations on this protocol • peer-to-peer interface: messages exchanged with peer • Term “protocol” is overloaded • specification of peer-to-peer interface • module that implements this interface Introduction to computer Network

  41. Interfaces Host 2 Host 1 Service High-level High-level interface object object Protocol Protocol Peer-to-peer interface Introduction to computer Network

  42. Host 2 Host 1 Digital Digital Video Video File File library library application application application application application application MSP MSP RRP RRP HHP HHP Protocol Machinery • Protocol Graph • Nodes are protocols and edges are depend on. • most peer-to-peer communication is indirect • peer-to-peer is direct only at hardware level

  43. Protocol Machinery (cont) • Multiplexing and Demultiplexing (demux key) • Encapsulation (header/body) Host 2 Host 1 Application Application program program Data Data RRP RRP RRP Data RRP Data HHP HHP RRP Data HHP

  44. ISO OSI Reference Model • ISO – International Standard Organization • OSI – Open System Interconnection • Started to 1978; first standard 1979 • ARPANET started in 1969; TCP/IP protocols ready by 1974 • Goal: a general open standard • allow vendors to enter the market by using their own implementation and protocols Introduction to computer Network

  45. ISO Architecture End host End host Telnet, FTP, TFTP MSB, integer Manage TCP streams Message, P2P(process) Packet, routing Frame, CRC Raw bit pipe Application Application Presentation Presentation Session Session Transport Transport Network Network Network Network Data link Data link Data link Data link Physical Physical Physical Physical One or more nodes within the network • The last 3 protocols are implemented in all elements in the • Network. Introduction to computer Network

  46. Encapsulation • A layer can use only the service provided by the layer immediate below it • Each layer may change and add a header to data packet data data data data data data data data data data data data data data Introduction to computer Network

  47. OSI Model Concepts • Service – says what a layer does • Interface – says how to access the service • Protocol – Says how the communication is done and how is the service implemented • a set of rules and formats that govern the communication between two peers Introduction to computer Network

  48. Physical Layer (1) • Service: move the information between two systems connected by a physical link • Interface: specifies how to send a bit • Protocols: coding scheme used to represent a bit, voltage levels, duration of a bit • Examples: coaxial cable, optical fiber links; transmitters, receivers Introduction to computer Network

  49. Datalink Layer (2) • Service: • framing, i.e., attach frame separators • send data frames between peers • others: • arbitrate the access to common physical media • ensure reliable transmission • provide flow control • Interface: send a data unit (packet) to a machine connected to the same physical media • Protocols: layer addresses, implement Medium Access Control (MAC) (e.g., CSMA/CD)… Introduction to computer Network

  50. Network Layer (3) • Service: • deliver a packet to specified destination • perform segmentation/reassemble • others: • packet scheduling • buffer management • Interface: send a packet to a specified destination • Protocols: define global unique addresses; construct routing tables Introduction to computer Network

More Related