1 / 56

BIM 3 02 : Computer Networks

Learn about computer networks and how data is transmitted through a transmission system using packet switching. This course covers circuit-switching, frequency division multiplexing, time division multiplexing, and more. Join us on Thursdays at 09:15-12:00 in BLab4 with instructors Emre Kaçmaz and Yasin Pak.

lmadsen
Télécharger la présentation

BIM 3 02 : 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. BIM 302: Computer Networks • Time:Thursdays 09:15-12:00 • Location: BLab4 • Instructor:Emre Kaçmaz – Yasin Pak • Grading: • Midterm I – 15% • Midterm II – 15% • 1 Final – 40% • Homeworks - 30%

  2. High-level picture of the problem Transmission System Sender Node Destination Node Problem: Transmit a message M from asource node to one or moredestination node(s) through a transmission system=computer network Nodes: Things that send/receive messages. Examples are PCs, labtops, PDAs, Internet telephones etc.

  3. mesh of interconnected routers (switches) inter-connected in an arbitrary topology the fundamental question: how is data transferred through net? circuit switching: dedicated circuit per call: telephone net packet-switching: data sent thru net in discrete “chunks” Transmission System Sender Node Destination Node

  4. End-end resources reserved for “call” call setup required After the call, the resources (the circuit bandwidth) is dedicated and is not shared with other calls circuit-like (guaranteed) performance This course is not about circuit-switching, but we will touch on it so that you get an idea on how it works Circuit-Switching: Idea

  5. After the call is setup, the data flows through the circuit bit by bit No store or forward delay at the routers (switches) As soon as a bit from the connection arrives at a router, it is immediately forwarded over the outgoing link without any delay So the transmission time is independent of the # of links from the source to the destination Circuit-Switching: Data Flow

  6. How do several calls using the same link share the link? In the example above, we have 2 calls sharing 2 links in the middle of the network 2 Approaches Frequency Division Multiplexing (FDM) Time Division Multiplexing (TDM) CS: Sharing Link Capacity

  7. FDM: Divide the link capacity into several frequency bands (space-wise division) and allocate each band to a different call Each circuit gets the fraction of the bandwidth continuously (all the time) Also used by radio/TV transmission through the air Circuit-Switching: FDM

  8. TDM: Divide the link capacity in time into several slots and allocate each slot to a different call Each circuit gets ALL of the link bandwidth periodically Used by wireless telephones (GSM) Circuit-Switching: TDM

  9. Circuit Switching Example • 1890-current: Phone network • Fixed bit rate • Mostly voice • Not fault-tolerant • Components extremely reliable • Global application-level knowledge throughout network

  10. Circuit Switching: Summary • Establish a dedicated circuit before sending data • Dedicated resources • Data flows through the circuit • No store and forward at the switches (routers) • Good for constant-bit-rate traffic such as voice • BUT • Dedicated resources means if no data is flowing the circuit, the allocated resources are idle • Leads to waste of network resources • Might be OK for telephone calls where two parties are typically talking all the time • But is this good if two people are exchanging a data as in a instant messaging session? • How can be let other people use unused bandwidth? • Packet Switching -- Next

  11. Divide the message into smaller chunks, packets Send each packet through the network independently Each packet uses a link’s full bandwidth during transmission Resources are used as needed Packet-Switching: Idea Message M queue of packets waiting for output link Message M

  12. 1 Mbit link each user: 100Kbps when “active” active 10% of time circuit-switching: can admit 10 users packet switching: With 35 users, probability > 10 active less that .004 Conclusion: Packet switching allows more users to use network! Packet switching vs Circuit Switching N users 1 Mbps link

  13. resource contention: aggregate resource demand can exceed amount available congestion: packets queue, wait for link use store and forward: packets move one hop at a time A router must receive the whole packet before the packet can be forwarded After reception, queue the packet internally and have it wait its turn for the output link. This is done by each router: Per hop forwarding Sequence of A & B packets does not have fixed pattern Called statistical multiplexing. A Message M B queue of packets waiting for output link Message M Packet-Switching: Link Sharing

  14. Two Fundamental Questions must be answered in a packet-switched network: What should the packet size be? Fixed-size or variable-sized packets? How big? Should we establish an end-to-end path through the network for the packets to flow? Yes: Virtual-Circuit Networks (X.25, Frame-Relay, ATM) No: Datagram Networks (the Internet) Packet-Switching: Issues

  15. Consider a message M, that is 7.5*106 bits long, no message frag. Assume each link has 1.5Mbps bandwidth It takes (7.5*106 /1.5Mbps) = 5 seconds to move the message from the source to the first switch (router) R1 Another 5 secs to move M from R1 to R2 Another 5 secs to move M from R2 to destination Total time: 5 + 5 + 5 = 15 seconds Packet-Switching: Packet Size Destination Source R1 R2 0 5 10 15

  16. Assume now that we divide the message into 5000 packets, each 1500 bits long It takes 1 milisecs to move the 1st packet from S to R1 But while the first packet is being moved from R1 to R2, we are also moving 2nd packet from S to R1 The first packet makes it to D in time 3ms, the 2nd packet is at R2 and 3rd packet is at R1 at this time Following this logic, the last packet makes it to D at time 5002 ms = 5.002 sec as opposed to 15 seconds Packet-Switching: Packet Size Destination = D Source = S R1 R2 0 1 1 2 1 2 3 1 3 2 2 3 5 3 5002 5000

  17. Small-sized packets has yet another advantage Bit errors can be introduced as packet travels through the network. In such cases the packet is simply discarded The smaller the packet, the smaller the discarded info If small packets are so good, why not make them 1 byte Each packet carries some headers with it Headers are used for packet forwarding, and other stuff The smaller the packet, the bigger the header to payload ratio, which translates to more waste of bandwidth Consider 100 byte packets with 20 byte header 20% bandwidth waste Consider 1000 byte packets with 20 byte header 2% bandwidth waste Packet-Switching: Packet Size

  18. Virtual Circuit Networks (e.g., X.25, Frame Relay, ATM) Establish a path along which the packets will flow between the source and the destination. How? Use a signaling (virtual circuit establishment) protocol Ex: B tells its router (R1) that it wants to talk to C The call establishment message is forwarded by the routers in the network until it reaches C. Then a reply comes back from C to B. Path established at call setup time remains fixed during packet exchange Routers maintain state information for ongoing connections Virtual Circuits Networks: Signaling C R5 R2 R10 R3 A R6 D R9 R4 R1 R7 B R8

  19. Virtual Circuits Networks: Forwarding C R5 A R2 R10 R3 3 3 1 45 R6 43 53 2 69 D 2 22 2 R9 1 9 66 R4 R1 77 12 R7 B R8 VC table at R1: VC table at R2: • each packet carries tag (virtual circuit ID), which determines next hop • Path established at call setup time remains fixed during packet exchange • Routers maintain state information for ongoing connections

  20. Datagram Networks: Idea C R5 A R2 R10 R3 C C C D R6 D D C D C C R9 D C R4 R1 D C C D R7 D B D R8 D • Datagram networks (e.g. the Internet): • No call establishment before data exchange • Simply put the destination address on top of the packet and submit it to the network for delivery • Similar to postal service

  21. Datagram Networks: Forwarding C R5 A R2 R10 R3 C C C 3 1 D R6 D D 2 C D 2 C C R9 1 D C R4 R1 D C R7 B R8 Forwarding table at R1: Forwarding table at R2: • Destination address is written on top of a packet and it is simply submitted to the network for delivery (like postal service) • Routerslook atdestination address in packet to determine the next hop • No connection-state information needed in the routers • Routes may change during session

  22. Great for bursty data resource sharing But, excessive congestion: packet delay and loss protocols needed for reliable data transfer, congestion control Q: How to provide circuit-like behavior? Bandwidth guarantees needed for audio/video apps Active research area: IP QoS Is packet switching a “slam dunk winner?” Packet switching versus circuit switching

  23. Packet-switched networks Circuit-switched networks FDM TDM Datagram Networks Networks with VCs Network Taxonomy Telecommunication networks

  24. This course is about packet-switched networks We will not cover circuit-switched networks In looking at packet-switched networks, our approach will be from the view of network designer, a system engineer, who wants to build a packet switched network from the ground up How do you build a packet switched network? What are the issues? How do you solve them? What are the specific solutions in existence today? We will mostly look at Internet Protocols Packet Switched Networks

  25. The simplest packet switched network is a network consisting of 2 hosts, A and B, and a link connecting them Link can be guided media, i.e., a copper, coax, fiber wire Link can be unguided media, i.e., the air – wireless Link can be half-duplex (only one node can send data over the link at any time) or full-duplex (A can send a message to B, while B is sending a message to A) Problem: Given a message M at A, divide the message into several packets, and send them over the link to B Point-to-Point Links B A Simple point-to-point link Message M

  26. What are the issues in a point-to-point link? How does B know the beginning and end of a packet? Called the framing problem How does B know whether the packet is corrupted, i.e., if any bits of the message has changed, during transmission or not? If any bits changed, can B correct them? Called the error detection & correction problem How do you encode a digital data on the link? Called the data encoding problem Point-to-Point Links B A Simple point-to-point link Message M

  27. The next-simple packet switched network you can imagine is a network consisting of several hosts, A, B, C and D above, sharing a common link Again, the link can be wired or wireless In such a network, when one node sends a packet over the link, the packet reaches ALL nodes attached to the link Such a link is called a broadcast link, e.g., Ethernet, FDDI Broadcast (Multi-Access) Links B A Message M D C

  28. What are the issues in a broadcast link? All the issues of a point-to-point exists: framing, error detection & correction and encoding. What else? First issue is, how do the stations agree on who gets to use the link? Called the media access control problem Second, how does A tell that the packet is destined to B not to C or D? Addressing problem: Each station must have a UNIQUE address, called the Media Access Control (MAC) address Broadcast (Multi-Access) Links B A Message M D C

  29. What’s the limit of a broadcast link? How many hosts (stations) can we connect to a broadcast link? Can we build a global network such as the Internet with a broadcast link? Can you imagine connecting millions of hosts to a broadcast link? If we do, does it make sense that when a host in Germany wants to send a packet to another host next door, that my host in here receive that packet, examine it, realize that the packet is destined to someone else and discard it? Broadcast does not scale. So there is a limit on the size of a broadcast link. Limit on Broadcast Links B A Message M D C

  30. To build a global packet-switched network such as the Internet, we must have a “network core” consisting of lots of packet switches, called routers The end systems (hosts, stations) are at the edge of the network End system hosts can be attached to the network core with a point-to-point link or they can be attached together with a broadcast link and then attached to the network core A E R5 R2 R10 R3 F B R6 G R4 R1 R7 C R8 H D I A Broadcast Link A Point-to-Point Link Network Core A General Packet-Switched Network

  31. What are the issues in such a packet-switched network? Addressing: Each host and router interface must have GLOBALLY UNIQUE addresses – IP address When host A wants to send a packet to host F on the other side of the network, how does A and routers know how to reach F? Routing and forwarding problem: Establishing reach-ability information (forwarding table) and using it to forward a packet from the source to the destination host A E R5 R2 R10 R3 F B R6 G R4 R1 R7 C R8 H D I A Broadcast Link A Point-to-Point Link Network Core A General Packet-Switched Network

  32. Mesh of interconnected autonomous systems A General View of the Internet Connection to national ISP router workstation local ISP server mobile regional ISP a company network a university network

  33. It is the applications that communicate! Host A runs a Web Browser and an FTP Client Web Browser is talking to the Web Server running C FTP Client is talking to the FTP Server running in D Packets from both C and D arrive at A What about applications? Web Server C R5 FTP Client Web Browser R2 R10 R3 R6 A D R9 R4 R1 FTP Server R7 B R8

  34. What are the issues here? How does host A know that “green packets” need to delivered to the Web Browser and Blue Packets need to be delivered to the FTP client? Multiplexing/Demultiplexing problem What if some of the packets sent from the Web Server is lost during transmission. How do we recover them? Reliable packet delivery problem What about applications? Web Server C R5 Web Browser FTP Client R2 R10 R3 R6 A D R9 R4 R1 FTP Server R7 B R8

  35. For two entities to communicate, they must “speak the same language” What is communicated? Message format How is it communicated and what it means? Order of messages and their meaning When is it communicated? Timing of the messages The above must conform to mutually acceptable conventions between the entities involved In networking, these conventions are referred to as a “protocol” How do two network entities talk to each other: PROTOCOLS

  36. A protocol is a set of rules governing the exchange of data between the two entities Key elements of a protocol are Syntax: Message format Semantics: The meaning of messages order of messages sent and received actions taken on message transmission, receipt Timing: Includes speed matching and sequencing When to send a message Protocols

  37. a human protocol and a computer network protocol: TCP connection response Get http://www.awl.com/kurose-ross Got the time? 2:00 <file> time More on Protocols Hi TCP connection req Hi • What are some other human protocols? • Raise you hand before asking questions • Take turns to speak, i.e., do not speak at the same time

  38. Recall the issues in communication over a P-2-P link Message fragmentation: Dividing a message into packets at A Framing: Identifying the beginning and end of a packet at B Error Detection & Correction: Identifying corrupt packets at B Encoding: Encoding packet bits onto the link as a signal at A and reconstructing the packet bits from the received signals at B What kind of protocols do we need to handle the above issues? Next Designing Protocols B A Message M

  39. Typically the listed issues are handled by 2 protocols A Physical Layer (PL), which deals with bit Encoding/Decoding Physical Layer at A deals with the following problem: Given a sequence of bits (bits making up a packet), how do you encode the bits onto the link as signals (electromagnetic, light..) Physical Layer at B deals with the following problem: As you receive signals from the link, how do you decode these signals into bits? A Link Layer (LL) that sits on top of the physical layer (PL) and deals with the rest of the problems: Message Fragmentation, Framing, Error Detection/Recovery Physical and Link Layers Message M A B link physical link physical

  40. What about a broadcast link? PL and LL will be there as before having the same responsibilities as described before But now LL has the additional responsibility of Media Access Control (MAC) to deal with Link Layer: data transfer between neighboring network elements PPP, Ethernet Physical Layer: bits “on the wire” link physical C Message M A B link physical link physical Physical and Link Layers

  41. What about a general packet-switched network? Are PL and LL enough? Recall that LL is responsible for data transfer between neighboring network elements, that is, if they are connected to the same link Are hosts A and B neighbors above? No. Need a new layer, called the “Network Layer” Responsible for forwarding of datagrams from source HOST A to destination HOST B Internet Protocol (IP, routing protocols) Network Link Physical Network Link Physical Network Link Physical Network Link Physical Network Layer link physical link physical link physical link physical R1 B R2 A

  42. What about applications running in hosts? Is NL enough? Recall that NL is responsible for forwarding a packet from one HOST to another HOST How do you make applications on HOSTs to communicate? Need a new layer, called the “Transport Layer” Responsible for providing communication between applications running in different hosts A Web Browser talking to a Web Server Network Link Physical Network Link Physical Network Link Physical Network Link Physical Network Link Physical Transport Network Link Physical Transport Network Link Physical Transport Network Link Physical Transport Layer Web Browser Web Server FTP Client B FTP Server A R1 R2 C

  43. Web Browser Web Server FTP Client Lots of different applications in the Internet Web browsing, file download, e-mail, instant messages, presence… Each require different message types, formats, actions So need a new layer, called the “Application Layer” Responsible for defining application specific message types, formats, actions taken on messages HTTP for Web, FTP for file download, SMTP for e-mail, SIP for instant messaging and presence… so many others!! Network Link Physical Network Link Physical Application Transport Network Link Physical Application Transport Network Link Physical Application Transport Network Link Physical Transport Network Link Physical Transport Network Link Physical Transport Network Link Physical Application Layer B FTP Server A R1 R2 C

  44. application: Define application specific message types, formats FTP, SMTP, STTP transport: Provide application-to-application communication TCP, UDP network: Provide host-to-host communication. That is, forwarding of packets from source to destination IP, routing protocols link: Provide data transfer between neighboring network elements (host-to-host, host-to-router, router-to-router) PPP, Ethernet physical: transmit bits “on the link” application transport network link physical Internet protocol stack

  45. M M H H H H H H H H H H H H t t t t l n l t n n t n M M M M application transport network link physical application transport network link physical M M Protocol layering and data • At the source, each layer takes data from above • adds header information to create new data unit • Called “encapsulation” • passes new data unit to layer below • At the destination, each layer takes data from below • strips off its own header • Called “decapsulation” • passes the remaining part of the packet to the upper layer source destination message segment datagram frame

  46. Multiplexing/Demultiplexing • A way for multiple protocol objects at one level to identify themselves to the protocol above or below them. • Multiplex • Tag each message with a key • Lower protocol knows where it came from! • Demux • Use key on arriving packet to know where to send it above MUX 1 2 3 data 1 data 3 DEMUX 1 2 3 data 1 data 3 data 1 data 3

  47. Each protocol defines 2 interfaces Service Interface: The kind of services it provides to protocols that sit on top of it on the same machine Peer Interface: Communication interface with its counterpart (peer) on another machine This interface defines the form and meaning of messages exchanged between protocol peers to implement the service interface Host1 Host2 Service Upper-layer Upper-layer interface protocol protocol Protocol Protocol Peer-to-peer interface Protocol Interfaces • Example:IP exports a connectionless, unreliable, best-effort datagram service to transport layer protocols

  48. A protocol always communicates with same protocol at peer machine. Never do we have a protocol at one layer talk to another protocol at a different layer at the peer Link Layer Link Layer Protocol Communication

  49. FTP HTTP NV RTP UDP TCP IP … NET NET NET 2 1 n Internet Protocols • Defined by Internet Engineering Task Force (IETF) • Hourglass Design: Everything goes over IP • Lots of application layer protocols • Mainly 2 transport layer protocols: TCP, UDP • Network Protocol is Internet Protocol (IP) • Any Link Layer Protocol 80 4444 20,21 6 17

  50. Open Systems Interconnection Developed by the International Organization for Standardization (ISO) Seven layers A theoretical system delivered too late! TCP/IP is the de facto standard OSI v TCP/IP

More Related