Full Transcript

#MITSCSE CST303 COMPUTER NETWORKS 1 Syllabus Module I Introduction – Uses of computer networks, Network hardware, Network software. Reference models – The OSI reference model, The TCP/IP reference model, Comparison of OSI and TCP/IP reference models. Phy...

#MITSCSE CST303 COMPUTER NETWORKS 1 Syllabus Module I Introduction – Uses of computer networks, Network hardware, Network software. Reference models – The OSI reference model, The TCP/IP reference model, Comparison of OSI and TCP/IP reference models. Physical Layer – Modes of communication, Physical topologies, Signal encoding, Repeaters and hub, Transmission media overview. Performance indicators – Bandwidth, Throughput, Latency, Queuing time, Bandwidth–Delay product. 2 Syllabus Module I Introduction – Uses of computer networks, Network hardware, Network software. Reference models – The OSI reference model, The TCP/IP reference model, Comparison of OSI and TCP/IP reference models. Physical Layer – Modes of communication, Physical topologies, Signal encoding, Repeaters and hub, Transmission media overview. Performance indicators – Bandwidth, Throughput, Latency, Queuing time, Bandwidth–Delay product. 3 #MITSCSE INTRODUCTION 4 INTRODUCTION #MITSCSE Computer Networks-Interconnected collection of autonomous computers. 2 computers are interconnected if they are able to exchange information. Communication is the process of exchanging information between two persons or devices. Connection can be made via copper wire, fiber optics, microwaves or communication satellites etc. If one computer cannot forcibly start, stop or control another computer then it is termed as autonomous. 5 Uses of Computer Networks 6 #MITSCSE Uses of Computer Networks 1. Business Applications or Networks for companies. 2. Home applications or Networks for People. 3. Mobile Network Users Social Issues 7 1. Business Applications #MITSCSE  Different goals 1. Resource Sharing  Programs, equipment, data etc.  A company’s information system as consisting of one or more databases, and some number of employees who need to access them remotely.  High reliability  Alternative sources of supply.  Client-Server model-Saves money.  Scalability  Ability to increase system performance 8 #MITSCSE Business Applications of Networks  A network with two clients and one server. 9 #MITSCSE Business Applications of Networks  The client-server model involves requests and replies. 10 #MITSCSE 2. Powerful Communication medium ◦ human to human communication. 3. Doing business electronically with other companies. 4. Doing business with consumers(e- commerce). 11 #MITSCSE 2. Home Applications Popular Uses: 1. Access to remote information Online newspaper Access to WWW 2. Person-to-person communication E-mails. Instant messaging Video conference Worldwide newsgroup 12 #MITSCSE Person to person communication: peer-to- peer system-there are no fixed clients and servers. 13 Home Applications #MITSCSE 3. Interactive entertainment Video on demand Live Television Game playing 4. Electronic commerce (e-commerce) Convenience of shopping from home with online catalogs. 14 #MITSCSE Some forms of e-commerce 15 3. Mobile Network Users #MITSCSE Mobile computers such as notebook computers, Personal Digital Assistants. Area in which these devices may excel-Mobile commerce (m-commerce) 16 #MITSCSE Social Issues Widespread introduction of networking has introduced new social, ethical, and political problems. Exchange messages using newsgroup may lead to conflicts. Another area: Employee rights vs employer rights Network offers the potential to send anonymous messages Electronic junk mails (Spam) may contain viruses Copyright violation due to transmission of music & videos. 18 Network Hardware 20 #MITSCSE Network Hardware  Based on types of transmission technology  Based on Scale 21 #MITSCSE Transmission Technology 2 Types 1. Broadcast links 2. Point-to-point links 22 1. Broadcast Networks #MITSCSE Have a single communication channel, that is shared by all the machines on the network. Short messages called packets sent by any machine are received by all the others An address field in a packet specifies the recipient After receiving the packet, the address field is checked If it is intended for itself, it processes the packet, otherwise it is ignored 23 A B C D E F 24 #MITSCSE 25 Broadcast systems allow the possibility of addressing a packet to all destinations by using a special code in the address field. This process is called broadcasting. Smaller localized network use broadcasting. 26 Multicasting Some broadcast systems also support transmission to a subset of the machines By reserving a bit to indicate multicasting & the remaining n-1 address bits can hold the group number. Each machine can subscribe to any or one of the groups 27 Network Hardware 2. Point-to-point Networks #MITSCSE Consist of many connections between individual pair of machines. Transfer from source to destination may include one or more intermediate machines Multiple routes of different lengths leads to the role of routing algorithm for route selection. Larger networks use point-to-point. Point-to-point transmission with one sender and one receiver is sometimes called unicasting 28 29 Network Hardware 2. Scale Based on scale, Personal Area Networks Local Area Networks Metropolitan Area Networks Wide Area Networks Internetworks or Internet 30 31 1. PERSONAL AREA NETWORKS(PAN) Networks that are meant for one person Eg: a wireless network connecting a computer with its mouse, keyboard, and printer 2. LOCAL AREA NETWORKS(LAN) Generally called as LANs Privately owned networks Inter-processor distance:10m to 1km Networks placed in a single room or building or campus LANs are distinguished by 3 characteristics – Size Transmission Technology Topology 32  Size :- Worst-case transmission time is bounded and known in advance. Knowing this bound makes it possible to use certain kinds of designs Simplifies Network management.  Transmission Technology :- consist of a single cable to which all the machines are attached. Traditional LAN runs at speed of 10 to 100 Mbps Newer LANs operate at 10 Gbps Low delay Makes very few errors 33  Topology :-  2 broadcast network types: Bus & Ring Bus (Linear cable) network at any instant, at most one machine is the master and is allowed to transmit. All other machines are required to refrain from sending Arbitration mechanism :- to resolve conflicts when two or more machines want to transmit simultaneously. It may be Centralized or distributed (decentralized) 34  Eg:-IEEE802.3 popularly called Ethernet is bus based broadcast network with decentralized control operates at 10 Mbps to 10 Gbps Computers on an Ethernet can transmit whenever they want to; if two or more packets collide, each computer just waits a random time and tries again later 35  Ring Network: The transmission of data takes place by token passing. A token is a special series of bits that contains control information. Possession of the token allows a network device to transmit data to the network. Each network has only one token. 36 37  Ring Network:  Advantages: Very orderly network where every device has access to the token and the opportunity to transmit Performs better than a bus topology under heavy network load Does not require network server to manage the connectivity between the computers  Disadvantages: One malfunctioning workstation or bad port can create problems for the entire network Devices moved, added and changed can affect the network Network adapter cards are much more expensive than Ethernet cards and hubs Much slower than an Ethernet network under normal load 38  Working of Ring Network: The sending computer removes the token from the ring and sends the requested data around the ring. Each computer passes the data until the packet finds the computer that matches the address on the data. The receiving computer then returns a message to the sending computer indicating that the data has been received. After verification, the sending computer creates a new token and releases it to the network. 39 40  Ring Network: Egs: IEEE 802.5 (the IBM token ring), is a ring-based LAN operates at 4 and 16 Mbps. FDDI (Fiber Distributed Data Interface) is another example of a ring network 41  Broadcast networks can be further divided into 2, depending on how the channel is allocated Static and Dynamic  A typical static allocation is To divide time into discrete intervals and use a round-robin algorithm allowing each machine to broadcast only when its time slot comes up Drawback: wastes channel capacity when a machine has nothing to say during its allocated slot So, most systems attempt to allocate the channel dynamically (i.e., on demand). 42 LAN  Dynamic allocation methods are either centralized or decentralized.  In the centralized channel allocation method, there is a single entity, for example, a bus arbitration unit, which determines who goes next. It might do this by accepting requests and making a decision according to some internal algorithm.  In the decentralized channel allocation method, there is no central entity; each machine must decide for itself whether to transmit. 43 3. Metropolitan Area Networks(MAN)  A metropolitan area network based on cable TV in a city.  Another eg: IEEE 802.16 (Broadband wireless MANs) for high-speed wireless Internet access 44 4. Wide Area Networks (WAN) WAN spans a large geographical area, often a country or continent It contains a collection of machines called hosts intended for running user (i.e., application) programs The hosts are owned by the customers The hosts are connected by a communication subnet, or just subnet The communication subnet is typically owned and operated by a telephone company or Internet service provider The job of the subnet is to carry messages from host to host, just as the telephone system carries words from speaker to listener 46 Wide Area Networks (WAN)  Relation between hosts on LANs and the subnet. 47 Subnet consists of two distinct components: Transmission lines Switching elements Transmission lines Move bits between machines. Made of copper wire, optical fiber, or even radio links. Switching elements Specialized computers that connect three or more transmission lines. When data arrive on an incoming line, it must choose an outgoing line on which to forward them. Switching elements are also called as routers 48 Wide Area Networks (WAN)  Relation between hosts on LANs and the subnet. 49 Wide Area Networks (WAN) Store-and-forward or packet-switched subnet When a packet is sent from one router to another via one or more intermediate routers, the packet is received at each intermediate router in its entirety, stored there until the required output line is free, and then forwarded. When the packets are small and all of the same size, they are often called cells 50 51 Principle of a packet-switched WAN: When a process on some host has a message to be sent to a process on some other host, the sending host first cuts the message into packets, each one bearing its number in the sequence. These packets are then injected into the network one at a time in quick succession. The packets are transported individually over the network and deposited at the receiving host, where they are reassembled into the original message and delivered to the receiving process 52  A stream of packets from sender to receiver. Routing decisions are made locally. When a packet arrives at router A, it is up to A to decide if this packet should be sent on the line to B or the line to C. How A makes that decision is called the routing algorithm. 53 Not all WANs are packet switched. A second possibility for a WAN is a satellite system. Each router has an antenna through which it can send and receive. All routers can hear the output from the satellite In some cases, they can also hear the upward transmissions of their fellow routers to the satellite as well. Sometimes the routers are connected to a substantial point-to-point subnet, with only some of them having a satellite antenna. Satellite networks are inherently broadcast and are most useful when the broadcast property is important 54 55 5. Internetworks A collection of interconnected networks is called an internetwork or internet A common form of internet is a collection of LANs connected by a WAN If the intermediate system contains only routers, it is a subnet If it contains both routers and hosts, it is a WAN An internetwork is formed when distinct networks are interconnected 56 Wireless Networks 59 Digital wireless communication is not a new idea. As early as 1901, the Italian physicist Marconi demonstrated a ship-to-shore wireless telegraph, using Morse Code (dots and dashes as binary). Modern digital wireless systems have better performance, but the basic idea is the same. Categories of wireless networks: System interconnection Wireless LANs Wireless WANs 60 1. System interconnection Interconnecting the components of a computer using short-range radio Every computer has a monitor, keyboard, mouse, and printer connected to the main unit by cables Some companies got together to design a short- range wireless network called Bluetooth to connect these components without wires Bluetooth also allows digital cameras, headsets, scanners, and other devices to connect to a computer by merely being brought within range 61 System interconnection networks use the master-slave paradigm System unit is normally the master, talking to the mouse, keyboard, etc., as slaves. The master tells the slaves what addresses to use, when they can broadcast, how long they can transmit, what frequencies they can use, and so on 62 System Interconnection 63 2. Wireless LANs Systems in which every computer has a radio modem and antenna with which it can communicate with other systems If the systems are close enough, they can communicate directly with one another in a peer-to-peer configuration Wireless LANs are becoming increasingly common in small offices and homes, where installing Ethernet is considered too much trouble Standard for wireless LANs is called IEEE 802.11 64 Wireless LAN 65 3. Wireless WANs Radio network used for cellular telephones is an example of a low-bandwidth wireless system. This system has already gone through three generations. 1.The first generation was analog and for voice only. 2.The second generation was digital and for voice only. 3.The third generation is digital and is for both voice and data. 66  Almost, all wireless networks hook up to the wired network at some point.  2 Ways 68 69 (a) Individual independent mobile computers airplane with a number of people using modems and seat-back telephones to call the office independently. (b) A flying LAN (more efficient) Each seat comes equipped with an Ethernet connector into which passengers can plug their computers. A single router on the aircraft maintains a radio link with some router on the ground, changing routers as it flies along. This is just a traditional LAN, except that its connection to the outside world is a radio link instead of a hardwired line 70 Network Software 72 Network Software Protocol Hierarchies Design Issues for the Layers Connection-Oriented and Connectionless Services Service Primitives The Relationship of Services to Protocols 73 Network Software Protocol Hierarchies 74 Protocol Hierarchies To reduce their design complexity, most networks are organized as a stack of layers or levels  Number of layers, name of each layer, contents of each layer, and function of each layer differ from network to network Purpose of each layer To offer certain services to the higher layers, Shielding those layers from the details of how the offered services are actually implemented The rules and conventions used in this conversation are collectively known as the layer-n protocol Protocol is an agreement between the communicating parties on how communication is to proceed 75 Protocol Hierarchies No data are directly transferred from layer n on one machine to layer n on another machine. Instead, each layer passes data and control information to the layer immediately below it, until the lowest layer is reached. Below layer 1 is the physical medium through which actual communication occurs Between each pair of adjacent layers is an interface Interface defines which primitive operations and services the lower layer makes available to the upper one 76 77 A set of layers and protocols is called a network architecture A list of protocols used by a certain system, one protocol per layer, is called a protocol stack 79 Protocol Hierarchies 80 Protocol Hierarchies  Header & trailer includes control information, such as sequence numbers, sizes, times, and other control fields 81 Design Issues for the Layers Addressing Rules for data transfer Error Control Flow Control Long messages Too short messages Multiplexing & demultiplexing Routing 82 Design Issues for the Layers 1. Addressing Every layer needs a mechanism for identifying senders and receivers So, addressing is required 2. Rules for data transfer Unidirectional or bidirectional (Simplex / Half duplex / Full duplex) Protocol must determine how many logical channels the connection corresponds to and what their priorities are Many networks provide at least two logical channels per connection, one for normal data and one for urgent data. 83 Design Issues for the Layers 3. Error Control Problem: physical communication circuits are not perfect Error-detecting and error-correcting codes are available Both ends of the connection must agree on which one is being used Receiver must have some way of telling the sender which messages have been correctly received and which have not To deal with a possible loss of sequencing, the protocol must make explicit provision for the receiver to allow the pieces to be reassembled properly 84 Design Issues for the Layers 4. Flow Control Problem: how to keep a fast sender from swamping (overloading) a slow receiver with data Solution 1: some kind of feedback from the receiver to the sender, about the receiver's current situation Solution 2: limit the sender to an agreed-on transmission rate (flow control) 5. Long messages Problem: inability of all processes to accept arbitrarily long messages Solution: disassembling, transmitting, and then reassembling messages 85 Design Issues for the Layers 6. Too short messages Problem: transmitting data in units that are so small that sending each one separately is inefficient. Solution: to gather several small messages heading toward a common destination into a single large message and dismember the large message at the other side. 86  7. Multiplexing & demultiplexing Underlying layer may decide to use the same connection for multiple, unrelated conversations (Physical layer)  8. Routing When there are multiple paths between source and destination, a route must be chosen based on the current traffic load 87 88 Connection Oriented and Connectionless Services 90 1. Connection-Oriented Services Similar to telephone service To use a connection-oriented network service, the service user Establishes a connection, Uses the connection, and Releases the connection Acts like a tube Sender pushes objects (bits) in at one end, and the receiver takes them out at the other end The order is preserved so that the bits arrive in the order they were sent 91 Connection-Oriented Services When a connection is established, the sender, receiver, and subnet conduct a negotiation about parameters to be used, such as maximum message size, quality of service error rates, bandwidth, throughput, transmission delay, jitter, Availability other issues. Typically, one side makes a proposal and the other side can accept it, reject it, or make a counterproposal 92 2. Connectionless Services Similar to postal system Each message (letter) carries the full destination address Each one is routed through the system independent of all the others 93 Connection Oriented Services 94 Classifications: Reliable & Unreliable Each service can be characterized by a quality of service Some services are reliable that they never lose data. A reliable service is implemented by having the receiver acknowledge the receipt of each message so the sender is sure that it arrived. The acknowledgement process introduces overhead and delays, which are often worth it but are sometimes undesirable Eg for reliable connection-oriented service is file transfer Reliable connection-oriented service has two minor variations: Message sequences and Byte streams 95 Connection-Oriented Services a)Message sequences Message boundaries are preserved. When two 1024-byte messages are sent, they arrive as two distinct 1024-byte messages, never as one 2048-byte message Eg: Sending the pages of book b)Byte streams Connection is simply a stream of bytes, with no message boundaries. When 2048 bytes arrive at the receiver, there is no way to tell if they were sent as one 2048-byte message, two 1024-byte messages, or 2048 1-byte messages Eg: user logging details to a remote server 96 Connection-Oriented Services- Unreliable For some applications, transit delays introduced by acknowledgements are unacceptable. (Unreliable is better) Application 1: Digitized voice traffic. It is preferable for telephone users to hear a bit of noise on the line from time to time than to experience a delay waiting for acknowledgements. Application 2: Video conference. when transmitting a video conference, having a few pixels wrong is no problem, but having the image jerk along as the flow stops to correct errors is irritating 97 Connectionless Services 98 Connectionless Services Connectionless service is often called datagram service. Different types. 1. Unreliable (meaning not acknowledged) datagram service Does not return an acknowledgement to the sender Eg: junk mails 2. Acknowledged datagram service Convenience of not having to establish a connection to send one short message is desired, But, reliability is essential. Eg: sending a registered letter and requesting a return receipt 99 3. Request-reply service The sender transmits a single datagram containing a request; the reply contains the answer Egs: a query to the local library, Client server model 100 Connection-Oriented and Connectionless Services  Six different types of service. 101 Interfaces 102 Interfaces & Services Active elements in each layer are called entities An entity can be a software entity (such as a process), or hardware entity (such as an intelligent I/O chip) Entities in the same layer on different machines are called peer entities Entities in layer n implement a service used by layer n+ 1 Layer n is the service provider Layer n + 1 is the service user 103 Interfaces & Services Services are available at SAPs (Service Access Points) IDU Layer n+1 IDU – Interface Data Unit ICI SDU ICI – Interface Control Information SDU – Service Data Unit SAP Interface SAP – Service Access Point Layer n ICI SDU Each SAP has an address that uniquely identifies it Eg: SAPs are the sockets into which telephones are plugged SAP addresses are telephone numbers of sockets 104 Service Primitives 105 Service Primitives A service is specified by a set of primitives (operations) available to a user process to access the service. These primitives tell the service to perform some action or report on an action taken by a peer entity. If the protocol stack is located in the operating system, the primitives are normally system calls. These calls cause a trap to kernel mode, which then turns control of the machine over to the operating system to send the necessary packets. 106 Service Primitives  Five service primitives for implementing a simple connection-oriented service. 107 Service Primitives  Packets sent in a simple client-server interaction on a connection-oriented network. 108 Service Primitives Illustration: Server executes LISTEN to indicate that it is prepared to accept incoming connections. A common way to implement LISTEN is to make it a blocking system call. After executing the primitive, the server process is blocked until a request for connection appears 109 LISTEN 110 Client process executes CONNECT to establish a connection with the server Operating system then typically sends a packet to the peer asking it to connect Client process is suspended until there is a response 111 2. CONNECT 1. LISTEN REQ 112 Service Primitives When the packet arrives at the server, it is processed by its operating system When the system sees that the packet is requesting a connection, it checks to see if there is a listener. If so, it does two things: Unblocks the listener and Sends back an acknowledgement Arrival of this acknowledgement then releases the Client At this point the Client and Server are both running and they have a connection established If a connection request arrives and there is no listener, the result is undefined 113 2. CONNECT 1. LISTEN REQ 114 2. CONNECT 1. LISTEN REQ CONNECTION ACK ESTABLISHED!! 115 Service Primitives The next step is for the Server to execute RECEIVE to prepare to accept the first request. Normally, the server does this immediately upon being released from the LISTEN, before the acknowledgement can get back to the client. The RECEIVE call blocks the Server Then the Client executes SEND to transmit its request followed by the execution of RECEIVE to get the reply The arrival of the request packet at the server machine unblocks the Server process so it can process the request. After it has done the work, it uses SEND to return the answer to the Client. The arrival of this packet unblocks the Client, which can now inspect the answer. 116 CONNECTION ESTABLISHED!! SEND RECEIVE DATA 117 CONNECTION ESTABLISHED!! RECEIVE SEND REPLY 118 Service Primitives  Packets sent in a simple client-server interaction on a connection-oriented network. 119 Service Primitives If the Client has additional requests, it can make them now. If it is done, it can use DISCONNECT to terminate the connection. Usually, an initial DISCONNECT is a blocking call, suspending the client and sending a packet to the server saying that the connection is no longer needed. When the Server gets the packet, it also issues a DISCONNECT of its own, acknowledging the client and releasing the connection. When the Server's packet gets back to the Client machine, the Client process is released and the connection is broken. 120 Reference Models The OSI Reference Model The TCP/IP Reference Model 121 OSI Reference Model The model is called the ISO OSI (International Organization for Standardization Open Systems Interconnection) Reference Model. because it deals with connecting open systems ie, systems that are open for communication with other systems OSI model has seven layers 1. Physical layer 2. Data link layer 3. Network Layer 4. Transport Layer 5. Session Layer 6. Presentation Layer 7. Application Layer 122 Please Do Not Tell Secret Password to Anyone!! 123 1. Physical layerPlease 2. Data link layerDo 3. Network LayerNot 4. Transport LayerTell 5. Session LayerSecret 6. Presentation LayerPassword to 7. Application Layer  Anyone 124 126 OSI Reference Models 127 128 OSI Reference Model 1. Physical Layer Concerned with transmitting raw bits over a communication channel Design issues are 1. When one side sends a 1 bit, it is received by the other side as a 1 bit, not as a 0 bit. 2. How many volts should be used to represent a 1 and how many for a 0, 3. How many nanoseconds a bit lasts, 4. Whether transmission may proceed simultaneously in both directions, 5. How the initial connection is established and 6. How it is torn down when both sides are finished, 7. How many pins the network connector has 8. What each pin is used for 131 Design issues deal with Mechanical, electrical, & timing interfaces, and Physical transmission medium, which lies below the physical layer 132 2. Data link Layer Main task: Error Control To transform a raw transmission facility into a line that appears free of undetected transmission errors to the network layer Sender break up the input data into data frames (typically a few hundred or a few thousand bytes) and transmit the frames sequentially If the service is reliable, the receiver confirms correct receipt of each frame by sending back an acknowledgement frame. 133 Data link Layer Another Issue: Flow control How to keep a fast transmitter from drowning a slow receiver in data Traffic regulation mechanism is often needed to let the transmitter know how much buffer space the receiver has Additional issue in broadcast networks: How to control access to the shared channel Data link layer is subdivided into 2 for this purpose Logical Link Control (LLC) sub layer Medium Access Control (MAC) sub layer MAC handles the broadcast networks 134 3. Network Layer Controls the operation of the subnet Design issues 1. Determining how packets are routed from source to destination Routes can be based on static tables that are fixed into the network and are rarely changed can be highly dynamic, being determined a new for each packet, to reflect the current network load 135 Network Layer 2. Congestion control If too many packets are present in the subnet at the same time, they will get in on another's way creating congestion 3. Providing QOS Transit time, delay, jitter, error rate, bandwidth, availability, throughput, etc 4. To allow heterogeneous networks (different addressing, protocols, message size, etc) to be interconnected In broadcast networks, the routing problem is simple so the network layer is often thin or even nonexistent 137 4. Transport Layer Basic function to accept data from above, split it up into smaller units if needed, pass these to the network layer, and ensure that all the pieces arrive correctly at the other end. All this must be done efficiently in a way that isolates the upper layers from the inevitable changes in the hardware technology determines what type of service to provide to the session layer, and, ultimately, to the users of the network 138 Transport Layer Most popular type of transport connection Error-free point-to-point channel that delivers messages or bytes in the order in which they were sent Other possible kinds of transport service Transporting of isolated messages, with no guarantee about the order of delivery, and The broadcasting of messages to multiple destinations Type of service is determined when the connection is established 139 Transport Layer Transport layer is a true end-to-end layer, all the way from the source to the destination. ie, A program on the source machine carries on a conversation with a similar program on the destination machine, using the message headers and control messages. In the lower layers, the protocols are between each machine and its immediate neighbors (routers), and not between the ultimate source and destination machines 140 5. Session Layer Allows users on different machines to establish sessions between them Sessions offer various services, including Dialog control Keeping track of whose turn it is to transmit Token management Preventing two parties from attempting the same critical operation at the same time Synchronization Check pointing long transmissions to allow them to continue from where they were after a crash 141 6. Presentation Layer Concerned with the syntax and semantics of the information transmitted. In order to make it possible for computers with different data representations to communicate the data structures to be exchanged can be defined in an abstract way along with a standard encoding to be used on the wire Manages these abstract data structures and allows higher-level data structures (e.g., banking records) to be defined and exchanged 142 7. Application Layer Contains a variety of protocols that are commonly needed by users Widely-used application protocol HTTP (Hyper Text Transfer Protocol) basis for the World Wide Web When a browser wants a Web page, it sends the name of the page it wants to server using HTTP server then sends the page back Other application protocols File transfer (FTP) Electronic mail (SMTP) Domain Name System (DNS) 143 144 145 TCP/IP Reference Models 147 TCP/IP Reference Models 148 TCP/IP Reference Model-History Reference model used in the ARPANET (grandparent of all WAN) and its successor, the worldwide Internet ARPANET (Advanced Research Projects Agency Network) Research network sponsored by the DoD (U.S. Department of Defense) Connected hundreds of Universities and Government installations, using leased telephone lines 149 When satellite and radio networks were added later, the existing protocols had trouble interworking with them So, a new reference architecture was needed Thus, the ability to connect multiple networks in a seamless way was one of the major design goals from the very beginning This architecture later became known as the TCP/IP Reference Model, after its two primary protocols 150 TCP/IP Reference Model Another major goal Network must be able to survive loss of subnet hardware, with existing conversations not being broken off. ie, DoD wanted connections to remain intact as long as the source and destination machines were functioning even if some of the machines or transmission lines in between were suddenly put out of operation. Also, a flexible architecture was needed Since applications with divergent requirements were envisioned, ranging from transferring files to real-time speech 151 4 layers in TCP/IP 1. Application layer 2. Transport layer 3. Internet layer 4. Host to network layer 152 TCP/IP Reference Model 1. Host-to-Network Layer Host has to connect to the network using some protocol so that it can send IP packets to it TCP/IP reference model does not really say much about what happens here 2. Internet Layer All requirements of DoD led to the choice of a packet-switching network based on a connectionless internetwork layer This layer is called the internet layer, because it is the key layer that holds the whole architecture together 153 Internet Layer (contd..) Job is to permit hosts to inject packets into any network and, have them travel independently to the destination on a different network They may even arrive in a different order than they were sent It is the job of higher layers to rearrange them, if in-order delivery is desired 154 Internet layer defines an official packet format and protocol called IP (Internet Protocol). The job of the internet layer is to deliver IP packets where they are supposed to go. Packet routing & avoiding congestion are the major issue here For these reasons, it is reasonable to say that the TCP/IP internet layer is similar in functionality to the OSI network layer 156 3. Transport Layer Designed to allow peer entities on the source and destination hosts to carry on a conversation Two end-to-end transport protocols TCP (Transmission Control Protocol) UDP (User Datagram Protocol) TCP Reliable connection-oriented protocol Allows a byte stream originating on one machine to be delivered without error on any other machine in the internet. It fragments the incoming byte stream into discrete messages and passes each one on to the internet layer. 157 TCP At the destination, the receiving TCP process reassembles the received messages into the output stream TCP also handles flow control to make sure a fast sender cannot swamp a slow receiver with more messages than it can handle 158 UDP Unreliable connectionless protocol For applications that do not want TCP's sequencing or flow control and wish to provide their own also widely used for one-shot, client-server- type request-reply queries and applications in which prompt delivery is more important than accurate delivery, such as transmitting speech or video 159 4. Application Layer TCP/IP model does not have session or presentation layers Because they are of little use to most applications AL contains all the higher-level protocols like Virtual terminal (TELNET) file transfer (FTP) electronic mail (SMTP) Domain Name System (DNS) Network News Transfer Protocol (NNTP) Hyper Text Transfer Protocol (HTTP) 160 TCP/IP Reference Model Application Layer Protocols 1. TELNET virtual terminal protocol allows a user on one machine to log onto a distant machine and work there 2. FTP (File Transfer Protocol ) provides a way to move data efficiently from one machine to another 3. SMTP (Simple Mail Transfer Protocol) Electronic mail was originally just a kind of file transfer, but later a specialized protocol (SMTP) was developed for it 161 4. DNS (Domain Name System) for mapping host names onto their network addresses 5. NNTP (Network News Transfer Protocol ) protocol for moving USENET news articles around USENET (worldwide distributed Internet discussion system) 6. HTTP (Hyper Text Transfer Protocol ) protocol for fetching pages on the World Wide Web (WWW) 162 Protocols and networks in the TCP/IP model initially. ARPANET - Advanced Research Projects Agency Network SATNET – Sustainable Agriculture Trainers Network 163 PHYSICAL LAYER 165 Syllabus Module I Introduction – Uses of computer networks, Network hardware, Network software. Reference models – The OSI reference model, The TCP/IP reference model, Comparison of OSI and TCP/IP reference models. Physical Layer – Modes of communication, Physical topologies, Signal encoding, Repeaters and hub, Transmission media overview. Performance indicators – Bandwidth, Throughput, Latency, Queuing time, Bandwidth–Delay product. 166 Topics  Modes of communication: ◦ Simplex ◦ Half Duplex ◦ Full Duplex  Physical topologies: ◦ Mesh ◦ Star ◦ Bus ◦ Ring ◦ Hybrid 167 MODES OF COMMUNICATION 168  Main functionality of physical layer? ◦ DATA TRANSMISSION. ◦ Successful transmission of data depends on 2 factors: 1. Quality of the signal being transmitted 2. Characteristics of the transmission medium. 169 Terminology  Transmitter  Receiver  Medium ◦ Guided medium  e.g. twisted pair, optical fiber ◦ Unguided medium  e.g. air, water, vacuum 171 Modes of communication  Communication may be: 1. Simplex ◦ One direction  e.g. Television 2. Half duplex ◦ Either direction, but only one way at a time  e.g. police radio 3. Full duplex ◦ Both directions at the same time  e.g. telephone Modes of communications -Based on the transmission method in digital devices 1. Serial: Bits sent one by one over a channel. 2. Parallel: Multiple data bits sent at the same time over multiple channels 174 Modes of communications -Based on synchronization between sender and receiver 1. Synchronous: Sync between Sr and Rr required. Data is sent as blocks. 2. Asynchronous: No sync between Sr and Rr. Immediate attention of Rr not required. Exchanged independent of time. 175 Frequency, Spectrum and Bandwidth  Time domain concepts ◦ Analog signal  Various in a smooth way over time ◦ Digital signal  Maintains a constant level then changes to another constant level ◦ Periodic signal  Pattern repeated over time ◦ Aperiodic signal  Pattern not repeated over time Analogue & Digital Signals Periodic Signals PHYSICAL TOPOLOGIES  The physical topology of a network refers to the configuration of cables, computers, and other peripherals.  The term physical topology refers to the way in which a network is laid out physically.  Main Types of Physical Topologies: ◦ Mesh ◦ Star ◦ Bus ◦ Ring ◦ Hybrid 179  The topology of a network is the geometric representation of the relationship of all the links and linking devices (usually called nodes) to one another. 180 1. Mesh Topology  A mesh topology is the one where every node is connected to every other node in the network. 181  A mesh topology can be a full mesh topology or a partially connected mesh topology.  In a full mesh topology, every computer in the network has a connection to each of the other computers in that network.  The number of connections in this network can be calculated using the following formula..  (n is the number of computers in the network): n(n-1)/2  In a partially connected mesh topology, at least two of the computers in the network have connections to multiple other computers in that network. 182 Advantages of a mesh topology  Can handle high amounts of traffic, because multiple devices can transmit data simultaneously.  A failure of one device does not cause a break in the network or transmission of data.  Adding additional devices does not disrupt data transmission between other devices. 183 Disadvantages of a mesh topology  The cost to implement is higher than other network topologies, making it a less desirable option.  Building and maintaining the topology is difficult and time consuming.  The chance of redundant connections is high, which adds to the high costs and potential for reduced efficiency. 184 2. Star Topology 185 Advantages of star topology  Centralized management of the network, through the use of the central computer, hub, or switch.  Easy to add another computer to the network.  If one computer on the network fails, the rest of the network continues to function normally.  The star topology is used in local-area networks (LANs), High-speed LANs often use a star topology with a central hub. 186  A star network, star topology is one of the most common network setups.  In this configuration, every node connects to a central network device, like a hub, switch, or computer.  The central network device acts as a server and the peripheral devices act as clients.  Depending on the type of network card used in each computer of the star topology, a coaxial cable or a RJ-45 network cable is used to connect computers together 187 Disadvantages  Can have a higher cost to implement, especially when using a switch or router as the central network device.  The central network device determines the performance and number of nodes the network can handle.  If the central computer, hub, or switch fails, the entire network goes down and all computers are disconnected from the network 188 Bus Topology  A line topology/a bus topology is a network setup in which each computer and network device are connected to a single cable or backbone. 189 Advantages of bus topology  It works well when you have a small network.  It's the easiest network topology for connecting computers or peripherals in a linear fashion.  It requires less cable length than a star topology. 190 Disadvantages of bus topology  It can be difficult to identify the problems if the whole network goes down.  It can be hard to troubleshoot individual device issues.  Bus topology is not great for large networks. Terminators are required for both ends of the main cable.  Additional devices slow the network down.  If a main cable is damaged, the network fails or splits into two 191 Ring Topology 192  A ring topology is a network configuration in which device connections create a circular data path.  In a ring network, packets of data travel from one device to the next until they reach their destination.  Most ring topologies allow packets to travel only in one direction, called a unidirectional ring network.  Others permit data to move in either direction, called bidirectional.  The major disadvantage of a ring topology is that if any individual connection in the ring is broken, the entire network is affected.  Ring topologies may be used in either local area networks (LANs) or wide area networks (WANs).193 Disadvantages of ring topology  All data being transferred over the network must pass through each workstation on the network, which can make it slower than a star topology.  The entire network will be impacted if one workstation shuts down.  The hardware needed to connect each workstation to the network is more expensive than Ethernet cards and hubs/switches. 194 Advantages of ring topology  All data flows in one direction, reducing the chance of packet collisions.  A network server is not needed to control network connectivity between each workstation.  Data can transfer between workstations at high speeds.  Additional workstations can be added without impacting performance of the network. 195 Hybrid Topology  A network can be hybrid.  For example, we can have a main star topology with each branch connecting several stations in a bus topology as shown in Figure. 196 197 Signal Encoding Ref: Data and Computer Communications(William Stallings) 198 Encoding Techniques 1. Digital data, digital signal 2. Analog data, digital signal 3. Digital data, analog signal 4. Analog data, analog signal Digital Data, Digital Signal  Digital signal ◦ Discrete, discontinuous voltage pulses ◦ Each pulse is a signal element ◦ Binary data encoded into signal elements. ◦ Line encoding schemes. Terminology  Unipolar ◦ All signal elements have same sign  Polar ◦ Multiple voltage levels. ◦ One logic state represented by positive voltage, the other by negative voltage  Data rate(Data signaling rate) ◦ Rate of data transmission in bits per second  Duration or length of a bit ◦ Time taken for transmitter to emit the bit  Modulation rate ◦ Rate at which the signal level changes ◦ Measured in baud = signal elements per second  Mark and Space ◦ Binary 1 and Binary 0 respectively Interpreting Signals  Need to know ◦ Timing of bits - when they start and end ◦ Signal levels  Factors affecting successful interpreting of signals ◦ Signal to noise ratio(SNR) ◦ Data rate ◦ Bandwidth  With other factors held constant, following statements are true: ◦ An increase in data rate increases bit error rate(BER). ◦ An increase in SNR decreases BER. ◦ An increase in bandwidth allows an increase in data rate. 204 Evaluation/Comparison of Encoding Schemes 1. Signal Spectrum ◦ Lack of high frequencies require less bandwidth ◦ Lack of DC component allows AC coupling via transformer, providing isolation ◦ Transmission chara. of the channel are worse near the band edges. Concentrate power in the middle of the bandwidth. 2. Clocking ◦ Synchronizing transmitter and receiver ◦ First option: External clock ◦ Second option: Sync mechanism based on signal 3. Error detection ◦ Can be built in to signal encoding 4. Signal interference and noise immunity ◦ Some codes are better than others 5. Cost and complexity ◦ Higher signal rate (& thus data rate) lead to higher costs ◦ Some codes require signal rate greater than data rate Encoding Schemes 1. Nonreturn to Zero-Level (NRZ-L) 2. Nonreturn to Zero Inverted (NRZI) 3. Bipolar -AMI 4. Pseudoternary 5. Manchester 6. Differential Manchester 7. B8ZS 8. HDB3 Biphase  Manchester  Differential Manchester 1. Manchester Encoding ◦ Transition in middle of each bit period ◦ Transition serves as clock and data ◦ Low to high represents one ◦ High to low represents zero ◦ Used by IEEE 802.3 Manchester Encoding 2. Differential Manchester ◦ Midbit transition is clocking only ◦ Transition at start of a bit period represents 0 ◦ No transition at start of a bit period represents 1 ◦ Note: this is a differential encoding scheme ◦ Used by IEEE 802.5 Differential Manchester Encoding Biphase Pros and Cons  Con ◦ At least one transition per bit time and possibly two ◦ Maximum modulation rate is twice NRZ ◦ Requires more bandwidth  Pros ◦ Synchronization on mid bit transition (self clocking) ◦ No dc component ◦ Error detection  Absence of expected transition Modulation Rate Scrambling  Use scrambling to replace sequences that would produce constant voltage  Filling sequence ◦ Must produce enough transitions to sync ◦ Must be recognized by receiver and replace with original ◦ Same length as original  No dc component  No long sequences of zero level line signal  No reduction in data rate  Error detection capability TRANSMISSION MEDIA Ref: Data Communications and Networking by Forouzan 227 Introduction  Located below physical layer.  Directly controlled by Physical layer.  Layer 0. 228 Transmission medium and physical layer  A transmission medium can be broadly defined as anything that can carry information from a source to destination.  Ex. For a conversation, medium is air.  Transmission medium is usually free space, metallic cable, or fiber optic cable.  Information is usually a signal. 230 7.231 GUIDED MEDIA Guided media, are those that provide a conduit from one device to another. Twisted-Pair Cable Coaxial Cable Fiber-Optic Cable Twisted pair and coaxial cable use metallic(Copper) conductors that accepts and transforms signals in form of current. Optical fiber is a cable that accepts and transports signals in form of light. 1. Twisted-pair cable A twisted pair consists of two conductors, each with its own plastic insulation, twisted together. One wire- used to carry signals to Rr and other is used only as a ground reference. Rr uses the difference between these 2. In addition to the signal sent, there may be noise or crosstalk. These will create unwanted signals. Why twisted?? 2 types-UTP and STP 235 Figure 7.4 UTP and STP cables STP-has a metal foil or braided mesh covering that encases each pair of insulated conductors. This improves the quality of cable by preventing penetration of noise. But, it is bulkier and expensive. 237 Table 7.1 Categories of unshielded twisted-pair cables 7.238 240 UTP-Example: RJ45 Cable To measure performance of twisted pair cable, compare attenuation versus frequency and distance. Attenuation: the reduction of the amplitude of a signal, electric current, or other oscillation 241 Figure 7.6 UTP performance 7.242 2. Coaxial Cables: Coaxial cable/Coax carries signals of high frequency range than TP. Coax has a core conductor of solid or stranded wire(usually copper) enclosed in an insulating sheath, which is in turn encased in an outer conductor of metal foil, braid or a combination of two. Outer conductor is again enclosed in an insulating sheath. While cable is protected by a plastic cover. 243 Figure 7.7 Coaxial cable 7.244 Table 7.2 Categories of coaxial cables 7.245 Figure 7.8 BNC connectors 7.246 247 Figure 7.9 Coaxial cable performance 7.248 3. Fiber-optic cable: Made of glass or plastic and transmits signal in form of light. 249 Figure 7.10 Fiber optics: Bending of light ray 7.250 Optical fiber Optical fibers use reflection to guide light through the channel. A glass or plastic core is surrounded by a cladding of less dense glass or plastic. Figure 7.12 Propagation modes 7.252 Figure 7.13 Modes Table 7.3 Fiber types 7.255 Figure 7.14 Fiber construction 7.256 Outer jacket- PVC or Teflon Inside the jacket are Kevlar strands to strengthen the cable. 257 UNGUIDED MEDIA: WIRELESS Unguided media transport electromagnetic waves without using a physical conductor. This type of communication is often referred to as wireless communication. Radio Waves Microwaves Infrared 7.260 Figure 7.17 Electromagnetic spectrum for wireless communication 7.261 3 types of wireless propagation: 1. Ground Propagation 2. Sky Propagation 3. Line of sight Propagation 262 Figure 7.18 Propagation methods 7.263 Table 7.4 Bands 7.264 265 Figure 7.19 Wireless transmission waves 7.266 Radio waves are used for multicast communications, such as radio and television, and paging systems. They can penetrate through walls. Highly regulated. Use omni directional antennas 7.267 Figure 7.20 Omnidirectional antenna 7.268 Figure 7.21 Unidirectional antennas 7.270 Microwaves are used for unicast communication such as cellular telephones, satellite networks, and wireless LANs. Higher frequency ranges cannot penetrate walls. Use directional antennas - point to point line of sight communications. 271 Note Infrared signals can be used for short-range communication in a closed area using line-of-sight propagation. Wireless Channels  Are subject to a lot more errors than guided media channels.  Interference is one cause for errors, can be circumvented with high SNR.  The higher the SNR the less capacity is available for transmission due to the broadcast nature of the channel.  Channel also subject to fading and no coverage holes. PERFORMANCE INDICATORS Ref: Data Communications and Networking by Forouzan 274 One important issue in networking is the performance of the network—how good is it? Performance indicators are:  Bandwidth  Throughput  Latency ◦ Propagation time ◦ Transmission time ◦ Queuing time  Bandwidth–Delay product.  Jitter 276 1. BANDWIDTH In networking, we use the term bandwidth in two contexts.  The first, bandwidth in hertz, refers to the range of frequencies in a composite signal or the range of frequencies that a channel can pass.  The second, bandwidth in bits per second, refers to the speed of bit transmission in a channel or link. Often referred to as Capacity. Example The bandwidth of a subscriber line is 4 kHz for voice or data. The bandwidth of this line for data transmission can be up to 56,000 bps using a sophisticated modem to change the digital signal to analog. 2. Throughput: A measure of how fast we can actually send data through a network. 280 Example A network with bandwidth of 10 Mbps can pass only an average of 12,000 frames per minute with each frame carrying an average of 10,000 bits. What is the throughput of this network? Solution We can calculate the throughput as The throughput is almost one-fifth of the bandwidth in this case. 3. Latency  Defines how long it takes for an entire message to completely arrive at the destination from the time the first bit is sent out from the source.  Latency is made of 4 components:  Latency= Propagation time+ Transmission time+ Queuing time+ Processing delay Propagation Delay Propagation Time(Delay) = Distance/Propagation speed  Propagation speed - speed at which a bit travels though the medium from source to destination Transmission Delay = Message size/bandwidth bps.  Transmission speed - the speed at which all the bits in a message arrive at the destination. (difference in arrival time of first and last bit) 284 Example 3.45 What is the propagation time if the distance between the two points is 12,000 km? Assume the propagation speed to be 2.4 × 108 m/s in cable. Solution We can calculate the propagation time as The example shows that a bit can go over the Atlantic Ocean in only 50 ms if there is a direct cable between the source and the destination. Example 3.46 What are the propagation time and the transmission time for a 2.5-kbyte message (an e-mail) if the bandwidth of the network is 1 Gbps? Assume that the distance between the sender and the receiver is 12,000 km and that light travels at 2.4 × 108 m/s. Solution We can calculate the propagation and transmission time as shown on the next slide: Example 3.46 (continued) Note that in this case, because the message is short and the bandwidth is high, the dominant factor is the propagation time, not the transmission time. The transmission time can be ignored. 3.287 Example 3.47 What are the propagation time and the transmission time for a 5-Mbyte message (an image) if the bandwidth of the network is 1 Mbps? Assume that the distance between the sender and the receiver is 12,000 km and that light travels at 2.4 × 108 m/s. Solution We can calculate the propagation and transmission times as shown on the next slide. 3.288 Example 3.47 (continued) Note that in this case, because the message is very long and the bandwidth is not very high, the dominant factor is the transmission time, not the propagation time. The propagation time can be ignored. 3.289 Queuing Delay: Time needed by each intermediate or end device to hold the message before it can be processed. Processing Delay: Time needed to process the message. 290 4. Bandwidth-Delay Product: Defines the number of bits that can fill the link. 291 Figure 3.31 Filling the link with bits for case 1 3.292 Figure 3.32 Filling the link with bits in case 2 5 We can think about the link between two points as a pipe. The cross section of the pipe represents the bandwidth, and the length of the pipe represents the delay. We can say the volume of the pipe defines the bandwidth-delay product, as shown in Figure 3.33. Figure 3.33 Concept of bandwidth-delay product 3.295 5. Jitter  Another performance issue that is related to delay is jitter.  Jitter is a problem if different packets of data encounter different delays and the application using the data at the receiver site is time-sensitive (audio and video data, for example). 296 THANK YOU 310

Use Quizgecko on...
Browser
Browser