* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download PDF (Updated 1/18)
Backpressure routing wikipedia , lookup
Distributed operating system wikipedia , lookup
Multiprotocol Label Switching wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
IEEE 802.1aq wikipedia , lookup
Distributed firewall wikipedia , lookup
Asynchronous Transfer Mode wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Network tap wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Computer network wikipedia , lookup
TCP congestion control wikipedia , lookup
Deep packet inspection wikipedia , lookup
List of wireless community networks by region wikipedia , lookup
Airborne Networking wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Internet protocol suite wikipedia , lookup
Packet switching wikipedia , lookup
UniPro protocol stack wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Module 2 – Overview of Computer Networks Networks and Communication Give me names of all employees Who earn more than $100,000 intranet ISP % % % % backbone satellite link desktop computer: server: network link: CS454/654 2-2 Internet Connectivity Figure from Wikipedia CS454/654 2-3 Issues How do the request and response get transmitted between the requestor and the server? Protocols to facilitate communication Moving the request and reply messages through the network CS454/654 2-4 What is a protocol? A protocol defines the format and the order of messages sent and received among network entities, and the actions taken on message transmission and receipt Human protocols: “What’s the time?” “I have a question” introductions Network protocols: machines rather than humans all communication activity in Internet governed by protocols CS454/654 Human protocol Computer protocol Hi TCP connection req. Hi TCP connection reply. Got the time? 2:00 Gethttp://www.cs.uwaterloo.ca/ <index.html> time 2-5 Layered Architecture Can describe an airline system sequentially Lacks structure Any changes to one component requires re-describing the whole procedure We can instead recognize that there complementary functions at each end Can divide the airline functionality into layers Allows us to discuss a well-defined, specific part of a large and complex system. Example taken from Computer Networks A Top-Down Approach CS454/654 2-6 Layered Protocols Divide functionality to different layers and let each layer provide one function. ISO OSI Layered network architecture (International Organization for Standardization, Open Systems Interconnections) Function layers Interfaces Protocols at each layer CS454/654 From Tanenbaum and van Steen, Distributed Systems: Principles and Paradigms © Prentice-Hall, Inc. 2002 2-7 OSI Protocol Summary Layer Application Presentation Session Transport Network Data link Physical CS454/654 Description Protocols that are designed to meet the communication requirements of specific applications, often defining the interface to a service. Protocols at this level transmit data in a network representation that is independent of the representations used in individual computers, which may differ. Encryption is also performed in this layer, if required. At this level reliability and adaptation are performed, such as detection of failures and automatic recovery. This is the lowest level at which messages (rather than packets) are handled. Messages are addressed to communication ports attached to processes, Protocols in this layer may be connection-oriented or connectionless. Transfers data packets between computers in a specific network. In a WAN or an internetwork this involves the generation of a route passing through routers. In a single LAN no routing is required. Responsible for transmission of packets between nodes that are directly connected by a physical link. In a WAN transmission is between pairs of routers or between routers and hosts. In a LAN it is between any pair of hosts. The circuits and hardware that drive the network. It transmits sequences of binary data by analogue signalling, using amplitude or frequency modulation of electrical signals (on cable circuits), light signals (on fibre optic circuits) or other electromagnetic signals (on radio and microwave circuits). From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. © Addison-Wesley Publishers 2000 Examples HTTP, FTP , SMTP, CORBA IIOP Secure Sockets (SSL),CORBA Data Rep. TCP, UDP IP, ATM virtual circuits Ethernet MAC, ATM cell transfer, PPP Ethernet base- band signalling, ISDN 2-8 Message Format CS454/654 From Tanenbaum and van Steen, Distributed Systems: Principles and Paradigms © Prentice-Hall, Inc. 2002 2-9 Message Transmission (Assume only 3 layers) CS454/654 2-10 Internet Protocols FTP Telnet NFS SMTP HTTP … Application (7) Transport (4) TCP UDP Network (3) Data Link (2) Physical (1) CS454/654 IP X.25 Ethernet Packet Radio ATM FDDI … 2-11 TCP/IP Layers Message Layers Application Messages (UDP) or Streams (TCP) Transport UDP or TCP packets Internet IP datagrams Network interface Network-specific frames Underlying network CS454/654 From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. © Addison-Wesley Publishers 2000 2-12 Internet Protocol Stack Application: supporting network applications Transport: host-host data transfer ip, routing protocols Link: data transfer between neighboring network elements tcp, udp Network: routing of datagrams from source to destination ftp, smtp, http application message transport segment network datagram link frame physical ppp, ethernet Physical: bits “on the wire” CS454/654 2-13 Applications and ApplicationLayer Protocols application transport network Application: communicating, distributed processes data link physical running in network hosts in “user space” exchange messages to implement app e.g., email, file transfer, the Web Application-layer protocols one “piece” of an app define messages exchanged by apps and actions taken use services provided by lower layer protocols application application transport transport network network data link data link physical physical router CS454/654 server workstation mobile 2-14 Application-Layer Protocols (cont). API: application programming interface Defines interface between application and transport layer socket: Internet API two processes communicate by sending data into socket, reading data out of socket What transport services does an application need? Data loss some apps (e.g., audio) can tolerate some loss other apps (e.g., file transfer, telnet) require 100% reliable data transfer Bandwidth some apps (e.g., multimedia) require a minimum amount of bandwidth to be “effective” other apps (“elastic apps”) make use of whatever bandwidth they get Timing some apps (e.g., Internet telephony, interactive games) require low delay to be “effective” CS454/654 2-15 Transport Service Requirements of Common Applications Data loss Bandwidth Time Sensitive file transfer e-mail Web documents real-time audio/video no loss no loss no loss loss-tolerant no no no yes, 100’s msec stored audio/video interactive games financial apps loss-tolerant loss-tolerant no loss elastic elastic elastic audio: 5Kb-1Mb video:10Kb-5Mb same as above few Kbps up elastic Application CS454/654 yes, few secs yes, 100’s msec yes and no 2-16 Internet Transport Protocol Services TCP service: connection-oriented: setup required between client, server reliable transport between sending and receiving process Receipt of packets returned as acknowledgements flow control: sender won’t overwhelm receiver congestion control: throttle sender when network overloaded does not provide: timing, minimum bandwidth guarantees CS454/654 UDP service: unreliable data transfer between sending and receiving process does not provide: connection setup, reliability, flow control, congestion control, timing, or bandwidth guarantee 2-17 Flow Control Both flow control and congestion control affect the sending rate Flow control aims to eliminate the possibility of overflowing the receiver’s buffer. Receiver keeps track of two variables: LastByteReceived and LastByteRead LastByteReceived – LastByteRead <= ReceiveBufferSize Notifies the sender of its receive window size (rwnd) Sender keeps track of two variables LastByteSent and LastByteAcked Delays sending of packets to ensure that CS454/654 LastByteSent – LastByteAcked <= rwnd 2-18 Congestion Control Traffic from multiple paths that share the same routers/links can overwhelm capacity within the network. In TCP, senders limit the rate at which it sends traffic as a function of the perceived network congestion. If there is little to no perceived congestion If there is congestion Additive increase in sending rate Multiplicative decrease in sending rate Congestion is detected via: Lost packets CS454/654 2-19 Internet Apps: Their Protocols and Transport Protocols Application e-mail remote terminal access Web file transfer streaming multimedia remote file server Internet telephony CS454/654 Application layer protocol Underlying transport protocol smtp [RFC 821] telnet [RFC 854] http [RFC 2068] ftp [RFC 959] proprietary (e.g. RealNetworks) NFS proprietary (e.g., Vocaltec) TCP TCP TCP TCP TCP or UDP TCP or UDP typically UDP 2-20 TCP Message Encapsulation over an Ethernet Application message TCP header port IP header TCP Ethernet header IP Ethernet frame CS454/654 From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. © Addison-Wesley Publishers 2000 2-21 The programmer's conceptual view of a TCP/IP Internet Application Application TCP UDP IP CS454/654 From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. © Addison-Wesley Publishers 2000 2-22 Internet Address Structure 7 Class A: Class B: 0 24 Network ID 1 0 Host ID 14 16 Network ID Host ID 21 Class C: 1 1 0 8 Network ID Host ID 28 Class D (multicast): 1 1 1 0 Multicast address 28 Class E (reserved): CS454/654 1 1 1 1 unused From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. © Addison-Wesley Publishers 2000 2-23 Decimal Representation of Internet Addresses octet 1 octet 2 Network ID Class A: 1 to 127 octet 3 Host ID 0 to 255 0 to 255 1.0.0.0 to 127.255.255.255 0 to 255 0 to 255 128.0.0.0 to 191.255.255.255 0 to 255 Host ID 1 to 254 0 to 255 Network ID Class B: Class C: Range of addresses Host ID 128 to 191 0 to 255 192 to 223 Network ID 0 to 255 192.0.0.0 to 223.255.255.255 Multicast address Class D (multicast): 224 to 239 0 to 255 0 to 255 1 to 254 224.0.0.0 to 239.255.255.255 Class E (reserved): 240 to 255 0 to 255 0 to 255 1 to 254 240.0.0.0 to 255.255.255.255 CS454/654 From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. © Addison-Wesley Publishers 2000 2-24 Classless Interdomain Routing (CIDR) Breaking the IP address space into fixed size classes is space inefficient CIDR generalizes the notion of subnet addressing 32-bit address is divided into two parts a.b.c.d/x, where x indicates the number of bits in the first part of the address The x most significant bits signify the network portion (prefix) The remaining bits are for identifying individual hosts IP addresses are managed by ICANN (Internet Corporation for Assigned Names and Numbers) CIDR creates more subnets Each subnet needs to be advertised for routing We will see later that this increases the routing table size CS454/654 2-25 IP Packet Layout header IP address of source IP address of destination data up to 64 kilobytes CS454/654 From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. © Addison-Wesley Publishers 2000 2-26 How to Transfer Data Through the Network Network is a mesh of interconnected routers Two ways of setting up a connection between two computers circuit switching: dedicated circuit per call: telephone net packet-switching: data sent thru net in discrete “chunks” CS454/654 2-27 Circuit Switching End-end resources reserved for “call” link bandwidth, switch capacity dedicated resources: no sharing circuit-like (guaranteed) performance call setup required CS454/654 2-28 Circuit Switching Network resources (e.g., bandwidth) divided into “pieces” pieces allocated to calls resource piece idle if not used by owning call (no sharing) dividing link bandwidth into “pieces” frequency division time CS454/654 division 2-29 Packet Switching Each end-end data stream divided into packets Resource contention: User A, B packets share network resources Each packet uses full link bandwidth Resources used as needed Aggregate resource demand can exceed amount available Congestion: packets queue, wait for link use Store and forward: packets move one hop at a time Transmit over link Wait turn at next link CS454/654 2-30 Packet Switching 10 Mbs Ethernet A B statistical multiplexing 1.5 Mbs queue of packets waiting for output link D CS454/654 C 45 Mbs E 2-31 Message Switching Message switching = Packet-switching without segmentation Packet switching: Store and Forward Message remains intact as it traverses the network Message 0 5 Message 10 Message Message 15 Time (sec.) CS454/654 2-32 Packet Switching vs Circuit Switching Packet switching allows more users to use network! 1 Mbit link; each user: 100Kbps when “active” active 10% of time N users circuit-switching: 1 Mbps link 10 users packet switching: CS454/654 35 users, probability > 10 active less than .004 2-33 Packet Switching vs Circuit Switching (2) Packet switching is great for bursty data resource sharing no call setup It incurs excessive congestion: packet delay and loss protocols needed for reliable data transfer, congestion control How to provide circuit-like behavior? bandwidth guarantees needed for audio/video apps still an unsolved problem, but solutions such as ATM have been developed CS454/654 2-34 Delays in Packet Switching Packets experience delay on end-toend path Sources of delay at each hop: Nodal processing check bit errors determine output link Queuing time waiting at output link for transmission; depends on congestion level of router Transmission delay R=link bandwidth (bps), L=packet length (bits) time to send bits into link = L/R A B transmission propagation nodal processing queueing Propagation delay d = length of physical link, s = propagation speed in medium (~2x108 m/sec) propagation delay = d/s CS454/654 2-35 Routing Goal: move packets among routers from source to destination It is an issue in packet switched networks datagram network: destination address determines next hop routes may change during session analogy: driving, asking directions virtual circuit network: each packet carries tag (virtual circuit ID), tag determines next hop fixed path determined at call setup time, remains fixed thru call routers maintain per-call state CS454/654 2-36 Routing in a Wide Area Network A Hosts or local networks 1 B 2 3 Links 4 C 5 D 6 E Routers CS454/654 From Coulouris, Dollimore and Kindberg, Distributed Systems: Concepts and Design, 3rd ed. © Addison-Wesley Publishers 2000 2-37 Routing Algorithms End hosts are directly attached to a default router Routers are responsible for forwarding packets from the source to the destination How do routers know where to forward the packets? Routers construct routing tables that map destinations to network links Routes should provide “good” properties, such as low latency Abstractly, the routes should minimize a cost metric 5 V 2 U 2 3 W 3 5 1 Z 2 1 CS454/654 X 1 Y 2-38 Routing Algorithms Two main classifications of routing algorithms Global routing algorithm e.g. Link-state (LS) algorithm Connectivity of all nodes and all link costs serve as inputs Decentralized routing algorithms e.g. Distance-vector algorithm No node has complete information about the costs of all network links CS454/654 2-39 Link-State Routing Network topology and all link costs are known Each node broadcasts its link-state information to all other nodes in the network OSPF is an example of a link-state routing algorithm Makes use of Dijkstra’s algorithm for finding least-cost paths from one node to all other nodes in the network Iterative algorithm After k iterations, the least-cost paths are known to k destinations These CS454/654 k paths will have the k smallest costs 2-40 5 Link-State Routing 2 U V 3 2 W 5 Z 1 3 2 1 X 1 Y D(v): cost of the least-cost path from the source node to destination v p(v): previous node along the current least-cost path from the source to v N’: subset of nodes, where v is in N’ if the least-cost path from the source to v is definitively known Step N’ D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z) 0 u 2,u 5,u inf Inf 1 ux 2,u 4,x 2,x Inf 2 uxy 2,u 3,y 4,y 3 uxyv 3,y 4,y 4 uxyvw 5 uxyvwz 1,u 4,y Example taken from Computer Networks A Top-Down Approach CS454/654 2-41 Distance Vector Routing The distance-vector algorithm is iterative, distributed, and asynchronous Based on the Bellman-Ford equation Each node receives some information from one or more directly attached neighbors (distributed) It exchanges information until the results converge (iterative) Messages are exchanged at different times between different nodes (asynchronous) dx(y) = min v{c(x,v) + dv(y)} dx(y) is the cost of the least-cost path from x to y c(x,v) is the cost of the link between x and v, where v is one of x’s neighbors CS454/654 2-42 Distance Vector Routing Each node starts off with some estimate of its distance to every node that it knows of, which might only be a subset of all the nodes in the network. Known as its distance-vector Dx = [Dx(y): y in N] Exchange its distance-vector with its neighbors Update its own distance vector Dx(y) = min v{c(x,v) + Dv(y)} for each node y in N CS454/654 2-43 Y Distance Vector Routing X 2 Node z table Node y table Node x table 7 x y z x y z x 0 2 3 x 0 2 3 Inf y 2 0 1 y 2 0 1 Inf Inf z 7 1 0 z 3 1 0 X y z x y z x y z x Inf Inf Inf x 0 2 7 x 0 2 3 y 2 0 1 y 2 0 1 y 2 0 1 z Inf Inf Inf z 7 1 0 z 3 1 0 x y z x y z x y z x Inf Inf Inf x 0 2 7 x 0 2 3 y Inf Inf Inf y 2 0 1 y 2 0 1 z 7 1 0 z 3 1 0 z 3 1 0 x Y Z x 0 2 7 y Inf Inf z Inf CS454/654 Example taken from Computer Networks A Top-Down Approach 1 Z 2-44 Network Taxonomy telecommunication networks Circuit-switched networks FDM Packet-switched networks TDM Networks with VCs connectionoriented CS454/654 Datagram Networks connection-oriented & connectionless 2-46