* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download CS412 Computer Networks - Computer Science | Winona State
IEEE 802.1aq wikipedia , lookup
Wireless security wikipedia , lookup
Asynchronous Transfer Mode wikipedia , lookup
Distributed firewall wikipedia , lookup
Network tap wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Wake-on-LAN wikipedia , lookup
List of wireless community networks by region wikipedia , lookup
Airborne Networking wikipedia , lookup
Computer network wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Deep packet inspection wikipedia , lookup
Communication protocol wikipedia , lookup
Internet protocol suite wikipedia , lookup
UniPro protocol stack wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
CS412 Introduction to Computer Networking & Telecommunication Introduction Chi-Cheng Lin, Winona State University Topics Introduction Metric Units Network Hardware Network Software Reference Models Example Networks Standards and Standards Organizations 2 Introduction First two decades of computing Highly centralized computer systems Now A large number of SEPARATE but INTERCONNECTED computers => Computer networks 3 What is Computer Network? An INTERCONNECTED collection of AUTONOMOUS computers Interconnected: Able to EXCHANGE INFORMATION via transmission media Media: copper wire, fiber optics, microwaves, communication satellites Autonomous: no master/slave relation NOT autonomous: One computer can control another one e.g., a large computer with remote printers and terminals 4 What is Telecommunication? What is data communication? Exchange of data between two devices via some form of transmission media Data are represented by bits – 0s and 1s What is telecommunication? Exchange of information over distance using electronic equipment 5 What is Telecommunication? Components of data communication Sender, receiver, medium, message, and Protocol: set of rules governing data communication Key elements of a protocol Syntax Structure/format Semantics Meaning Timing When and how fast 6 Figure 1.1 McGraw-Hill Five components of data communication 7 ©The McGraw-Hill Companies, Inc., 2004 Why Studying CS412? The instructor looks nice … (Don’t bet on it!) It is part of our daily life now The job market is good … (?) You want to understand concepts and technologies of networking and telecom Theory and practice It is one of the most drastically changing field in CS and you like challenges It makes you knowledgeable in this field It is FUN!! 8 Distributed System vs. Computer Network Distributed system TRANSPARENCY A collection of independent computers appear as a single coherent system Single model/paradigm to users Middleware on top of OS Example? Computer network No such coherence, model, middleware Machines visible to users Users log onto remote machines 9 Distributed System vs. Computer Network A distributed system is a SOFTWARE system built on top of a network Distinction between network and distributed system Software (especially OS) rather than hardware However, considerable overlap between the two subjects 10 Uses of Computer Networks Business applications Resource sharing Communication medium E-commerce Client-server model Client requests, server performs & then replies E.g., one or more file servers, many clients 11 Business Applications of Networks A network with two clients and one server. 12 Client-Server Model 1 2 3 13 Uses of Computer Networks Home applications Access to remote information On-line publishing, digital library, WWW Person-to-person communication Email, instant messaging, peer-to-peer communication, videoconferencing, Internet phone, E-learning Interactive entertainment Video on demand (VOD), games E-commerce Home shopping, electronic banking and investment, on-line auction 14 Home Network Applications (2) In peer-to-peer system there are no fixed clients and servers. 15 Mobile Users Notebook, PDA, cellular phone M-commerce Wireless networking and mobile computing 16 Metric Units The principal metric prefixes. 17 Network Hardware By transmission technology Broadcast links smaller, geographically localized networks Point-to-point links larger networks By scale PAN LAN MAN WAN 18 Classification by Scale 19 Broadcast Network A single communication channel shared by all machines on the network Packets (short messages) sent by any machine are “received” by all the others Address field of packet: whom it is intended Message transmission Unicast: one sends, one receives Broadcasting: one sends, all receive Multicasting: one sends, a group receives 20 Point-to-Point Networks Many connections between pairs of machines Intermediate machines (called routers) might have to be visited by a packet from source to destination – more than one path is possible Routing algorithms are important Routing: process of finding a path from a source to the destination(s) in the network 21 Local Area Network (LAN) Private-owned Networks Within a single building/campus Size: up to a few kilometers Characteristics Size Restricted by size worst-case transmission time bounded and known in advance network management simplified 22 LAN Characteristics Transmission technology Machines attached to a single cable Speed/capacity (High): 10 - 100 Mbps, Gbps Mbps/Gbps: Megabit/Gigabit per second 1 megabit=1,000,000 (not 220=1,048,576) bits Delay (low): microseconds, nanoseconds Errors: very few 23 LAN Characteristics Topology – the way in which a network is laid out Examples: Bus, Ring Bus Ring 24 Figure 1.7 McGraw-Hill Categories of topology 25 ©The McGraw-Hill Companies, Inc., 2004 Figure 1.8 McGraw-Hill Fully connected mesh topology (for five devices) 26 ©The McGraw-Hill Companies, Inc., 2004 Figure 1.9 McGraw-Hill Star topology 27 ©The McGraw-Hill Companies, Inc., 2004 Figure 1.10 McGraw-Hill Bus topology 28 ©The McGraw-Hill Companies, Inc., 2004 Figure 1.11 Ring topology McGraw-Hill 29 ©The McGraw-Hill Companies, Inc., 2004 LAN - Topology Bus (linear cable) Only one machine can transmit at a time Arbitration mechanism needed to resolve conflicts when two or more computers want to transmit simultaneously Centralized or Distributed Example: IEEE 802.3 (Ethernet): Bus-based broadcast network with decentralized control operating at 10 Mbps to 10Gbps. If two or more packets collide, each computer just waits a random time and tries again later. 30 LAN - Topology Ring Bits propagate around the ring Arbitration mechanism is needed, too Example: IEEE 802.5 (IBM Token Ring) Ring-based LAN operating at 4 and 16 Mbps Arbitration is based on “token” Only token holder can transmit 31 LAN - Channel Allocation Needed as all computers share one communication pathway Static channel allocation Divide up time into discrete intervals Run a round robin algorithm Allow each machine to broadcast only when its time slot comes up Problem: Wasting channel capacity 32 LAN - Channel Allocation Dynamic channel allocation Centralized A central entity determines who goes next Decentralize No central entity Each machine decides for itself to transmit or not Algorithms needed to resolve potential chaos 33 Metropolitan Area Network (MAN) Covers city Examples Cable TV network IEEE 802.16 high-speed wireless Internet access 34 Figure 1.14 McGraw-Hill MAN 35 ©The McGraw-Hill Companies, Inc., 2004 Metropolitan Area Networks A metropolitan area network based on cable TV. 36 Wide Area Network (WAN) Country or continent Components Host (end system) Machine running user (application) programs Communication subnet (subnet) Connecting hosts Carrying messages from host to host 37 Figure 1.15 McGraw-Hill WAN 38 ©The McGraw-Hill Companies, Inc., 2004 WAN - Subnet Components Transmission lines Move bits between machines Switching elements Specialized computers that connect two or more transmission lines Determine out going line for incoming data ROUTER 39 WAN - Hosts and Subnet H1 R1 R2 R3 R5 R4 R6 H2 : Host : Router 40 WAN - Architecture Contains numerous cables or telephone lines Each cable connects a pair of routers Two routers must communicate indirectly if they are not connected by a cable There might be more than one route between two hosts and it might change from time to time E.g., Route from H1 to H2 41 WAN - Architecture An intermediate router in a WAN Receives a packet in its entirety Queues the packet until required output line is free Forwards the packet Subnet using the principle above is called Store-and-forward or packet-switched subnet 42 Wide Area Networks A stream of packets from sender to receiver. 43 Topology – LANs vs WANs Local networks Bus, Ring, Star Tree WANs typically irregular 44 WAN - Broadcast Systems Satellite system Each router has an antenna Sometimes routers are connected to a substantial point-to-point subnet, with some of them having a satellite antenna Inherently broadcast 45 Wireless Network System interconnection Example: Bluetooth Wireless LANs Easy to install IEEE Standard 802.11 Wireless WANs IEEE Standard 802.16 46 Wireless Networks Bluetooth configuration Wireless LAN 47 Wireless Network Combinations of wired and wireless networking (e.g., flying LAN) 48 Home Network Categories Computers Desktop PC, PDA, shared peripherals Entertainment TV, DVD, VCR, camera, stereo, MP3 Telecomm Telephone, cell phone, intercom, fax Appliances Microwave, fridge, clock, furnace, aircon Telemetry Utility meter, burglar alarm, babycam 49 Internetwork What is internetwork? A collection of interconnected networks "Internet" and "internet" internet: internetwork Internet: the worldwide internetwork using TCP/IP protocol suite Problem: Communication between networks with different SW/HW Solution: Gateways Machines connect different, incompatible networks Connection and translation 50 Figure 1.16 McGraw-Hill Internet today 51 ©The McGraw-Hill Companies, Inc., 2004 Network Software Old computer networks: HW main concern SW afterthought Not working now! Network SW is now highly structured Protocol Hierarchies Implemented in hardware or firmware 52 Protocol Hierarchies What is protocol? Agreement between communication parties on HOW communication is processed Layered architecture Reduce design complexity- Lower layer offers service to higher layer Hiding implementation details Layer n on one machine talks to layer n on another Rules and conventions used in layer n’s talk: Layer n protocol 53 Protocol Hierarchies Peers Entities comprising corresponding layers on different machines Virtual communication using protocol Peer process abstraction make network design becomes that of individual layers Physical communication Sender: Data and control passed to layer below Data transmitted via physical media Receiver: Data and control passed to layer above 54 Layers, Protocols, and Interfaces Virtual Communication Physical Communication 55 Protocol Hierarchies Interface between two adjacent layers Defines primitive operations and services a lower layer offers to the upper one Minimizes amount of information passed between two layers Simplifies replacement of implementation E.g., telephone lines satellite channels 56 Protocol Hierarchies Network architecture Set of layers and protocols Implementation and interface specification not included Protocol stack A list of protocols used by a certain system, one protocol per layer 57 Multilayer Communication - Example Philosopher-translator-secretary architecture It is ok if Dutch is replaced by Finnish fax is replaced by email 58 Information Flow - Example Virtual communication for layer 5 Header: control information 00011100011100001110 … Layer 1 protocol 00011100011100001110 … 59 Key Design Issues for the Layers Sender/receiver identification mechanism Transmission direction modes Simplex Data only travel in one direction Half-duplex Data can travel in either direction, but not simultaneously Full-duplex Data can travel in both directions simultaneously Number of logical channels and properties 60 Key Design Issues for the Layers Error control Error-detecting Error-correcting Sequencing Flow control Needed for fast sender, slow receiver Approaches Feedback mechanism Transmission rate agreement 61 Key Design Issues for the Layers Message disassembling, transmitting, reassembling Multiplexing The process of combining signals from multiple sources for transmission across a single data link Multiple connections can share the link Routing Selecting the best path for sending a packet from one point to another 62 Connection-Oriented and Connectionless Services Two basic types of services Connection-oriented Connectionless Consider reliability … Reliable Unreliable Connection-oriented Connectionless Note that: Connection Reliability 63 Connection-Oriented Service A connection is established first, then used, and then released when done. Works like a pipe: Sender pushes data in at one end Receiver takes them out, often in the same order, at the other end Analogy Telephone system 64 Connectionless Service No need to set up a connection first Each message carrying full destination address is routed independently of others No guarantees on the order Analogy Postal system 65 Six Service Types 66 Service Primitives Service is formally specified by a set of primitives (e.g., OS’s system calls) available to users or entities Five service primitives for implementing a simple connection-oriented service. 67 Service Primitives Packets sent in a simple client-server interaction on a connection-oriented network. 68 Relationship of Services to Protocols Service Set of primitives a layer provides to the layer above it Define WHAT operations not HOW implemented Protocol Set of rules governing format and meaning of message exchanged by peer entities within a layer Used by entities to implement service definition 69 Services to Protocols Relationship The relationship between a service and a protocol. 70 Relationship of Services to Protocols Analogy: Object-oriented languages Service :: Object Users do not know the implementation of a service Protocol :: Implementation The protocol of the service is invisible to users Do you have to understand http (hypertext transport protocol) before you can surf the Internet? 71 Reference Models Two reference models will be discussed OSI reference model TCP/IP model 72 OSI Reference Model ISO/OSI (Open Systems Interconnection) Reference Model NOT a network architecture itself Exact services and protocols are not specified Just "what should be done" in each layer However, standards are produced for all layers 73 OSI Reference Model Seven layers Layer Layer Layer Layer Layer Layer Layer 7: 6: 5: 4: 3: 2: 1: application layer presentation layer session layer transport layer network layer data link layer physical layer (lowest) Diagram of OSI reference model Note: this is one of the most important figures in the whole book!! 74 Physical medium 75 76 Physical medium End-to-End Point-to-Point Point-to-Point Host A Subnet Point-to-Point Host B 77 Physical Layer Transmitting raw bits (0s and 1s) Design issues Representation of bits How is 0/1 represented? Data rate: number of bits sent per second How long does a bit last? Transmission mode Mechanical, electrical, procedural interfaces Underlying physical transmission medium 78 Data Link Layer Takes a raw transmission facility and transforms it into a line (link) that appears free of undetected transmission errors to network layer Basic function Breaks up input data to data frames Transmits data frames Processes acknowledgement frames sent back from receiver 79 Data Link Layer Responsibilities (cont’d) Physical addressing Framing creating and recognizing frame boundaries Error control (adjacent nodes) Errors: damaged, lost, duplicate Flow control (adjacent nodes) Traffic regulation between fast sender and slow receiver Medium access control Shared channel access control in broadcast networks 80 Network Layer Subnet operation control Responsibilities Logical addressing Routing Static tables Determined at the start of conversation Dynamic Congestion control Quality of service Accounting Heterogeneous network interconnection 81 Transport Layer End-to-end layer Talk to destination machine directly (virtually) Layers 4 through 7 are end-to-end Layers 1 through 3 are node-to-node Basic function Split data from session layer into smaller units Pass units to network layer Ensure units arrive correctly at the other end 82 Transport Layer Determine services provided to session layer (and ultimately to users) Error-free point-to-point channel that delivers messages in the order in which they were sent Transport of isolated messages w/o guarantee about order Broadcasting Normally, a distinct network connection is created for each transport connection required by session layer 83 Transport Layer Responsibilities include Service-point addressing Which message belong to which connection (application): Information in header Needed as multiprogramming in a host (End-to-end) Flow control (End-to-end) Error control Compare to the Data Link layer 84 Session layer Session establishment between users on different machines Responsibilities Dialogue control Deciding who sends, and when Token management Control of same operation not to be performed at the same time Synchronization Inserting checkpoints (checkpointing) 85 Figure 3-11 from Forouzan’s 2/e Session Layer WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998 Presentation Layer Syntax/semantics of information Responsibilities Encoding Convert from data representation used in one host to the standard abstract data structure and back Encryption Compression 87 Application Layer Provides interface and support for services to users (human, software, robots) Application services Network virtual terminal (telnet) File transfer Email Network management Hypertext transfer 88 Figure 3-14 from Forouzan’s 2/e Summary of Layer Functions WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998 TCP/IP Reference Model Goals Internetworking Fault tolerance Flexible architecture Four layers of TCP/IP Reference Model Host-to-network layer Internet layer Transport layer Application layer 90 Internet Layer Packet-switching, connectionless Packets injected to network Independent travel Out-of-order arrival Analogy Mail system IP (Internet Protocol) Packet routing Congestion control 91 Transport Layer Two end-to-end protocols UDP (User Datagram Protocol) TCP (Transmission Control Protocol) UDP (User Datagram Protocol) Unreliable, connectionless Widely used for client-server type request-reply queries speech, video 92 Transport Layer TCP Reliable connection-oriented Incoming byte stream (form application layer) is fragmented into discrete messages and passed onto internet layer Message is reassembled at destination Flow control Analogy A B Pipe 93 Applications and Host-to-Network Layers Application layer No session and presentation layers TELNET, FTP, SMTP, DNS, NNTP, HTTP Host-to-network layer Host has to connect to to the network using some protocol so it can send IP packets 94 Initial TCP/IP Protocols and Networks 95 OSI and TCP/IP Models Correspondence OSI 7 Application 6 Presentation Session 5 Transport 4 Network 3 2 Data Link 1 Physical TCP/IP Application Transport Internet Host-toNetwork 96 OSI and TCP/IP Models Similarities Stack of independent protocols Layer functionality Transport layer Application layer 97 OSI Differences between OSI and TCP/IP Models Distinction between services, interfaces, and protocols (perhaps the biggest contribution) Better Protocol-Hidden Model first, then protocols Pro: No bias, more general Con: Designers did not have much experience with the subject a good idea of which functionality to put in which layer No thought given to internetworking 7 layers Communication Connection-Oriented and connectionless in network layer Only connection-oriented in transport layer 98 Differences between OSI and TCP/IP Models TCP/IP: No clear distinction between services, interfaces, and protocols Worse protocol-hidden Protocol first, then model Pro: Protocols fit model perfectly Con: Model does not fit any other protocol stacks (not general) 4 layers Communication Connectionless in network layer Both in transport layer (good for request-response protocols) 99 Summary of Reference Models OSI OSI model exceptionally useful for discussing computer networks OSI protocols not popular TCP/IP TCP/IP model practically nonexistent TCP/IP protocols widely used Modified framework is used in the text 100 Summary of Reference Models Modified framework is used in the text 101 Figure 2.3 McGraw-Hill Peer-to-peer processes 102 ©The McGraw-Hill Companies, Inc., 2004 Figure 2.4 McGraw-Hill An exchange using the Internet model 103 ©The McGraw-Hill Companies, Inc., 2004 Figure 2.5 McGraw-Hill Physical layer 104 ©The McGraw-Hill Companies, Inc., 2004 Note: The physical layer is responsible for transmitting individual bits from one node to the next. McGraw-Hill 105 ©The McGraw-Hill Companies, Inc., 2004 Figure 2.6 McGraw-Hill Data link layer 106 ©The McGraw-Hill Companies, Inc., 2004 Note: The data link layer is responsible for transmitting frames from one node to the next. McGraw-Hill 107 ©The McGraw-Hill Companies, Inc., 2004 Figure 2.7 McGraw-Hill Node-to-node delivery 108 ©The McGraw-Hill Companies, Inc., 2004 Example 1 In Figure 2.8 a node with physical address 10 sends a frame to a node with physical address 87. The two nodes are connected by a link. At the data link level this frame contains physical addresses in the header. These are the only addresses needed. The rest of the header contains other information needed at this level. The trailer usually contains extra bits needed for error detection McGraw-Hill 109 ©The McGraw-Hill Companies, Inc., 2004 Figure 2.8 McGraw-Hill Example 1 110 ©The McGraw-Hill Companies, Inc., 2004 Figure 2.9 McGraw-Hill Network layer 111 ©The McGraw-Hill Companies, Inc., 2004 Note: The network layer is responsible for the delivery of packets from the original source to the final destination. McGraw-Hill 112 ©The McGraw-Hill Companies, Inc., 2004 Figure 2.10 McGraw-Hill Source-to-destination delivery 113 ©The McGraw-Hill Companies, Inc., 2004 Example 2 In Figure 2.11 we want to send data from a node with network address A and physical address 10, located on one LAN, to a node with a network address P and physical address 95, located on another LAN. Because the two devices are located on different networks, we cannot use physical addresses only; the physical addresses only have local jurisdiction. What we need here are universal addresses that can pass through the LAN boundaries. The network (logical) addresses have this characteristic. McGraw-Hill 114 ©The McGraw-Hill Companies, Inc., 2004 Figure 2.11 Example 2 McGraw-Hill 115 ©The McGraw-Hill Companies, Inc., 2004 Figure 2.12 McGraw-Hill Transport layer 116 ©The McGraw-Hill Companies, Inc., 2004 Note: The transport layer is responsible for delivery of a message from one process to another. McGraw-Hill 117 ©The McGraw-Hill Companies, Inc., 2004 Figure 2.12 McGraw-Hill Reliable process-to-process delivery of a message 118 ©The McGraw-Hill Companies, Inc., 2004 Example 3 Figure 2.14 shows an example of transport layer communication. Data coming from the upper layers have port addresses j and k (j is the address of the sending process, and k is the address of the receiving process). Since the data size is larger than the network layer can handle, the data are split into two packets, each packet retaining the port addresses (j and k). Then in the network layer, network addresses (A and P) are added to each packet. McGraw-Hill 119 ©The McGraw-Hill Companies, Inc., 2004 Figure 2.14 McGraw-Hill Example 3 120 ©The McGraw-Hill Companies, Inc., 2004 Figure 2.15 McGraw-Hill Application layer 121 ©The McGraw-Hill Companies, Inc., 2004 Note: The application layer is responsible for providing services to the user. McGraw-Hill 122 ©The McGraw-Hill Companies, Inc., 2004 Figure 2.16 McGraw-Hill Summary of duties 123 ©The McGraw-Hill Companies, Inc., 2004 Example Networks The Internet Connection-Oriented Networks X.25, Frame Relay, and ATM Ethernet Wireless LANs: 802:11 124 Standards and Standards Organizations Why standards? Categories de facto de jure Organizations ITU-T (formerly CCITT) ISO ANSI IEEE IETF ATM Forum 125