Computer Networks 1 Lectures PDF

Summary

These lecture notes cover fundamental concepts of computer networks, including the purpose, components, classification criteria, data flow, and transmission media. The notes introduce key ideas and historical context.

Full Transcript

COMPUTER NETWORKS 1 Dr. Yaser Asem REFERENCES  Data communication and networking, Behrouz Forouzan.  TCP/IP protocol suite, Behrouz Forouzan.  Computer Networks and Internets, Douglas E. Comer. Contents Purpose of Computer Networking Components of Compu...

COMPUTER NETWORKS 1 Dr. Yaser Asem REFERENCES  Data communication and networking, Behrouz Forouzan.  TCP/IP protocol suite, Behrouz Forouzan.  Computer Networks and Internets, Douglas E. Comer. Contents Purpose of Computer Networking Components of Computer Networks Classification criteria Data flow Transmission media 3 ‫عقدة سبوتنك و نشأة مفهوم الشبكات‬ ‫ مع ظهور الحاسب اآللي الشخصي ‪ PC‬وانتشاره بين االفراد‬ ‫والمؤسسات تبين أن عملية المشاركة في البيانات ليست سهلة‪.‬‬ ‫ في ‪ 4‬أكتوبر ‪ 1957‬أطلق االتحاد السوفيتي سبوتنك‪«.1-‬سبوتنك»‬ ‫هو اسم مركبة الفضاء التي طاف بها السوفيتي يوري غاغارين‪ ،‬أول‬ ‫رائد فضاء في العالم‪ ،‬حول الكرة األرضية‪.‬كانت تلك مفاجأة غير‬ ‫متوقعة بالنسبة للواليات المتحدة األمريكية‪ ،‬التي أذهلها أن منافسها‬ ‫العنيد في الحرب الباردة‪ ،‬أي االتحاد السوفيتي‪ ،‬تمكن من إطالق اول‬ ‫مركبة فضاء‪.‬‬ ‫ جرت دراسات معمقة في الواليات المتحدة األمريكية يومها لمعرفة‬ ‫السبب في ذلك‪ ،‬وتطلب ذلك مراجعة شاملة للكثير من الخطط‬ ‫‪4‬‬ ‫والبرامج‪ ،‬وفي مقدمتها اعادة النظر في نظام التعليم األمريكي‪.‬‬ ‫عقدة سبوتنك و نشأة مفهوم الشبكات‬ ‫‪ ‬أزمة سبوتنك كانت نقطة تحول في الحرب الباردة‪ ،‬هذا الحدث‬ ‫أثار صدمة في الواليات المتحدة األمريكية‪ ،‬حيث اعتقد‬ ‫السياسيون هناك بالتفوق األمريكي في أبحاث الفضاء وعلوم‬ ‫الصواريخ‪ ،‬لكن هذا السبق الذي حققه السوفييت‪ ،‬أثبت خالف‬ ‫ذلك‪.‬‬ ‫‪ ‬ردت الواليات المتحدة بتأسيس (وكالة مشروع األبحاث‬ ‫المتطورة) )‪(ARPA‬بتمويل من وزارة الدفاع األمريكية‪.‬‬ ‫‪ 1967 ‬تم تقديم أول ورقة تصميم عن ‪ARPAnet‬إلجراء‬ ‫بحوث عن الشبكات‪.‬‬ WHAT IS A COMPUTER NETWORK?  Itis a group of Autonomous Computers and Peripherals that are interconnected to allow users to share resources and other devices connected to a network.  Two computers are considered connected if they are able to exchange information between each other.  There is no device controlling the network so that if it breaks all other devices capabilities are disrupted. 6 A COMPUTER NETWORK MODEL 7 THE PURPOSE OF COMPUTER NETWORKING 1. File and Data Sharing: With networking, files can be shared instantaneously across the network, whether with one user or with hundreds. Employees across departments can collaborate on documents, exchange background material, revise spreadsheets and make simultaneous additions and updates to a single central customer database without generating conflicting versions. 2. Resource Sharing: Computer networking allows the sharing of network resources, such as printers, dedicated servers, backup systems, input devices and Internet connections. 8 THE PURPOSE OF COMPUTER NETWORKING 3. Data Protection and Redundancy: Networking computers together allows users to distribute copies of important information across multiple locations, ensuring essential information isn't lost with the failure of any one computer in the network. 4. Ease of Administration: IT officers and computer network administrators love network systems because they allow the IT professional to maintain uniform versions of software, protocols and security measures across hundreds or thousands of computers from one management station. 9 THE PURPOSE OF COMPUTER NETWORKING 5. Internal Communications: Computer networking allows organizations to maintain internal communications systems. Emails can be instantaneously delivered to all users, employees can coordinate meetings and work activities that maximize effectiveness. 6. Distributing Computing Power: Organizations that need extraordinary computing power benefit from computer networking by distributing computational tasks across multiple computers throughout the network. 10 Contents Purpose of Computer Networking Components of Computer Networks Classification criteria Data flow Transmission media 11 MAIN COMPONENTS OF COMPUTER NETWORKS ‫جهاز مضيف‬ Host ‫عقدة اتصال‬ ‫خطوط اتصال‬ ‫شبكة االتصال‬ Terminal Controller ‫شبكة املستخدم‬ Terminals 12 MAIN COMPONENTS OF COMPUTER NETWORKS A computer network consists of a set of special devices and data transmission media:  Database and application hosts  Terminals  Terminal controllers  Transmission Lines  Message switching devices 13 MAIN COMPONENTS OF COMPUTER NETWORKS mode NONIC m S Printer NIC The minimum components for any computer network must not be less than: Two computer systems Network Interface Card (NIC) Communication protocol Network operating system 14 MAIN COMPONENTS OF COMPUTER NETWORKS 1. Main Server  It manages the network and organizes the sharing of resources in it  It has high processing and storage capabilities with large RAM  Contains network operating system software to control network operations  It also contains application software. 2. Work Stations o Personal user computers that have limited capabilities. o Each station is assigned to a specific user through a single address according to the address of the network card NIC. 16 MAIN COMPONENTS OF COMPUTER NETWORKS 3. Network Resources  Peripherals that connect to the main service device or workstations to perform a specific service.  Includes all types of printers, plotters, storage devices, and modems. 4. Transmission media o They are channels through which signals are transmitted between network components. o It includes wired and wireless media. 17 MAIN COMPONENTS OF COMPUTER NETWORKS 5. Connection devices  Connect network components in order to expand their geographical reach.  include Hubs, Repeaters, Bridges, Routers, and Gateways. 6. Network software o The NOS network driver is inside the main server and is responsible for the task of managing the network. o Drivers for peripheral devices. o Application software 18 Contents Purpose of Computer Networking Components of Computer Networks Classification criteria Data flow Transmission media 19 COMPUTER NETS. CLASSIFICATION CRITERIA  Computer Nets. can be classified according to:  Network control center.  Method of accessing resources.  Geographical scope.  Management.  Network Topology.  The communication medium. 20 1. ACCORDING TO NETWORK CONTROL CENTER A. Centralized Network  It contains a large mainframe computer called the host.  The host is responsible for most of the processing and control of network resources.  The rest of the devices are small workstations. Host Computer 21 1. ACCORDING TO NETWORK CONTROL CENTER B. Distributed Network  A group of computers that connect to each other and share everything.  Devices in this type of network take turns controlling network resources among themselves. 22 2. ACCORDING TO THE METHOD OF ACCESSING RESOURCES A. Public Network  They are intended for public use and provide public services such as the Internet.  It is owned and operated by a public company or multiple companies that coordinate among each other. B. Private Network  An internal local network of an organization that owns and operates the network.  Any one outside this organization can not access this network unless the organization give him a permission and determines the scope of this permission. 23 3. ACCORDING TO THE GEOGRAPHICAL SCOPE A. Local Area Networks LANs  It is a network of a specific institution that serves a limited geographic area (in one building, for example, or several close buildings or a university campus).  Its ownership belongs to one entity, which increases the flexibility to take any decision regarding it.  Usually, it uses good quality transmission media.  The data transfer rate in these networks is usually high.  The data transmission error rate is very low.  An example of this type of network is the Ethernet. 24 3. ACCORDING TO THE GEOGRAPHICAL SCOPE A. Local Area Networks LANs 25 3. ACCORDING TO THE GEOGRAPHICAL SCOPE B. Wide Area Network WAN  Coverage extends to a very large geographical area that may include multiple countries or the whole world.  It depends on telephone networks as a transmission media, so that, its data transfer rate is low.  The error rate in data transmission is very high.  Need a way to control the flow of data between devices.  The Internet is the biggest WAN network. 26 3. ACCORDING TO THE GEOGRAPHICAL SCOPE B. Wide Area Network WAN 27 3. ACCORDING TO THE GEOGRAPHICAL SCOPE C. Metropolitan Area Network MAN  It is larger than LAN but smaller than WAN.  It may include an entire city or interconnect a group of LANs but it maintains the same LAN structure.  It expands from 10-100 square kilometers.  It has a relatively high data transmission rate (1 Mb/s).  Error data transmission rate is low. 28 3. ACCORDING TO THE GEOGRAPHICAL SCOPE C. Metropolitan Area Network MAN 29 LAN, MAN & WAN 30 4. ACCORDING TO THE MANAGEMENT A. Peer-to-Peer  It contains devices of equal capabilities, all of them are peers to each other.  There is no dedicated device to control the network.  Each computer within the network plays the role of a server that makes its resources available to others, as well as a client that makes use of network resources.  This type of network contains a few numbers of hosts (about 10) 31 4. ACCORDING TO THE MANAGEMENT A. Peer-to-Peer 32 4. ACCORDING TO THE MANAGEMENT  Advantages of peer-to-peer Nets.  Low cost (no servers are needed)  No additional software required for network configuration and setup.  Each user in the network acts as if he is the administrator of the network.  Easy to setup.  Each user is free to choose the level of security in his device. 33 4. ACCORDING TO THE MANAGEMENT  Disadvantages of peer-to-peer Nets.  It can not be expanded to more than 10 hosts.  Each device in the network uses a large percentage of its resources (RAM – hard disk) in order to support the user's access to the available resources across the network.  Low security measures.  Users need training to work efficiently on the devices. 34 4. ACCORDING TO THE MANAGEMENT B. Client/Server Network  This network depends on the presence of one or more servers offering services to other computers.  The server performs the following tasks:  Centrally manage entire network resources.  Determine the level of network security.  Hosting one, some or all of the network services and making them available to the clients.  This type of design is preferred in large networks. 35 4. ACCORDING TO THE MANAGEMENT B. Client/Server Network Server ‫جهاز عميل‬ 36 4. ACCORDING TO THE MANAGEMENT  Advantages of clint-server Nets  High security level.  support a huge number of users.  A network can contain more than one server and each server is dedicated to a specific function, which leads to making these networks have the ability to meet the increasing demands of users 37 4. ACCORDING TO THE MANAGEMENT  Disadvantages of clint-server Nets  This network is more expensive than peer- to-peer network.  Relatively complex in its configuration and operation.  The server needs special software and operating systems to run. 38 5. ACCORDING TO THE NETWORK TOPOLOGY 5. ACCORDING TO THE TOPOLOGY A. Star topology Network  Network devices are connected to a single central point.  This point is a Network Hub or Switch Device.  The electronic signal is transmitted from the sending device through the Hub to all the computers on the network. Hub 40 5. ACCORDING TO THE TOPOLOGY Advantages of Star topology Network  Connection method is easy to be adjusted.  Flexibility to move devices.  Ease of identifying and disconnecting the fault without affecting the rest of the network.  There is no chance of data collision.  New devices can be easily added without network downtime. 41 5. ACCORDING TO THE TOPOLOGY Disadvantages of Star topology Network  This kind of network uses a large amount of wire which increases the cost.  This network is not suitable for direct communication between devices.  The network depends entirely on the central station, the failure of which leads to stopping the network completely (single point of failure). 42 5. ACCORDING TO THE TOPOLOGY B. Ring topology Network  In this structure, the transmission medium is in the form of a ring consisting of the connection of each device to the device next to it, with the last device connecting to the first.  Token Passing method is used to transfer data from one device to another in the network.  There is only one token signal in the network and this signal travels in the ring at a speed approximately equals to the speed of light. 43 5. ACCORDING TO THE TOPOLOGY Advantages of Ring topology Network  This network uses a small amount of wires, which reduces the cost.  It is suitable for the use of fiber-optic cables because the signal passes in one direction.  Devices can easily be prioritized in their access to the network. 44 5. ACCORDING TO THE TOPOLOGY Disadvantages of Ring topology Network  The process of detecting, diagnosing and fixing the malfunction is not easy.  New devices cannot be added to the network without stopping it.  Failure of any station causes the network to stop working completely.  Unidirectional traffic (this can be solved by dual ring - FDDI). 45 5. ACCORDING TO THE TOPOLOGY C. Bus topology Network  The backbone of this architecture, the transmission medium, consists of a single piece of wire to which all network devices are directly connected. Segment Terminator Terminator 46  Data is sent from the sending device to all devices in the network in the form of electronic signals.  Only the computer whose address matches the address in the message receives the data while the rest of the machines reject the message.  Since the signal is sent to all devices in the network, it travels to both ends of the cable and if it is not stopped, it will keep repeating back and forth, preventing other devices from transmitting.  The Terminator is used at both ends of the cable, where it absorbs the signal and evacuates the cable from it so that other devices can transmit their data. 47 5. ACCORDING TO THE TOPOLOGY Advantages of Bus topology Network  The network uses the least amount of wires, which reduces the cost.  This network is considered the cheapest among the networks.  The network can easily be extended to new areas without network interruption.  One computer failure does not affect the rest of the network. 48 5. ACCORDING TO THE TOPOLOGY Disadvantages of Bus topology Network  The process of detecting, diagnosing and fixing the malfunction is not easy.  It is not possible to prioritize the transmission of devices when entering the network.  The network cannot bear to increase the number of devices beyond a certain limit, as this reduces its efficiency and increases the delay.  If two devices send data at the same time, the two 49 signals will collide. 5. ACCORDING TO THE TOPOLOGY D. Hybrid topology network  Every device has a dedicated link with every device on the network.  Fully connected mesh network has N*(N-1) physical connection to connect N device.  Every device on the network must have (N-1) input/output ports. 50 5. ACCORDING TO THE TOPOLOGY  Advantages of Mesh topology 1. Privacy: every message travels along a dedicated line, only the intended recipient sees it. 2. Eliminating the traffic problems: the use of a dedicated link guarantees that each connection can carry its own data load. 3. Robust: if one link is broken, it does not affect the entire system. 4. Fault identification and fault isolation is easy 5. ACCORDING TO THE TOPOLOGY  Disadvantages of Mesh topology 1. Every device must be connected to every other device, adding new devices is difficult. 2. The amount of wires can be greater the available space. 3. The HW required (I/O ports) to connect each link is expensive. 5. ACCORDING TO THE TOPOLOGY E. Hybrid topology Network 53 ACCESS METHODS  There are various ways to prevent the simultaneous use of network cables in order to avoid data collision and distortion :  CSMA/CD  CSMA/CA  Token Passing CSMA/CD  Carrier Sense Multiple Access with Collision Detection  This method is used with the Bus topology network. it is a protocol that overcomes the collision problem that occurs as a result of sending data by a number of hosts at the same time.  In this method, the computer that wants to send data checks the cable to know whether there is a signal in the wire or not. CSMA/CD  In case of signal absence, it starts to transmit the data and continues and, at the same time, to monitor the wire to ensure that there is not another signal arrives.  In the event that it detects the presence of a second signal, it stops transmitting and sends a jam signal, which is a signal that informs all devices of a collision, so all devices stop sending data for a specific time period for each device according to a random timer. CSMA/CA  Carrier Sense Multiple Access with Collision Avoidance  This method attempts to avoid collision rather than detect it after it has occurred.  Each computer sends a signal indicating its intention to send data before it actually sends its data, and it does this by sending a data reservation signal before sending. This signal tells the rest of the devices that a data transmission is about to occur so that no other device is sending its data at the same time. CSMA/CA  This reduces the possibility of a collision, but it does not prevent it completely, because there is a possibility that two devices will send the reservation signal at the same time, which leads again to a collision between the two signals and the two devices will have to try to send again later.  Since every device needs to send a signal before the actual transmission of data, this method is considered slow and therefore less used than other methods. TOKEN PASSING  This method is used in the ring topology.  In this method, there is a distinct data packet called a token that rotates inside the ring network permanently.  When a device wants to send data, it waits for the token to arrive and holds it before sending the data.  The sending device then releases the token signal for other devices to use.  In this way, two devices cannot transmit at the same time because there is only one token signal in the network Contents Purpose of Computer Networking Components of Computer Networks Classification criteria Data flow Transmission media 61 DATA FLOW  Path taken by data within a device, network, or organization, as it moves from its source to its destination.  Categorized by direction of flow:  Simplex  Half duplex  Full duplex SIMPLEX  Communication is unidirectional, one of the two devices on a link can transmit and the other can only receive (one-way street).  Ex: keyboard (input), monitor (output) HALF DUPLEX  Each station can both transmit and receive, but not at the same time. When one device is sending the other can receive and vice versa (one-land read with two directions). FULL DUPLEX  Both stations can transmit and receive simultaneously (two way street with traffic flowing in both directions at the same time). DATA FLOW WITHIN A DEVICE sender Data Protocol NIC Data packets engine Sender Convert data into signal for on-line transmission ‫وسط النقل‬ NIC Convert signals to data Receiver Data check,…Ack msg. Protocol engine Packet Compilation Data 66 receiver DATA FLOW  The Network Interface Card (NIC) at the sending device prepares the data in packets and prepares them for transmission on the transmission medium.  The transmission medium is wired (copper or fiber) or wireless.  A communication protocol is needed that specifies the method of communication for network components. 67 DATA FLOW  A network operating system that regulates the rights of users.  A network card at the receiving device receives data from the transmission line, checks the validity of the data, and reassembles the data packets. Contents Purpose of Computer Networking Components of Computer Networks Classification criteria Data flow Transmission media 69 PHYSICAL MEDIA Physical Media PHYSICAL MEDIA PHYSICAL MEDIA Copper Coaxial Cable - Thick or Thin Unshielded Twisted Pair - CAT 3, 4, 5, 5e, 6& 6A. Optical Fiber Multimode Singlemode Wireless Short Range Medium Range (Line of Sight) Satellite Physical Media COPPER MEDIA: COAXIAL CABLE Coaxial cable is a copper- cored cable surrounded by a heavy shielding and is used to connect computers in a network. Outer conductor shields the inner conductor from picking up stray signal from the air. Category Impedance Use High bandwidth. RG-59 75 W Cable TV Thin RG-58 50 W Ethernet Thick RG-11 50 W Ethernet Physical Media COPPER MEDIA: COAXIAL CABLE Network Bandwidth (throughput) is a measurement indicating the maximum capacity of a communications link (wired or wireless ) to transmit data over a network connection in a given amount of time. Repeater is used to regenerate the weakened signals. COAXIAL CABLE CONNECTORS Cable end terminator BNC connector BNC connector end BNC T-connector IEEE 802.3 ETHERNET STANDARDS Institute of Electrical and Electronics Engineers (IEEE) standers organization.  10Base2 (Thinnet ):  Support up to 30 workstations on a single segment.  10 Mbps.  185 meters in length.  10Base5 (Thicknet):  Support up to 30 workstations on a single segment  10 Mbps  500 meters in length COPPER MEDIA: TWISTED PAIR Twisted-pair is a type of cabling that is used for telephone communications and most modern Ethernet networks. A pair of wires forms a circuit that can transmit data. The pairs are twisted to provide protection against crosstalk, the noise generated by adjacent pairs. There are two basic types, shielded twisted-pair (STP) and unshielded twisted- pair (UTP). SHIELDED TWISTED PAIR (STP) UNSHIELDED TWISTED PAIR (UTP) UNSHIELDED TWISTED PAIR (UTP) Consists of 4 pairs (8 wires) of insulated copper wires typically about 1 mm thick. The wires are twisted together. Twisting reduces the interference between pairs of wires. High bandwidth and High attenuation channel. Flexible and cheap cable. Categories: CAT 3, CAT 4, CAT 5, Enhanced CAT 5, CAT 6, and now CAT 6A. Category rating based on number of twists per inch and the material used. Physical Media CATEGORIES OF UTP UTP comes in several categories that are based on the number of twists in the wires, the diameter of the wires and the material used in the wires. Category 3 is the wiring used for telephone connections. Category 5e, Category 6 and Category 6A are currently the most common Ethernet cables used. CATEGORIES OF UTP: CAT 3 Bandwidth 16 Mhz 11.5 dB Attenuation 100 ohms Impedance Used in voice applications and 10baseT (10Mbps) Ethernet CATEGORIES OF UTP: CAT 4 20 MHz Bandwidth 7.5 dB Attenuation 100 ohms Impedance Used in 10baseT (10Mbps) Ethernet Physical Media CATEGORIES OF UTP: CAT 5 100 MHz Bandwidth 24.0 dB Attenuation 100 ohms Impedance Used for high-speed data transmission Used in 10BaseT (10 Mbps) Ethernet & Fast Ethernet (100 Mbps) CATEGORIES OF UTP: CAT 5E 150 MHz Bandwidth 24.0 dB Attenuation 100 ohms Impedance Transmits high-speed data Used in Fast Ethernet (100 Mbps), Gigabit Ethernet (1000 Mbps) & 155 Mbps ATM. CATEGORIES OF UTP: CAT 6 250 MHz Bandwidth 19.8 dB Attenuation 100 ohms Impedance Transmits high-speed data Used in Gigabit Ethernet (1000 Mbps) & 10 Gig Ethernet (10000 Mbps) CATEGORIES OF UTP: CAT 6A (AUGMENTED) 500 MHz Bandwidth 100 ohms Impedance Transmits high-speed data Used in 10 Gig Ethernet for a distance of more than 100 meters UTP CABLING Cabling PATCH CORD & UTP CONNECTORS UTP WIRING  Each pair of wires in a twisted pair cable is one of four colors: orange, green, blue, or brown.  The two wires that make up each pair are colored as: One is white with a colored stripe; the other is colored with a white stripe.  When you attach a twisted-pair cable to a connector, you must match up the right wires to the right pins.  There are two popular standards: 568A and 568B WIRING CONNECTION Cabling COLOR CODES Data : 1 & 2 Data : 3 & 6 Crossover 13 26 Cabling CROSSOVER Another wiring method is called crossover. In crossover, intentionally connects the transmit signals at one end to the receive signals at the other end Crossover 13 26 Cabling COLOR CODES Cabling CUTTING, STRIPING & CRIMPING TOOLS Make your own patch cords Cuts and strips pairs RJ45 end crimped onto ends of wire Cabling MAKING CABLES FIBER MEDIA Optical fibers use light to send information through the optical medium. Compared to wired cables, fiber optic cables provide higher bandwidth and transmit data over longer distances fiber-optic cable transmits digital signals using light impulses rather than electricity, so that, it’s immune to radio frequency interference (RFI). FIBER MEDIA The core of the cable is surrounded by a layer of glass called cladding that reflects light inward to avoid loss of signal and allow the light to pass through bends in the cable. Optical fibers rely on total internal reflection for their operation. Physical Media TOTAL INTERNAL REFLECTION Light travels through the optical media by the way of total internal reflection. Physical Media FIBER MEDIA Two types of Fiber media: Multimode Single mode Multimode Fiber can support less bandwidth than Single mode Fiber. Single mode Fiber has a very small core and carry only one beam of light. Physical Media SINGLE AND MULTIMODE FIBER Single-mode fiber Carries light pulses along single path Uses Laser Light Source The fiber is about 9 micrometers (µm) in diameter. It can support Gbps data rates. over > 100 Km without using repeaters. Physical Media SINGLE AND MULTIMODE FIBER Multimode fiber A fiber with a core of 50 µm or above. Many pulses of light generated by LED travel at different angles. It is used for communication over short distances. Transmission speed and distance limits are: 100 Mbit/s for distances up to 2 km, 1 Gbit/s up to 1000m, and 10 Gbit/s up to 550 m. Physical Media FIBER MEDIA Fiber optic cables consist of multiple fibers packed inside protective covering. 62.5/125 µm multimode fiber 50/125 µm multimode fiber 10 µm single-mode fiber Physical Media FIBER MEDIA Advantages of Fiber Optic Cables Fiber cables offer several advantages over long-distance copper cabling.  Fiber optics support a higher capacity. Fiber cables rated at 10 Gbps, 40 Gbps, and 100 Gbps are standard.  Because light can travel for much longer distances over a fiber cable without losing its strength, the need for signal boosters is reduced.  A fiber optic cable is less susceptible to interference. FIBER-OPTIC CABLE Contains one or several glass fibers at its core Surrounding the fibers is a layer called cladding WIRELESS MEDIA Very useful in difficult terrain (land) where cable laying is not possible. Provides mobility to communication nodes. Right of way and cable laying costs can be reduced. Susceptible to rain, atmospheric variations and Objects in transmission path. WIRELESS MEDIA Types of wireless transmission media used in communications include:  Infrared (short-range)  Radio Waves (large distances)  Cellular Radio (mobile communications)  Microwaves  Communications Satellite Physical Media MICROWAVE Microwaves do not follow the curvature of earth Line-of-Sight transmission Height allows the signal to travel farther Unidirectional - two frequencies for two way communication Repeater is used to increase the distance Hop- by-Hop Physical Media SATELLITE COMMUNICATION Receives microwave signals from an earth-based station, amplifies the signals, and broadcasts the signals back over a wide area. NIC  Network Interface Card (NIC) - Network Interface Controller - Network Adapter - LAN adapter - Physical Network Interface.  Physical access  wired and wireless  Overcoming the speed difference  Translate electrical signals  MAC address  Physical layer processes and some data link layer processes can run on it MAC ADDRESS  Burned-in address - Ethernet hardware address - Hardware address - Physical address  Unique 48-bits hardware identifier.  Assigned by device manufacturers.  12-digit hexadecimal number (6-Byte binary number).  Colon-Hexadecimal notation MAC ADDRESS TYPES  Static (Easy, Permanent, Different cards in the same net. are OK ).  Dynamic (Small addresses - Address conflict may happen - Other computers must learn the new address).  Configurable. - Physical address can be set manually or electronically through EPROM programming. - It provide a compromise between the static and dynamic schemes. IMPORTANT NOTE The shape and length of the physical address varies with manufacturing technology and network type. That is, it cannot be understood and accepted in all networks PACKETS AND FRAMES  Before transmission, the message data is divided into small blocks called PACKETS.  The term “FRAME” is used to denote the definition of a packet used with a specific type of network.  Each LAN technology define a frame format. Frame Header Frame Data Area  A frame header contains information used to process the frame.  The message is opaque for the network, it is meaningful only to the sender and receiver. INTERNETWORKING PROTOCOLS AND LAYERING  Hardware alone does not solve all communication problems.  Computers use complex software that provides a convenient interface for applications.  All computers must agree on a set of rules to be used when exchanging messages (network protocols).  Huge protocols are divided into sub-pieces.  Easier to design, analyze, implement and test.  The International Standards Organization (ISO) defined a 7-layer reference model called Open Systems Interconnect (OSI). ISO/OSI REFERENCE MODEL OSI specifications assist in data transfer between different hosts regardless if they’re Unix, Windows, or Mac ISO/OSI REFERENCE MODEL  Layer 1 (Physical layer):  The Physical layer specifies the requirements for establishing a physical link between end systems.  The Physical layer communicates directly with the various types of communication media.  It deals with the transmission of 0s and 1s over the physical media.  It is responsible of translation of bits into signals and vice versa. ISO/OSI REFERENCE MODEL  Layer 2 (Data link layer):  Specifies how to organize data into frames and how to transmit frames over a network.  It handles error notification, network topology, and flow control.  It ensures that messages are delivered to the proper device on a LAN using hardware (MAC) addresses.  It translates messages from the Network layer into bits for the Physical layer to transmit.  It contains Data Link Control (DLC) and Medium Access Control (MAC) sublayers. ISO/OSI REFERENCE MODEL  Layer 3 (Network layer): Network layer protocols are responsible for the following:  It manages logical device addressing.  Path selection between end-systems (routing).  Flow control.  Fragmentation & reassembly  Translation between different network types.  Determines the best way to move data. ISO/OSI REFERENCE MODEL  Layer 4 (Transport layer): Transport layer protocols specify how to handle details of reliable transfer (error free - in sequence - without duplication).  In case of sending data, layer 4 repackage the message to fit into packets (Split long messages - Assemble small messages).  In case of receiving data, layer 4 reassembles the original message and sends an acknowledgment (Ack) message to the sender.  Transport layer contains the two famous protocols, TCP and UDP. ISO/OSI REFERENCE MODEL  Layer 5 (Session layer):  Session layer protocols specify how to establish a communication session with a remote system.  It manages the security details such as authentication using passwords  It keeps applications’ data separate from other applications’ data. ISO/OSI REFERENCE MODEL  Layer 6 (Presentation layer): Layer 6 protocols specify how to represent data, and how to translate from the representation on one computer to the representation on another. Presentation layer is responsible for:  Presenting data to the Application layer.  Data translation and code formatting.  Ensures that the data transferred from one system’s Application layer can be read and understood by the Application layer on another system.  Data encryption and data compression. ISO/OSI REFERENCE MODEL  Layer 7 (Application layer):  Application layer protocol specifies how one particular application uses a network.  It specifies the details of how an application program on one machine makes a request and how the application on another machine responds. ISO/OSI REFERENCE MODEL VIRTUAL COMMUNICATION BETWEEN LAYERS LAYERING, HEADERS, AND ENCAPSULATION  To transmit a message data, each layer needs to add some control information to the data in order to do it’s job.  This information is typically perpended to the data before being given to the lower layer.  Once the lower layers deliver the data and control information - the peer layer uses the control information.  Each layer communicates only with its peer layer on the receiving device LAYERING, HEADERS, AND ENCAPSULATION LAYERING, HEADERS, AND ENCAPSULATION At a transmitting device, the data-encapsulation method works as follows: 1. User information is converted to data for transmission on the network. 2. Data is converted to segments, and a reliable connection is set up between the transmitting and receiving hosts. 3. Segments are converted to packets (or datagrams) and a logical address is placed in the header so each packet can be routed through an internetwork. A packet carries a segment of data. 4. Packets are converted to frames for transmission on the local network. MAC addresses are used to uniquely identify hosts on a local network. Frames carry packets. 5. Frames are converted to bits. LAYERING, HEADERS, AND ENCAPSULATION TCP/IP PROTOCOLS TCP/IP PROTOCOL SUITE Communication in the Internet depends mainly on the Transmission Control Protocol/Internet Protocol (TCP/IP) protocol. The layers of the TCP/IP protocol differ from the layers of the OSI model, as the TCP/IP protocol consists of only 5 layers, and the names of the layers are similar to the names of the layers in the TCP/IP protocol model as follows: TCP/IP AND OSI MODEL TCP/IP PROTOCOL LAYERS Layer 1: Physical Corresponds to layer 1 in the OSI model Layer 2: Data link Corresponds to layer 2 in the OSI model and it defines how data is divided into frames and how those frames are sent across the network. Layer 3: Network (Internet) Specifies the form of packets to be sent over the Internet. It also determines how these packets are routed through various routers to their final destination. TCP/IP PROTOCOL LAYERS Layer 4: Transport Layer 4 corresponds to the OSI model and it defines how to transmit in a way that ensures correct data transmission. Layer 5: Application Layers 5, 6, and 7 correspond to the OSI model and define how applications use the Internet. CONNECTION DEVICES Connection devices are physical devices that allow hardware on a computer network to communicate and interact with one another. 1. Repeater 2-port device Operates at the physical layer Do not amplify the signal Regenerate the signal over the same network before the signal becomes too weak. CONNECTION DEVICES 2. Hub A hub is a multi-port repeater (up to 32 ports). Used to connect the network computer hosts together. Hubs do not perform packet filtering or addressing functions. When it receives any data, it sends it to all ports except the port it came from. CONNECTION DEVICES Hub types:  Active hubs: o have their own power supply. o can clean, boost (amplify), and relay (pass on) the signal along with the network. o used to extend the maximum distance between nodes. CONNECTION DEVICES Hub types:  Passive hubs: o do not enhance the signal and do not have a power supply. o relay signals onto the network without cleaning and boosting them. o can’t be used to extend the distance between nodes. CONNECTION DEVICES Hub types:  Hybrid hubs: mixing of different transmission media types.  Intelligent hubs: It work like active hubs. provide flexible data rates to network devices. enable an administrator to monitor the traffic passing through the hub. ports can be configured to be divided into different logical networks. CONNECTION DEVICES 3. Bridge A bridge operates at the data link layer. It filters messages by reading the MAC addresses of the source and destination. It is used for interconnecting two LANs working on the same protocol. It contains only two ports. It can partition large LAN to improve performance and increase transmission speed through the network. It creates a routing table containing the address and location of each device in the network CONNECTION DEVICES 3. Bridge  How bridges create the routing table?  In which cases the bridge allows the message to pass to the other port? CONNECTION DEVICES 4. Switches A switch operates at the data link layer. It is considered as a multiport bridge, it contains up to 32 ports. It connects network devices together. It is distinguished by its speed and efficiency in work. It has more security than bridges and it can be used for virtual networks (VLANs). Each device connects to one of these ports, so the switch directs the message to the receiving device only, so it does not waste the bandwidth in the network. CONNECTION DEVICES 4. Switches CONNECTION DEVICES 5. Routers A router is a Network Layer device. It routes data packets based on their IP addresses. Routers connect LANs and WANs. When receiving a message, it selects the best path to the target network. Routers have dynamically updating routing tables. The role of the router ends when the message reaches the target network. CONNECTION DEVICES 6. Access Point APs operate at Layer 2 of the OSI model. Sends/Receives data wirelessly over radio frequencies, using 2.4 GHz or 5 GHz bands. Clients, such as laptops or mobile phones, connect to an AP using a wireless signal. INTERNETWORKING INTERNETWORKING Internetworking means providing universal service among heterogeneous networks (hardware and software). An internet (small i) is two or more networks connected to each other. internets contain a few networks and the global Internet contains tens of thousands of networks. Routers are used to connect heterogeneous networks. The network treats a connection to a router the same as a connection to any other computer. Internet protocol software hides the details of physical network connections, physical addresses, and routing information. INTERNETWORKING IP ADDRESSES  The shape and length of physical addresses vary with the type of network and manufacturing technology.  A unified addressing method must be used for all networks.  The IP protocol provides a logical addressing method for computers in the Internet.  A unique address is given to each computer (IP address).  An IP address is a 32 bit unique address having an address space of 232.  There are two notations in which IP address is written, dotted decimal notation and hexadecimal notation Dotted Decimal Notation Hexadecimal Notation IP ADDRESSES  IPv4 address is divided into two parts:  Prefix (Network ID)  Suffix (Host ID)  No two networks can be given the same prefix and this must be coordinated globally. Furthermore, two devices in one network cannot be given the same suffix.  The five IP address classes are:  Class A  Class B  Class C  Class D  Class E CLASSES OF IP ADDRESSES COMPUTING THE CLASS OF AN ADDRESS o Maximum number of networks available in each class and the maximum number of hosts per network. o IP addresses are globally managed by Internet Assigned Numbers Authority (IANA) and regional Internet registries (RIR). Example: class A has a total of: 27 – 2= 126 network ID 224 – 2 = 16,777,214 host ID ADDRESSING EXAMPLE SUBNET MASK (NETMASK)  A subnet mask is a 32-bit number created by setting host bits to all 0s and setting network bits to all 1s.  When applied by a bitwise AND operation to any IP address in the network, yields the network prefix.  Subnet masks are also expressed in dot-decimal notation like an IP address. Class A: 255.0.0.0 Class B: 255.255.0.0 Class C: 255.255.255.0 SPECIAL IP ADDRESSES Network Address When suffix contains all zeros it means “this network”. For example, the address 128.211.0.0 means the network 128.211 in the previous example. Direct Broadcast Address When suffix contains all ones this means that a copy of the message is delivered to all hosts whose address is specified in the prefix. Limited Broadcast Address Sometimes the device needs to send a copy of the message to all the devices in its local network. So the whole address is all ones (prefix and suffix). SPECIAL IP ADDRESSES This computer address When the address is all zeros, this means “This computer”. Loopback Address Loopback Address is used to test network applications. The reserved address is prefix 127 and any suffix. The most popular Loopback Address is 127.0.0.1 SUMMARY OF SPECIAL IP ADDRESSES ROUTERS AND THE IP ADDRESSING A router has connections to multiple physical networks. A router is assigned two or more IP addresses, one for each network to which the router attaches. Each IP address contains a prefix that specifies a physical network. ROUTERS AND THE IP ADDRESSING MULTI-HOMED HOSTS A host computer with multiple network connections is said to be multi-homed. Increase reliability — if one network fails, the host can still reach the Internet through the second connection. Increase performance — connections to multiple networks can make it possible to send traffic directly and avoid routers. IP Datagrams and datagram forwarding IP DATAGRAMS AND DATAGRAM FORWARDING  Goal of internetworking.  Application programs must remain unaware of the underlying physical networks and the connection between them.  TCP/IP is a protocol that provides two types of data communication services between sender and receiver:  Connection-oriented service.  Connectionless service. INTERNETWORKING  Each host or router in the Internet contains protocol software that recognizes Internet packets.  Routers do not handle frames but only handle and forward packets.  IP datagram has the same general format as a hardware frame: the datagram begins with a header followed by a data area.  The amount of data carried in a datagram is not fixed.  In IPv4, a datagram can contain as little as a single octet of data or at most 64K octets (including the header). FORWARDING AN IP DATAGRAM  Datagrams pass through many routers on their journey from sender to receiver.  The Internet uses next-hop forwarding.  Each router along the path receives the datagram, extracts the destination address from the header, and uses the destination address to determine a next hop to which the datagram should be sent using a routing table.  The size of the routing table is proportional to the number of networks in the internet, not the number of hosts. Routing table in router R2 THE MASK FIELD AND DATAGRAM FORWARDING  When a router encounters a datagram with destination IP address D, The target network address is extracted using the routing table in this router: If ((Mask[i] & D) == destination[i]) forword to nexthop[i]  After applying mask[i] to D , the software compares the resulting prefix to the Destination field of the entry i. If the two are equal, the datagram will be forwarded to the Next Hop in that entry.  Example: a datagram contains the destination address (192.4.10.3) Note1: The destination address in a datagram header always refers to the ultimate destination; at each point, a next hop is computed, but the next hop address does not appear in the datagram header. BEST-EFFORT DELIVERY  Although IP protocol makes a best-effort to deliver each datagram, IP does not guarantee that it will handle all problems. the following problems may occur: 1. Datagram duplication 2. Delayed or out-of-order delivery 3. Corruption of data 4. Datagram loss To correct these errors, there are protocols in TCP/IP protocol layers that deal with such errors. COMMUNICATION PROBLEMS & SOLUTIONS 1. Out-of-Order delivery: - Packets may take different routs during its journey to the destination host, so that, packets may arrive out-of-order at the destination. Solution: - The transport layer protocols use sequencing (sequence number). The receiving host checks the sequence number of the arrived packet to know if it arrived in order or not. COMMUNICATION PROBLEMS & SOLUTIONS 2. Packet duplication: - Sometimes because of hardware malfunction, long packet delay or some other reasons, two copies of a packet arrive to the receiver. Solution: - In this case, sequencing solves the problem of duplication. The receiving host checks the sequence number of the arrived packet, if it is a duplicate of an already arrived packet, it drops the new arrived copy. COMMUNICATION PROBLEMS & SOLUTIONS 3. Packet loss: - Packet loss is a fundamental problem in computer networks. When a receiver receives a packet with corrupted bits, it discards the packet. Solution: - To solve this problem, protocols use positive acknowledgement with retransmission. When the packet arrive intact, the receiver sends back a small message (ACK) to the sender that reports successful reception. COMMUNICATION PROBLEMS & SOLUTIONS - When the sender sends a packet, it starts a timer. - If the ACK message arrived before the timer expires, the source host cancels the timer. - If the timer expires before the ACK arrives, the source sends another copy of the packet and starts the timer again. - There is a maximum number of retransmissions. When this number is reached, the sender stops retransmitting and declare that communication is impossible. COMMUNICATION PROBLEMS & SOLUTIONS 4. Replay caused by excessive delay: - Replay means that an old delayed packet affects later communication. A packet from an old conversation might be accepted in a later conversation and the correct packet is discarded as a duplicate. Solution: - To prevent replay, protocols mark each session with a unique ID (e.g. the time) and require this ID to be in each packet. Any packet with an incorrect ID will be discarded. IP DATAGRAM HEADER FORMAT Header Field Description Version 4 bits - Indicates the format of the Internet header 4 bits - Specifies the length of the Internet header in 32- Internet Header bit words. If no options are present, the value is 5. Length (IHL) Provides an indication of the parameters of the quality Type of Service of service desired for the datagram. 16 bits - Specifies the length of the datagram, measured Total Length in octets including both the header and the data. 16 bits - A unique number (usually sequential) assigned Identification to the datagram that is used to gather all fragments for reassembly. 3 bits - individual bits specifying whether the datagram is a fragment and if so, whether the fragment Flags corresponds to the rightmost piece of the original datagram. Header Field Description 13 bits - Indicates where in the datagram this Fragment Offset fragment belongs. 8 bits - Indicates the maximum time the datagram is allowed to remain in the Internet. It is initialized by the original sender and decremented by each router Time to Live that processes the datagram. If the value reaches zero, the datagram is discarded and an error message is sent back to the source. Protocol 8 bits - specifies the type of the payload. 16 bits - ones-complement checksum of header Header Checksum fields. 32 bits - The source IP address of the original Source Address sender. Destination 32 bits - The destination IP address of the ultimate Address destination. Header Field Description Variable in length - Optional header fields used to control routing and datagram processing. Most Options datagrams do not contain any options Internet header padding used to ensure that the Padding Internet header ends on a 32-bit boundary IP ENCAPSULATION, FRAGMENTATION, AND REASSEMBLY In this part we will know how a host or router sends a datagram across a physical network, and how routers handle the problem of sending large datagrams. DATAGRAM TRANSMISSION AND FRAMES  Network hardware does not understand datagram format or Internet addressing.  Each hardware technology understands only its frame format and physical addressing scheme.  The frame format may differ from one LAN technology to another, so the frame format that is needed to cross a network may not be suitable to cross the next one.  How can a datagram be transmitted across a physical network that does not understand the datagram format? ENCAPSULATION  To encapsulate a datagram inside a frame, the entire datagram is placed in the data area of the frame.  The network hardware treats the frame that contains a datagram like any other frame.  Encapsulation requires the sender to supply the physical address of the next hop to which the datagram should be sent. TRANSMISSION ACROSS AN INTERNET  When the frame reaches the next hop, the receiving SW removes the datagram and discards the frame.  If the datagram must be forwarded across another network, a new frame is created.  When the datagram reaches its final destination, the frame that carries the datagram is discarded and the datagram appears the same size as it was originally sent. MTU, DATAGRAM SIZE, AND ENCAPSULATION  Each HW technology specifies the max. amount of data that a frame can carry, which is called a max. transmission unit (MTU).  A datagram must be smaller than or equal to the network MTU or it cannot be encapsulated for transmission.  In an internet that contains heterogeneous networks, MTU restrictions can cause a problem.  When a datagram is larger than the MTU of the network over which it must be sent, the router divides the datagram into smaller pieces called fragments. This is called the fragmentation process.  A fragment has the same format as other datagrams.  A bit in the FLAGS field of the header indicates whether a datagram is a fragment of a complete datagram.  The FRAGMENT OFFSET field in the fragment header specifies where in the original datagram the fragment belongs.  To fragment a datagram for transmission, a router uses the network MTU and the datagram header size to calculate the max. amount of data that can be sent in each fragment and the number of fragments that will be needed.  After creating the fragments, the router modifies the header fields of each fragment. REASSEMBLY  It is the process of creating a copy of the original datagram from fragments.  The fragment that carries the final piece of data has the flag bit set to (0) in the header. Thus, the receiver that performing reassembly can know whether all fragments have arrived successfully.  Only, the final destination host should reassemble fragments. WHY? REASSEMBLY  As fragments may arrive out of order, the receiving host uses the IDENTIFICATION NUMBER and IP SOURCE ADDRESS fields in the incoming fragment to determine the datagram to which the fragment belongs.  The FRAGMENT OFFSET field tells the receiver how to order fragments in the given datagram. FRAGMENT LOSS  As fragments may be delayed or lost , the receiving host must save the fragments in case missing fragments are only delayed.  When the receiver receives the first fragment from a given datagram, it starts a timer.  If all fragments arrive before the timer expires, the receiver cancels the timer and reassembles the datagram.  If the timer expires before all fragments arrive, the receiver discards those fragments that have arrived.  WHY THE RECEIVER DOES NOT ASK THE SENDER TO RETRANSMIT THE LOST FRAGMENTS? Fragmenting A Fragment  What happens if a fragment reaches another network that has a smaller MTU?  Is it possible to fragment (verb) a fragment (noun)?

Use Quizgecko on...
Browser
Browser