* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download No Slide Title - comp
Distributed firewall wikipedia , lookup
TCP congestion control wikipedia , lookup
Asynchronous Transfer Mode wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Network tap wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Computer network wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Deep packet inspection wikipedia , lookup
List of wireless community networks by region wikipedia , lookup
Airborne Networking wikipedia , lookup
Quality of service wikipedia , lookup
UniPro protocol stack wikipedia , lookup
Internet protocol suite wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Chapter 1: Foundation Dr. Rocky K. C. Chang 30 January 2004 1 1. What is a computer network? • Many networks: – – – – – – Telephone networks Satellite networks Mobile telephone networks Cable TV networks Internet, intranets, and extranets Virtual private network • Data networks vs. telecommunications networks • Convergence of services 2 2. Classifications of computer networks • According to the network size: – Interconnection networks: connecting multiple processors – System/Storage area networks (SAN): connecting processors to storage servers – Local area networks (LAN): connecting a limited number of hosts in a close proximity – Metropolitan area networks (MAN): connecting a limited number of LANs in a close proximity – Wide area networks (WAN): connecting hosts situated anywhere 3 2. Classifications of computer networks • According to mobility: – Fixed networks – Wireless networks – Mobile networks • According to the network speed: – Dial-up networks (kbps) – High-speed networks (Mbps) – Gigabit networks (Gbps) 4 2. Classifications of computer networks • According to the “networking software”: – – – – – – – Novell NetWare (IPX) IBM’s SNA Xerox’s XNS DEC’s DECnet Apple’s AppleTalk Microsoft’s NetBIOS and NetBEUI TCP/IP 5 3. Four basic requirements • • • • • Connectivity Cost-effective resource sharing Support for common services Performance Other considerations, e.g., – Security – Accounting for resources – Economical factors 6 3.1 Connectivity • Connectivity includes directly and indirectly connected nodes. – Directly connected (a) (b) … 7 3.1 Connectivity – Indirectly connected • switched networks: packet switching vs. circuit switching • internetworks 8 3.1 Connectivity • Network connection components: – Cables: UTP, 10baseT/2/5, coaxial cables, fibers, free space, etc. – Modems – Network interface cards (NIC) – Hubs (repeaters, layer one) – Switches/bridges (layer two) – Routers (layer three) – Layer-4 switches 9 3.2 Cost-effective resource sharing • Multiplexing: a process of sharing a system resource among multiple users. L1 R1 L2 R2 L3 Switch 1 Switch 2 R3 10 3.2 Cost-effective resource sharing • Multiplexing approaches: – Synchronous time-division multiplexing (STDM) – Frequency-division multiplexing (FDM) – Statistical multiplexing • On demand, rather than basing on a fixed time schedule or a fixed frequency assignment. • Packet switching, rather than message switching, and the packet size is limited to avoid monopoly. • Need other mechanisms for packet transmission. – Packet scheduling – Medium access mechanisms 11 3.3 Support for common services • From an application’s point of view, the underlying network provides a logical channel between two application processes. Host Host Application Host Channel Application Host Host 12 3.3 Support for common services • Application requirements vary: – A data file transfer through the FTP – A webpage transfer through HTTP – A video streaming through RTP • Requirements: – Total reliability – Timing constraints: delay and delay jitter • Results for the Internet protocol: – Provide a best-effort service at IP (connectivity). – Provide a reliable service on top of IP. 13 3.4 Performance • Network performance measured in two ways: – Throughput (in bits per second) – Latency (or delay, in time units) • Bandwidth and throughput – Bandwidth of a channel in terms of Hz – Bandwidth of a channel in terms of bits/second – Throughput of a channel, in terms of bits/second, is the maximum data rate realized. 14 3.4 Performance (a) 1 second (b) 1 second 15 3.4 Performance • Latency measures the time it takes a message/packet to travel from a source to a destination. – Round-trip time (RTT) • Latency is a sum of – queueing delays: waiting time for its turn of transmission – transmission delays, and – propagation delay: time for propagating a packet from a source to a destination 16 3.4 Performance • For example, transfer a 1-MB file in a network of 10Mbps with 5000m apart. – – – – Ignoring queueing and node processing delays Transmission delay: (1x220x8)/10x106 = 0.839s Propagation delay: 5000/2x108 = 0.025ms Latency = 0.839s. • Now change 10Mbps to 10 Gps: – Transmission delay: (1x220x8)/10x109 = 0.839ms – Latency = 0.864ms 17 3.4 Performance • Combine data size, bandwidth, and propagation delay: 10,000 5000 2000 Perceived latency (ms) 1000 500 1-MB object, 1.5-Mbps link 1-MB object, 10-Mbps link 2-KB object, 1.5-Mbps link 2-KB object, 10-Mbps link 200 100 50 1-byte object, 1.5-Mbps link 1-byte object, 10-Mbps link 20 10 5 2 1 10 RTT (ms) 100 18 3.4 Performance • Delay-bandwidth product: gives the volume of the pipe--the maximum number of bits it holds. • For example, a transcontinental channel with one way latency of 50 ms and a bandwidth of 45 Mbps, the product is 2.25x106 bits (280 KB). Delay Bandw idth • Short fat pipe, long fat pipe, long thin pipe 19 4. Network architecture • Layered architecture – Layering decomposes the problem of building a network into more management components. – Layering provides a more modular design. Application programs Process-to-process channels Host-to-host connectivity Hardware 20 4. Network architecture – Each layer provides a service to the upper layer. – Often, there are multiple services provided by a layer. Application programs Reliable channel Unreliable channel Host-to-host connectivity Hardware 21 4.1 Internet architecture • A four-layer architecture (a protocol graph) Application Transport FTP HTTP TFTP UDP TCP Network Data-link NV IP NET1 NET2 … NETn 22 4.1 Internet architecture • Layers: – Data-link layer provides framing and address resolution services. – Network layer provides connectivity service. – Transport layer provides reliability or unreliable service, and flow control service. – Application layer provides application-specific services. 23 4.2 Protocols • The service provided by each layer is implemented by protocols at that layer. – A protocol is a series of steps, involving two or more parties, designed to accomplish a task. – A protocol for batch textbook purchase • Each protocol defines two interfaces: – Service interface defines the operations that local objects can perform on the protocol. – Peer interface defines the form and meaning of messages exchanged between protocol peers to implement the communication service. 24 4.2 Protocols Students Rocky ts studen y r e u (2) Q (3) Stu d ents re s for ba pond t chase tch pur Bookshop (1) Ma k e an in quiry a nd a textboo sk to reserv e 30 ks o the q uery (4) Co nfirm o r der an d make p aymen t o ks textbo r e v i l (5) De s ooks to b t x e t liver (6) De s tudent 25 • • • • • • 4.2 Protocols Involve three parties (students, Rocky, and the Bookshop). Involve a series of steps, which must be executed in a pre-determined order (steps 1-6). Accomplish a task (purchasing textbooks) Every party involved in a protocol must know the protocol and must follow all steps. The protocol must be unambiguous and each step is well defined. The protocol must be complete. 26 4.2 Protocols Batch textbook purchase Batch textbook purchase "Email datalink" "Email data-link" Email "Physical contact datalink" Batch textbook purchase "Physical contact data-link" Physical contact 27 4.2 Protocols • FTP/TCP/IP/Ethernet and FDDI protocols H1 H2 FTP protocol FTP FTP TCP TCP TCP IP IP ETH ETH R1 FDDI IP FDDI protocol IP FDDI R2 IP ETH ETH 28 4.3 Protocols at different layers • Encapsulation – A header is attached to a message passed down from the upper layer. – The message to be encapsulated is called payload or protocol data unit (PDU). – A low-level protocol does not interpret the message it is given by some high-level protocol. 29 4.3 Protocols at different layers • FTP/TCP/IP/Ethernet user input FTP Appl. data TCP TCP hdr Appl. data IP hdr TCP hdr Appl. data IP hdr TCP hdr Appl. data IP ETH Eth. hdr Send out to the network interface 30 4.3 Protocols at different layers • Demultiplexing: A reverse process of encapsulation Other TCP-based application processes Appl. data UDP-based applications Other nonIP network protocols Eth. hdr IP hdr IP hdr TCP hdr Appl. data TCP hdr Appl. data TCP hdr Received from the network interface Appl. data 31 4.4 The 7-layer OSI architecture • The Open Systems Interconnection architecture serves as a reference model. • Except for DECnet, the OSI was not implemented as a working product, because – The upper three layers were not generally agreed upon. – A very complex protocol architecture; a large number of layers implies inefficiency. – Significant implementation effort – TCP/IP was readily available then. 32 4.4 The 7-layer OSI architecture End host End host 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 33 5. Network programming • Two most common network APIs: Sockets and X/Open Transport Interface (XTI), a slight modification of AT&T’s Transport Layer Interface (TLI). • The APIs allows programmers to easily make “connections” with another application process, without knowing how the underlying network operates. 34 5.1 Basic socket calls for a client obtain a socket socket sockaddr_in{} establish a connection to the peer connect receive and send data recv send peer 35 5.2 Basic socket calls for a server obtain a socket socket sockaddr_in{} bind the server’s IP address and port to the socket bind mark the socket as a listening socket listen local sockaddr_in{} accept new connections receive and send data accept peer recv send 36 6. Organization of the textbook • Host-to-host communications – Chapter 2: On a directly connected network (a single LAN segment, data-link layer) – Chapter 3: On multiple non-directly connected networks of the same type (multiple LAN segments, data-link layer) – Chapter 4: On multiple non-directly connected networks of different types (global Internet, network layer) • Process-to-process communications – Chapter 5: Transport layer 37 6. Organization of the textbook • Other issues: – – – – Chapter 6 (network congestion) Chapter 7 (presentation formatting) Chapter 8 (security) Chapter 9 (application protocols) 38