Computer Networks Fundamentals PDF

Document Details

Uploaded by Deleted User

علي نافع

Tags

computer networks computer network fundamentals networking computer science

Summary

This document provides a foundational understanding of computer networks, covering topics such as computer networks, business applications, and mobile users. It discusses different uses and applications in various contexts.

Full Transcript

‫الكلية التقنية الهندسية الكهربائية‬ ‫قسم هندسة تقنيات الحاسوب‬ ‫‪Computer Networks Fundamentals‬‬ ‫أسس شبكات الحاسوب‬ ‫مدرس المادة ‪ :‬علي نافع‬ ‫‪1‬‬ 1. Introduction to Computer Networks Fundamentals The computer network means a collection of autonom...

‫الكلية التقنية الهندسية الكهربائية‬ ‫قسم هندسة تقنيات الحاسوب‬ ‫‪Computer Networks Fundamentals‬‬ ‫أسس شبكات الحاسوب‬ ‫مدرس المادة ‪ :‬علي نافع‬ ‫‪1‬‬ 1. Introduction to Computer Networks Fundamentals The computer network means a collection of autonomous computers interconnected by a single technology. Two computers are said to be interconnected if they are able to exchange information. The connection need not be via a copper wire; fiber optics, microwaves, infrared, and communication satellites can also be used. Networks come in many sizes and shapes. They are usually connected together to make larger networks, with the Internet being the most well-known example of a network of networks. 1.1 Uses of Computer Networks Early data networks were limited to exchanging character-based information between connected computer systems. Current networks have evolved to carry voice, video streams, text, and graphics between many different types of devices. We will start with traditional uses at companies, then move on to home networking and recent developments regarding mobile users, and finish with social issues. 1.1.1 Business Applications In the simplest of terms, one can imagine a company’s information system as consisting of one or more databases with company information and some number of employees who need to access them remotely. In this model, the data are stored on powerful computers called servers. Often these are centrally housed and maintained by a system administrator. In contrast, the employees have simpler machines, called clients, on their desks, with which they access remote data, for example, to include in spreadsheets they are constructing. In the client/server model, the device requesting the information is called a client and the device responding 2 to the request is called a server. The client and server machines are connected by a network, as illustrated in Figure 1.1. Figure 1-1. A network with two clients and one server. The most popular realization is that of a Web application, in which the server generates Web pages based on its database in response to client requests that may update the database. The client-server model is applicable when the client and server are both in the same building (and belong to the same company), but also when they are far apart. If we look at the client-server model in detail, we see that two processes (i.e., running programs) are involved, one on the client machine and one on the server machine. Communication takes the form of the client process sending a message over the network to the server process. The client process then waits for a reply message. When the server process gets the request, it performs the requested work or looks up the requested data and sends back a reply. These messages are shown in Figure 1.2. Figure 1-2. The client-server model involves requests and replies. 3 1.1.2 Home Applications Internet access provides home users with connectivity to remote computers. Much of this information is accessed using the client-server model, but there is different, popular model for accessing information that goes by the name of Peer-to-Peer communication. In a peer-to-peer network, two or more computers are connected via a network and can share resources (such as printers and files) without having a dedicated server. Every connected end device (known as a peer) can function as either a server or a client. One computer might assume the role of server for one transaction while simultaneously serving as a client for another. In this form, individuals who form a loose group can communicate with others in the group, as shown in Figure. 1-3. Every person can, in principle, communicate with one or more other people; there is no fixed division into clients and servers. Figure 1-3. In a peer-to-peer system there are no fixed clients and servers. Unlike the client/server model, which uses dedicated servers, peer- to-peer networks decentralize the resources on a network. Instead of locating information to be shared on dedicated servers, information can be located anywhere on any connected device. Because peer-to-peer networks usually do not use centralized user accounts, permissions, or monitors, it is difficult to enforce security and access policies in networks 4 containing more than just a few computers. User accounts and access rights must be set individually on each peer device. 1.1.3 Mobile Users People on the go often want to use their mobile devices to read and send email, tweet, watch movies, download music, play games, or simply to surf the Web for information. Connectivity to the Internet enables many of these mobile uses. Since having a wired connection is impossible in cars, boats, and airplanes, there is a lot of interest in wireless networks. Cellular networks operated by the telephone companies are one familiar kind of wireless network that blankets us with coverage for mobile phones. Wireless hotspots based on the 802.11 standard are another kind of wireless network for mobile computers. 1.1.4 Social Issues Social networks, message boards, content sharing sites, and a host of other applications allow people to share their views with like-minded individuals. As long as the subjects are restricted to technical topics or hobbies like gardening, not too many problems will arise. These problems such as Copyright, versus, cookies, spam, …etc. 1.2 Networks A network is a set of devices (often referred to as nodes) connected by communication links. A node can be a computer, printer, or any other device capable of sending and/or receiving data generated by other nodes on the network. Most networks use distributed processing, in which a task is divided among multiple computers. Instead of one single large machine being responsible for all aspects of a process, separate computers (usually a personal computer or workstation) handle a subset. 5 1.2.1 The Elements of Computer Network The Figure 1.4 shows elements of a typical network, including devices, medium, rules, and messages. Figure 1-4. The main components of computer network. Networking is a very graphically oriented subject, and icons are commonly used to represent networking devices. There are many of common networking devices that are used to networking as shown in Figure 1.5. Figure 1-5. Common Networking Symbols. On the left side of the figure are shown some common devices which often originate messages that comprise our communication. These include 6 various types of computers (a PC and laptop icon are shown), servers, and IP phones. On local area networks these devices are typically connected by LAN media (wired or wireless). The right side of the figure shows some of the most common intermediate devices, used to direct and manage messages across the network, as well as other common networking symbols. Generic symbols are shown for:  Switch - the most common device for interconnecting local area networks.  Firewall -provides security to networks.  Router - helps direct messages as they travel across a network.  Wireless Router - a specific type of router often found in home networks.  Cloud - used to summarize a group of networking devices, the details of which may be unimportant to the discussion at hand.  Serial Link - one form of WAN interconnection, represented by the lightning bolt-shaped line. For a network to function, the devices must be interconnected. Network connections can be wired or wireless. In wired connections, the medium is either copper, which carries electrical signals, or optical fiber, which carries light signals. In wireless connections, the medium is the Earth's atmosphere, or space, and the signals are microwaves. Devices interconnected by medium to provide services must be governed by rules, or protocols. The Protocols are the rules that the networked devices use to communicate with each other. The industry standard in networking today is a set of protocols called TCP/IP (Transmission Control Protocol/Internet Protocol). 7 1.2.2 Data Flow Communication between two devices can be simplex, half-duplex, or full-duplex as shown in Figure 1.6. Figure 1-6. Data flow (simplex, half-duplex, and full-duplex) 1. Simplex: In simplex mode, the communication is unidirectional, as on a one-way street. Only one of the two devices on a link can transmit; the other can only receive. Keyboards and traditional monitors are examples of simplex devices. 2. Half-Duplex: In half-duplex mode, each device can both transmit and receive, but not at the same time. When one device is sending, the other can only receive, and vice versa. The half-duplex mode is used in cases where there is no need for communication in both directions at the same time; the entire capacity of the channel can be utilized for each direction. 3. In full-duplex mode, both stations can transmit and receive simultaneously. In full-duplex mode, signal going in one direction share 8 the capacity of the link: with signals going in the other direction. This sharing can occur in two ways: Either the link must contain two physically separate transmission paths, one for sending and the other for receiving; or the capacity of the channel is divided between signals traveling in both directions. One common example of full-duplex communication is the telephone network. When two people are communicating by a telephone line, both can talk and listen at the same time. 1.2.3 Network Criteria A network must be able to meet a certain number of criteria. The most important of these are performance, reliability, and security. A) Performance Performance can be measured in many ways, including transit time and response time. Transit time is the amount of time required for a message to travel from one device to another. Response time is the elapsed time between an inquiry and a response. The performance of a network depends on a number of factors, including the number of users, the type of transmission medium, the capabilities of the connected hardware, and the efficiency of the software. Performance is often evaluated by two networking metrics: throughput and delay. We often need more throughput and less delay. However, these two criteria are often contradictory. If we try to send more data to the network, we may increase throughput but we increase the delay because of traffic congestion in the network. B) Reliability In addition to accuracy of delivery, network reliability is measured by the frequency of failure, the time it takes a link to recover from a failure, and the network's robustness in a disaster. 9 C) Security Network security issues include protecting data from unauthorized access, protecting data from damage and development, and implementing policies and procedures for recovery from breaches and data losses. 10 1.3 Categories of Networks Today networks can be classified based on different factors: connection type, topology, and distance. 1.3.1 Classifications Based on Type of Connection A network is two or more devices connected through links. A link is a communications pathway that transfers data from one device to another. There are two possible types of connections: point-to-point and multipoint.  Point-to-Point: A point-to-point connection provides a dedicated link between two devices. The entire capacity of the link is reserved for transmission between those two devices (see Figure 1.7.a). When you change television channels by infrared remote control, you are establishing a point-to-point connection between the remote control and the television's control system. Point-to-point transmission with exactly one sender and exactly one receiver is sometimes called unicasting.  Multipoint network (also called broadcast): the communication channel is shared by all the machines on the network; packets sent by any machine are received by all the others (see Figure 1.7.b). An address field within each packet specifies the intended recipient. Upon receiving a packet, a machine checks the address field. If the packet is intended for the receiving machine, that machine processes the packet; if the packet is intended for some other machine, it is just ignored. Figure 1-7. Type of Connection 1.3.2 Classifications Based on Topology The topology of a network is the geometric representation of the relationship of all the links to one another. There are four basic topologies possible: mesh, bus, star, and ring. A) Mesh: In a mesh topology, every device has a dedicated point-to-point link to every other device. The term dedicated means that the link carries traffic only between the two devices it connects (see Figure 1.8). To find the number of physical links in a fully connected mesh network with n nodes, we first consider that each node must be connected to every other node. Node 1 must be connected to n - 1 nodes, node 2 must be connected to n – 1 nodes, and finally node n must be connected to n - 1 nodes. We need n(n - 1) physical links. However, if each physical link allows communication in both directions (duplex mode), we can divide the number of links by 2. In other words, we can say that in a mesh topology, we need n(n - 1)/2. Figure 1-8. A fully connected mesh topology (five devices) A mesh offers several advantages over other network topologies. First, the use of dedicated links guarantees that each connection can carry its own data load, thus eliminating the traffic problems that can occur when links must be shared by multiple devices. Second, a mesh topology is robust. If one link becomes unusable, it does not incapacitate the entire system. Third, there is the advantage of privacy or security. When every message travels along a dedicated line, only the intended recipient sees it The main disadvantages of a mesh are related to the amount of cabling and the number of I/O ports required, because every device must be connected to every other device, installation and reconnection are difficult. For these reasons a mesh topology is usually implemented in a limited fashion. B) Bus Topology Nodes are connected to the bus cable by drop lines and taps. A drop line is a connection running between the device and the main cable. A tap is a connector that either connection into the main cable or punctures of a cable to create contact with the metallic core. A bus topology, on the other hand, is multipoint. One long cable acts as a backbone to link all the devices in a network (see Figure 1.9). Figure 1-9 A bus topology connecting four stations. Advantages of a bus topology include ease of installation. Backbone cable can be put along the most efficient path, then connected to the nodes by drop lines of various lengths. In this way, a bus uses less cabling than mesh or star topologies. Disadvantages include difficult reconnection and fault isolation. A bus is usually designed to be optimally efficient at installation. It can therefore be difficult to add new devices. Adding new devices may therefore require modification or replacement of the backbone. C) Star Topology In a star topology, each device has a dedicated point-to-point link only to a central controller, usually called a hub. The devices are not directly linked to one another. The controller acts as an exchange: If one device wants to send data to another, it sends the data to the controller, which then Transfers the data to the other connected device (see Figure 1.10). Figure 1-10. A star topology connecting six stations. A star topology is less expensive than a mesh topology. In a star, each device needs only one link and one I/O port to connect it to any number of others. This factor also makes it easy to install and reconfigure. Other advantages include robustness. If one link fails, only that link is affected. All other links remain active. This factor also lends itself to easy fault identification and fault isolation. the hub can be used to monitor link problems. One big disadvantage of a star topology is the dependency of the whole topology on one single point )hub(. If the hub goes down, the whole system is dead. D) Ring Topology In a ring topology, each device has a dedicated point-to-point connection with only the two devices on either side of it. A signal is passed along the ring in one direction, from device to device, until it reaches its destination. Each device in the ring incorporates a repeater. When a device receives a signal intended for another device, its repeater regenerates the bits and passes them along (see Figure 1.11). Figure 1-11. A ring topology connecting six stations. A ring is relatively easy to install and reconfigure. Each device is linked to only its immediate neighbors (either physically or logically). To add or delete a device requires changing only two connections. The only constraints are media and traffic considerations (maximum ring length and number of devices). In addition, fault isolation is simplified. Generally, in a ring, a signal is circulating at all times. If one device does not receive a signal within a specified period, it can issue an alarm. The alarm alerts the network operator to the problem and its location. However, unidirectional traffic can be a disadvantage. In a simple ring, a break in the ring (such as a disabled station) can disable the entire network. This weakness can be solved by using a dual ring or a switch capable of closing off the break. E) Hybrid Topology A hybrid topology is a type of network topology that uses two or more differing network topologies. These topologies include a mix of bus topology, mesh topology, ring topology, star topology, and tree topology. For example, we can have a main star topology with each branch connecting several stations in a bus topology as shown in Figure 1.12. Figure 1-12. A hybrid topology: a star backbone with three bus networks. 1.3.3 Classifications Based on Distance Distance is important as a classification metric because different technologies are used at different scales. The Table (1.1) display the classification of multiple processor systems by their rough physical size. At the top are the personal area networks, networks that are meant for one person. Beyond these come longer-range networks. These can be divided into local, metropolitan, and wide area networks, each with increasing scale. Finally, the connection of two or more networks is called an internetwork. Table (1.1): Classification of interconnected processors by scale. A) Personal Area Networks PANs (Personal Area Networks) let devices communicate over the range of a person. A common example is a wireless network that connects a computer with its peripherals. Almost every computer has an attached monitor, keyboard, mouse, and printer. Without using wireless, this connection must be done with cables, some companies got together to design a short-range wireless network called Bluetooth to connect these components without wires (See Figure 1.13). Figure 1-13. Bluetooth PAN configuration. B) Local Area Network A local area network (LAN) is usually privately owned and links the devices in a single office, building, or campus (see Figure 1.14). Currently, LAN size is limited to a few kilometers. Figure 1-14. Example of LAN networking. LANs are designed to allow resources to be shared between personal computers or workstations. The resources to be shared can include hardware (e.g., a printer), software (e.g., an application program), or data. Software can be stored on this central server and used as needed by the whole group. In this example, the size of the LAN may be determined by licensing restrictions on the number of users per copy of software, or by restrictions on the number of users licensed to access the operating system. In general, a given LAN will use only one type of transmission medium. The most common LAN topologies are bus, ring, and star. C) Wide Area Network A wide area network (WAN) provides long-distance transmission of data, image, audio, and video information over large geographic areas that may comprise a country, a continent, or even the whole world. A WAN can be as complex as the backbones that connect the Internet or as simple as a dial-up line that connects a home computer to the Internet (Figure 1.15). Figure 1-15. Example of WAN networking. D) Metropolitan Area Networks A metropolitan area network (MAN) is a network with a size between a LAN and a WAN. It normally covers the area inside a town or a city. It is designed for customers who need a high-speed connectivity, normally to the Internet, and have endpoints spread over a city or part of city. A good example of a MAN is the part of the telephone company network that can provide a high-speed DSL line to the customer. Another example is the cable TV network that originally was designed for cable TV, but today can also be used for high-speed data connection to the Internet. The OSI Model OBJECTIVES To discuss the idea of multiple layering in data communication and networking and the interrelationship between layers. To discuss the OSI model and its layer architecture and to show the interface between the layers. To briefly discuss the functions of each layer in the OSI model. Introduction The layered model that dominated data communication and networking literature before 1990 was the Open Systems Interconnection (OSI) model. Everyone believed that the OSI model would become the ultimate standard for data communications—but this did not happen. The TCP/IP protocol suite became the dominant commercial architecture because it was used and tested extensively in the Internet; the OSI model was never fully implemented. PROTOCOL LAYERS A protocol is required when two entities need to communicate. When communication is not simple, we may divide the complex task of communication into several layers. Example (face to face) Assume Maria and Ann are neighbors with a lot of common ideas. 2 Example ( Different Cities) Now assume that Ann has to move to another town because of her job. Protocol Hierarchies To reduce their design complexity, most networks are organized as a stack of layers or levels, each one built upon the one below it. The purpose of each layer is to offer certain services to the higher layers while shielding those layers from the details of how the offered services are actually implemented. In reality, no data are directly transferred from layer n on one machine to layer n on another machine. 3 Between machines, layer x on one machine logically communicates with layer x on another machine. THE OSI MODEL This model is based on a proposal developed by the International Standards Organization (ISO) as a first step toward international standardization of the protocols used in the various layers. The model is called the Open Systems Interconnection (OSI) Reference Model because it deals with connecting open systems. It was first introduced in the late 1970s. An open system is a set of protocols that allows any two different systems to communicate regardless of their underlying architecture. 4 The purpose of the OSI model is to show how to facilitate communication between different systems without requiring changes to the logic of the underlying hardware and software. The OSI model is not a protocol; it is a model for understanding and designing a network architecture that is flexible, robust, and interoperable. The OSI model is a layered framework for the design of network systems that allows communication between all types of computer systems. It consists of seven separate but related layers, each of which defines a part of the process of moving information across a network. Layered Architecture As the message travels from A to B, it may pass through many intermediate nodes. These intermediate nodes usually involve only the first three layers of the OSI model. 5 Each layer defines a family of functions distinct from those of the other layers. Within a single machine, each layer calls upon the services of the layer just below it. Layer 3, for example, uses the services provided by layer 2 and provides services for layer 4. Interfaces between Layers: Each interface defines what information and services a layer must provide for the layer above it. The upper OSI layers are almost always implemented in software; lower layers are a combination of hardware and software, except for the physical layer, which is mostly hardware. 6 Encapsulation The process starts at layer 7 (the application layer), then moves from layer to layer in descending, sequential order. At each layer, a header can be added to the data unit. At layer 2, a trailer may also be added. When the formatted data unit passes through the physical layer (layer 1), it is changed into an electromagnetic signal and transported along a physical link. Physical Layer (1) The physical layer coordinates the functions required to carry a bit stream over a physical medium. It deals with the mechanical and electrical specifications of the interface and transmission media. It also defines the procedures and functions that physical devices and interfaces have to perform for transmission to occur.  Physical characteristics of interfaces and media. 7 o The physical layer defines the characteristics of the interface between the devices and the transmission media. o It also defines the type of transmission media.  Representation of bits. o To be transmitted, bits must be encoded into signals—electrical or optical. The physical layer defines the type of encoding (how 0s and 1s are changed to signals).  Data rate. o The transmission rate—the number of bits sent each second.  Synchronization of bits. o the sender and the receiver clocks must be synchronized.  Line configuration (point-to-point, multipoint).  Physical topology (mesh, bus, star, ring)  Transmission mode (simplex mode, half-duplex, full-duplex) Data Link Layer (2) Hop-to-hop The data link layer transforms the physical layer, a raw transmission facility, to a reliable link. It makes the physical layer appear error-free to the upper layer (network layer).  Framing. The data link layer divides the stream of bits received from the network layer into manageable data units called frames.  Physical addressing. If frames are to be distributed to different systems on the network, the data link layer adds a header to the frame to define the sender and/or receiver of the frame. If the frame is intended for a system outside the sender’s network, the receiver address is the address of the connecting device that connects the network to the next one. 8  Flow control. o If the rate at which the data is absorbed by the receiver is less than the rate produced at the sender, the data link layer imposes a flow control mechanism to prevent overwhelming the receiver.  Error control. o The data link layer adds reliability to the physical layer by adding mechanisms to detect and retransmit damaged or lost frames. It also uses a mechanism to recognize duplicate frames. Error control is normally achieved through a trailer added to the end of the frame.  Access control. o When two or more devices are connected to the same link, data link layer protocols are necessary to determine which device has control over the link at any given time. Network Layer (3) The network layer is responsible for the source-to-destination delivery of a packet, possibly across multiple networks (links). Whereas the data link layer oversees the delivery of the packet between two systems on the same network (link), the network layer ensures that each packet gets from its point of origin to its final destination. If two systems are connected to the same link, there is usually no need for a network layer. However, if the two systems are attached to different networks (links) with connecting devices between the networks (links), there is often a need for the network layer to accomplish source-to-destination delivery.  Logical addressing. o The physical addressing implemented by the data link layer handles the addressing problem locally. If a packet passes the network boundary, we need another addressing system to help distinguish the source and destination systems. The network layer adds a header to the packet coming from the upper layer that, among other things, includes the logical addresses of the sender and receiver.  Routing. o When independent networks or links are connected together to create internetworks (network of networks) or a large network, the connecting 9 devices (called routers or switches) route or switch the packets to their final destination. One of the functions of the network layer is to provide this mechanism. Transport Layer(4) The transport layer is responsible for process-to-process delivery of the entire message. A process is an application program running on the host. The transport layer, ensures that the whole message arrives intact and in order.  Service-point addressing. o The transport layer header must add a type of address called a service- point address (or port address). The network layer gets each packet to the correct computer; the transport layer gets the entire message to the correct process on that computer.  Segmentation and reassembly. o A message is divided into transmittable segments, with each segment containing a sequence number. These numbers enable the transport layer to reassemble the message correctly upon arriving at the destination and to identify and replace packets that were lost in transmission.  Connection control. o The transport layer can be either connectionless or connection-oriented.  Flow control. o Like the data link layer, the transport layer is responsible for flow control. However, flow control at this layer is performed end to end rather than across a single link.  Error control. o Like the data link layer, the transport layer is responsible for error control. However, error control at this layer is performed process-to- process rather than across a single link. Error correction is usually achieved through retransmission. Session Layer(5) The session layer is the network dialog controller. It establishes, maintains, and synchronizes the interaction between communicating systems.  Dialog control. 10 The session layer allows two systems to enter into a dialog. It allows the communication between two processes to take place in either half-duplex or full-duplex mode.  Synchronization. The session layer allows a process to add checkpoints (synchronization points) into a stream of data. For example, if a system is sending a file of 2,000 pages, it is advisable to insert checkpoints after every 100 pages to ensure that each 100-page unit is received and acknowledged independently. In this case, if a crash happens during the transmission of page 523, the only pages that need to be resent after system recovery are pages 501 to 523. Pages previous to 501 need not be resent. Presentation Layer (6) The presentation layer is concerned with the syntax and semantics of the information exchanged between two systems.  Translation. o The presentation layer is responsible for interoperability between these different encoding methods. o The presentation layer at the sender changes the information from its sender-dependent format into a common format. The presentation layer at the receiving machine changes the common format into its receiver- dependent format.  Encryption.  Compression. Application Layer (7) The application layer enables the user, whether human or software, to access the network. It provides user interfaces and support for services such as electronic mail, remote file access and transfer, shared database management, and other types of distributed information services. 11 Summary of OSI Layers 12 TCP/IP PROTOCOL SUITE The first layered protocol model for internetwork communications was created in the early 1970s and is referred to as the Internet model. It defines four categories of functions that must occur for communications to be successful. The architecture of the TCP/IP protocol suite follows the structure of this model. Because of this, the Internet model is commonly referred to as the TCP/IP model. The TCP/IP protocol suite was developed prior to the OSI model. Therefore, the layers in the TCP/IP protocol suite do not match exactly with those in the OSI model. The original TCP/IP protocol suite was defined as four software layers built upon the hardware. 2 Today, TCP/IP is thought of as a five-layer model with the layers named similarly to the ones in the OSI model. Comparison between OSI and TCP/IP Protocol Suite Here, two layers, session and presentation, are missing from the TCP/IP protocol suite. These two layers were not added to the TCP/IP protocol suite after the publication of the OSI model. The application layer in the suite is usually considered to be the combination of three layers in the OSI model. 3 Two reasons were mentioned for this decision. First, TCP/IP has more than one transport-layer protocol. Some of the functionalities of the session layer are available in some of the transport layer protocols. Second, the application layer is not only one piece of software. Many applications can be developed at this layer. If some of the functionalities mentioned in the session and presentation are needed for a particular application, it can be included in the development of that piece of software. Layers in the TCP/IP Protocol Suite  When we study the purpose of each layer, it is easier to think of a private internet, instead of the global Internet. Such an internet is made up of several small networks called links.  A link is a network that allows a set of computers to communicate with each other. A link can be a LAN or WAN.  Our imaginary internet that is used to show the purpose of each layer. Physical Layer (1) TCP/IP TCP/IP does not define any specific protocol for the physical layer. It supports all of the standard and proprietary protocols. At this level, the communication is between two hops or nodes, either a computer or router. 4 The unit of communication is a single bit. When the connection is established between the two nodes, a stream of bits is flowing between them. The physical layer, however, treats each bit individually. We are assuming that at this moment the two computers have discovered that the most efficient way to communicate with each other is via routers R1, R3, and R4. Computer A sends each bit to router R1 in the format of the protocol used by link 1. Router 1 sends each bit to router R3 in the format dictated by the protocol used by link 3. And so on. Note that if a node is connected to n links, it needs n physical-layer protocols, one for each link. Data Link Layer (2) TCP/IP TCP/IP does not define any specific protocol for the data link layer either. It supports all of the standard and proprietary protocols. At this level, the communication is also between two hops or nodes. The unit of communication however, is a packet called a frame. A frame is a packet that encapsulates the data received from the network layer with an added header and sometimes a trailer. The head includes the source and destination of frame. The destination address is needed to define the right recipient of the frame. The source address is needed for possible response or acknowledgment as may be required by some protocols. 5 Note that the frame that is travelling between computer A and router R1 may be different from the one travelling between router R1 and R3. When the frame is received by router R1, this router passes the frame to the data link layer protocol (left). The frame is opened, the data are removed. The data are then passed to the data link layer protocol (right) to create a new frame to be sent to the router R3. Network Layer(3) TCP/IP At the network layer (or, more accurately, the internetwork layer), TCP/IP supports the Internet Protocol (IP). The Internet Protocol (IP) is the transmission mechanism used by the TCP/IP protocols. IP transports data in packets called Datagrams, each of which is transported separately. Datagrams can travel along different routes and can arrive out of sequence or be duplicated. IP does not keep track of the routes and has no facility for reordering datagrams once they arrive at their destination. Note that there is a main difference between the communication at the network layer and the communication at data link or physical layers: 6 Communication at the network layer is end to end while the communication at the other two layers are node to node. The datagram started at computer A is the one that reaches computer B. The network layers of the routers can inspect (check) the source and destination of the packet for finding the best route, but they are not allowed to change the contents of the packet. Transport Layer (4) TCP/IP There is a main difference between the transport layer and the network layer. Although all nodes in a network need to have the network layer, only the two end computers need to have the transport layer. The network layer is responsible for sending individual datagrams from computer A to computer B; the transport layer is responsible for delivering the whole message, which is called a Segment, a user datagram, or a packet, from A to B. A segment may consist of a few or tens of datagrams. The segments need to be broken into datagrams and each datagram has to be delivered to the network layer for transmission. Since the Internet defines a different route for each datagram, the datagrams may arrive out of order and may be lost. The transport layer at computer B needs to wait until all of these datagrams to arrive, assemble them and make a segment out of them. Traditionally, the transport layer was represented in the TCP/IP suite by two protocols: 1- Transmission Control Protocol (TCP): is a reliable connection- oriented protocol that allows a byte stream originating on one machine to be delivered without error on any other machine in the 7 internet. TCP also handles flow control to make sure a fast sender cannot swamp a slow receiver with more messages than it can handle. 2- User Datagram Protocol (UDP): UDP is an unreliable, connectionless protocol for applications that do not want TCP’s sequencing or flow control and wish to provide their own. It is 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. Its advantage low overhead. Application Layer (5) TCP/IP The application layer in TCP/IP is equivalent to the combined session, presentation, and application layers in the OSI model. The application layer allows a user to access the services of our private internet or the global Internet. Many protocols are defined at this layer to provide services such as electronic mail, file transfer, accessing the World Wide Web, and so on. Note that the communication at the application layer, like the one at the transport layer, is end to end. A message generated at computer A is sent to computer B without being changed during the transmission. 8 ADDRESSING Four levels of addresses are used in an internet employing the TCP/IP protocols: physical address, logical address, port address, and application-specific address. Each address is related to a one layer in the TCP/IP architecture: Physical Addresses The physical address, also known as the link address, is the address of a node as defined by its LAN or WAN. It is included in the frame used by the data link layer. It is the lowest-level address. The size and format of these addresses vary depending on the network. For example, Ethernet uses a 6-byte (48-bit) physical address that is imprinted on the network interface card (NIC). LocalTalk (Apple), however, has a 1-byte dynamic address that changes each time the station comes up. 1 Layer 2 addresses are only used to communicate between devices on a single local network Unicast, Multicast, and Broadcast Physical Addresses Physical addresses can be either unicast (one single recipient), multicast (a group of recipients), or broadcast (to be received by all systems in the network). Some networks support all three addresses. Ethernet supports the unicast physical addresses (6 bytes), the multicast addresses, and the broadcast addresses. Some networks do not support the multicast or broadcast physical addresses. Logical Addresses Logical addresses are necessary for universal communications that are independent of underlying physical networks. Physical addresses are not adequate in an internetwork environment where different networks can have different address formats. A universal addressing system is needed in which each host can be identified uniquely, regardless of the underlying physical network. The logical addresses are designed for this purpose. 2 A logical address in the Internet is currently a 32-bit address that can uniquely define a host connected to the Internet. No two publicly addressed and visible hosts on the Internet can have the same IP address. The network layer, however, needs to find the physical address of the next hop before the packet can be delivered. The network Layer consults its routing table and finds the logical address of the next hop to be F. Another protocol, Address Resolution Protocol (ARP), finds the physical address of router 1 that corresponds to its logical address (20). 3 Unicast, Multicast, and Broadcast Addresses The logical addresses can be either unicast (one single recipient), multicast (a group of recipients), or broadcast (all systems in the network). There are limitations on broadcast addresses. Port Addresses Computers are devices that can run multiple processes at the same time. The end objective of Internet communication is a process communicating with another process. For example, computer A can communicate with computer C by using TELNET. At the same time, computer A communicates with computer B by using the File Transfer Protocol (FTP). For these processes to receive data simultaneously, we need a method to label the different processes. In the TCP/IP architecture, the label assigned to a process is called a port address. A port address in TCP/IP is 16 bits in length. 4 Port address is a 16-bit address represented by one decimal number as shown. 753 A 16-bit port address represented as one single number Some of these Addresses are:  Domain Name System (DNS) - TCP/UDP Port 53  Hypertext Transfer Protocol (HTTP) - TCP Port 80  Simple Mail Transfer Protocol (SMTP) - TCP Port 25  Post Office Protocol (POP) - UDP Port 110 Telnet - TCP Port 23  Dynamic Host Configuration Protocol - UDP Port 67  File Transfer Protocol (FTP) - TCP Ports 20 and 21 Application-Specific Addresses Some applications have user-friendly addresses that are designed for that specific application. Examples include the e-mail address (for example, [email protected]) and the Universal Resource Locator (URL) (for example, www.mhhe.com). The first defines the recipient of an e-mail; the second is used to find a document on the World Wide Web. These addresses, however, get changed to the corresponding port and logical addresses by the sending computer. 5

Use Quizgecko on...
Browser
Browser