محاضرات تكنولوجيا شبكات الحاسب اآللي - جامعة جنوب الوادي - PDF
Document Details
Uploaded by NonViolentEcstasy
جامعة جنوب الوادي
2024
قسم تكنولوجيا التعليم والمعلومات
Tags
Summary
هذه المحاضرات في تكنولوجيا شبكات الحاسب اآللي موجهة للفرقة الرابعة في كلية التربية النوعية بجامعة جنوب الوادي للعام الجامعي 2024-2025. تشمل المحاضرات مواضيع مثل أنواع الشبكات و تصنيفها وأمنها. الهدف من المقرر هو اكتساب المعارف والمفاهيم في مجال شبكات الحاسب اآللي.
Full Transcript
جامعة جنوب الوادي كلية التربية النوعية قسم تكنولوجيا التعليم والمعلومات محاضرات في تكنولوجيا شبكات الحاسب اآللي الفرقة الرابعة إعداد قسم تكنولوجيا التعليم والمعلومات العام الجامعي 2025-2024 ...
جامعة جنوب الوادي كلية التربية النوعية قسم تكنولوجيا التعليم والمعلومات محاضرات في تكنولوجيا شبكات الحاسب اآللي الفرقة الرابعة إعداد قسم تكنولوجيا التعليم والمعلومات العام الجامعي 2025-2024 جامعة :جنوب الوادي كلية :التربية النوعية قسم :تكنولوجيا التعليم والمعلومات توصيف مقرر تكنولوجيا تكنولوجيا شبكات الحاسب اآللى 2025/2024 -1بيانات المقرر الفرقة :الرابعة اسم المقرر :شبكات الحاسب اآللي الرمز الكودي: عدد الوحدات الدراسية 2 :نظري 3 -عملي التخصص :تكنولوجيا التعليم اكتساب المعارف المختلفة لفهم العالقات التكاملية والمستجدات فى -2هدف المقرر مجال شبكات الحاسب اآللي لتطوير ذاته مهنيا -3المستهدف من تدريس المقرر :الفرقة الثالثة -2-18-1أ يلم بالتطورات العلمية في مجال شبكات الحاسب اآللي أ -المعارف والمفاهيم : (المعدات والتقنيات) -2-18-1ب يلم بالتطورات العلمية فى مجال شبكات الحاسب األلى (أمن الشبكات) -1-25-1أ يتعرف طرق تصميم شبكات الحاسب (الهياكل البنائية للشبكات) -1-25-1ب يتعرف طرق تصميم الشبكات السلكية والالسلكية – 2-1-3أ يقدم افكار جديدة فى مجال شبكات الحاسب ب -المهارات الذهنية: (بروتوكوالت الشبكة وطرق إرسال البيانات). ج -المهارات المهنية الخاصة -1-14-2أ يصمم وينتج أنماط مختلفة من شبكات الحاسب بالمقرر: ت ت ت تتمن فريق (فى انتاج -1-1-4أ يجيد اس ت ت ت تتتخدام مهارات التعامل د -المهارات العامة: شبكة حاسب) - 1-2-4أ يستخدم أساليب التكنولوجيا الحديثة فى البحث عن معلومات (فى مجال شبكات الحاسب) مقدمة عن الشبكات -شبكة االنترنت محتوى المقرر شبكة الحاسب اآللي -أهداف استخدام شبكات اآللى تصنيف شبكات الحاسب حسب التوسع واإلنتشار الجغرافى تصنيف شبكات الحاسب من حيث البنية العامة للشبكة حسب التوبولوجى المستخدم تصنيف شبكات الحاسب من حيث طريقة التوصيل Mac Address الكابالت وأنواعها ( )Cables الكابالت وأنواعها ( )Cables بطاقات الشبكة Network Adapter Cards بطاقات الشبكة مفرع الشبكة HUB أجهزة الربط والتوجيه ()Auxiliary Devices أجهزة الربط والتوجيه ()Auxiliary Devices OSl Modelالنموذج المرجعي OSl Modelالنموذج المرجعي تقنية االيثرنت مجاالت تطبيق االنترنت بروتوكوالت الشبكات Networks Protocols بروتوكوالت الشبكات Networks Protocols رزم البروتوكوالت (رزمة بروتوكول )TCP/IP طرق الوصول للعناصر الموجودة بالشبكة () CSMA/CD–CSMA/CA-Token نقل االشارات االلكترونية عبر الشبكات طرق نقل البيانات او المعلومات الشبكات الالسلكية الشبكات الالسلكية أمن وحماية شبكات المعلومات تشفير البيانات تشفير البيانات المحاضرة المصحوبة بعروض تقديمية -التعلم باالكتشاف – حل المشكالت اساليب التعليم والتعلم -6أساليب التعليم والتعلم للطالب ذوى القدرات المحدودة -7تقويم الطالب : لتقييم (المعارف والخبرات والمفاهيم االختبارات النظرية أ -األساليب المستخدمة : المكتسبة) لتقييم (القدرة على الوصف والتعبير -2االختبارات الشفهية عن بعض مفاهيم المقرر) لتقييم (مهارات المتعلم فى االستخدام) -3االختبارات العملية -4االختبارات النهائية (مقالية أو موضوعية) لتقييم (جميع جوانب التعلم فيما يتعلق بمحتوى المقرر) االختبا ارت الموضوعية والمقالية االختبارات الشفوية أثناء التدريس كتقويم بنائى ب -التوقيت : االختبارات النظرية والعملية فى نهاية الترم كتقويم نهائى 10اعمال سنه 10 -شفوي ج -توزيع الدرجات : - 40تطبيقي 90تحريرى المجموع ()150 --------------------------------- -8قائمة الكتب الدراسية والمراجع : كتاب الكرتوني تفاعلي من اعداد القسم أ -مذكرات -Computer Networks and Internets, Douglas E. ب -كتب ملزمة Comer. -شبكات الكمبيوتر من المبادئ الى االحتراف ،محمود يوسف ج -كتب مقترحة -شبكات الحاسب واالنترنت السيد محمد ،رضوان السعيد -------------------------------- د -دوريات علمية او نشرات ....الخ رئيس مجلس القسم العلمي : أستاذ المادة :د/ياسر محمد عاصم What Is a Computer Network? A computer network is a system that connects two or more computing devices for transmitting and sharing information. Computing devices include everything from a mobile phone to a server. These devices are connected using physical wires such as fiber optics, but they can also be wireless. The first working network, called ARPANET, was created in the late 1960s and was funded by the U.S. Department of Defense. Government researchers used to share information at a time when computers were large and difficult to move. Today’s world revolves around the internet, which is a network of networks that connects billions of devices across the world. Organizations of all sizes use networks to connect their employees’ devices and shared resources such as printers. Computer networking is the branch of computer science that deals with the ideation, architecture, creation, maintenance, and security of computer networks. It is a combination of computer science, computer engineering, and telecommunication Types of Computer Networks The different types of networks are: 1. Nanoscale networks: These networks enable communication between minuscule sensors and actuators. 2. Personal area network (PAN): PAN refers to a network used by just one person to connect multiple devices, such as laptops to scanners, etc. 3. Local area network (LAN): The local area network connects devices within a limited geographical area, such as schools, hospitals, or office buildings. 4. Storage area network (SAN): SAN is a dedicated network that facilitates block-level data storage. This is used in storage devices such as disk arrays and tape libraries. 5. Campus area network (CAN): Campus area networks are a collection of interconnected LANs. They are used by larger entities such as universities and governments. 6. Metropolitan area network (MAN): MAN is a large computer network that spans across a city. 7. Wide area network (WAN): Wide area networks cover larger areas such as large cities, states, and even countries. 8. Enterprise private network (EPN): An enterprise private network is a single network that a large organization uses to connect its multiple office locations. 9. Virtual private network (VPN): VPN is an overlay private network stretched on top of a public network. 10.Cloud network: Technically, a cloud network is a WAN whose infrastructure is delivered via cloud services. The Purpose of Computer Networking File and Data Sharing At one time, file-sharing consisted mostly of saving documents to floppy disks that could be physically transferred to other computers by hand. With networking, however, 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. Resource Sharing Computer networking also allows the sharing of network resources, such as printers, dedicated servers, backup systems, input devices and Internet connections. By sharing resources, unique equipment like scanners, color printers or high-speed copiers can be made available to all network users simultaneously without being relocated, eliminating the need for expensive redundancies. What's more, specific shared resources can be targeted to deliver documents or results directly to the office or department that needs them. Data Protection and Redundancy Preventing critical data loss saves businesses worldwide countless millions of dollars every year. 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. By utilizing central backup systems both on- and off-site, unique documents and data can be gathered automatically from every computer in the network and securely backed up in case of physical computer damage or accidental deletion. Ease of Administration Information technology (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 individual computers from one IT management station. Instead of individually upgrading each computer in a company one at a time, a network administrator can initiate an upgrade from a server and automatically duplicate the upgrade throughout the network simultaneously, allowing everyone in the company to maintain uniform software, resources and procedures. Internal Communications Computer networking also allows organizations to maintain complex internal communications systems. Network email can be instantaneously delivered to all users, voice mail systems can be hosted via network and made available systemwide and collaborative scheduling software and program management tools allow employees to coordinate meetings and work activities that maximize effectiveness, while also notifying managers and co-workers of plans and progress. Distributing Computing Power Organizations that demand extraordinary computing power benefit from computer networking by distributing computational tasks across multiple computers throughout the network, breaking complex problems into hundreds or thousands of smaller operations, which are then parceled out to individual computers. Each computer in the network performs its operations on its own portion of the larger problem and returns its results to the controller, which gathers the results and makes conclusions no computer could accomplish on its own. Resource availability & reliability A network ensures that resources are not present in inaccessible silos and are available from multiple points. The high reliability comes from the fact that there are usually different supply authorities. Important resources must be backed up across multiple machines to be accessible in case of incidents such as hardware outages. Cost savings Huge mainframe computers are an expensive investment, and it makes more sense to add processors at strategic points in the system. This not only improves performance but also saves money. Since it enables employees to access information in seconds, networks save operational time, and subsequently, costs. Centralized network administration also means that fewer investments need to be made for IT support. Secured remote access Computer networks promote flexibility, which is important in uncertain times like now when natural disasters and pandemics are ravaging the world. A secure network ensures that users have a safe way of accessing and working on sensitive data, even when they’re away from the company premises. Mobile handheld devices registered to the network even enable multiple layers of authentication to ensure that no bad actors can access the system. Basic computer network components Computer networks share common devices, functions, and features including servers, clients, transmission media, shared data, shared printers and other hardware and software resources, network interface card(NIC), local operating system(LOS), and the network operating system (NOS). Servers - Servers are computers that hold shared files, programs, and the network operating system. Usually, servers have high processing and storage capabilities with large RAM. Servers provide access to network resources to all the users of the network. There are many different kinds of servers, and one server can provide several functions. For example, there are file servers, print servers, mail servers, communication servers, database servers, fax servers and web servers. Sometimes it is also called host computer, servers are powerful computer that store data or application and connect to resources that are shared by the user of a network. Clients - Clients are computers that access and use the network and shared network resources. Client computers are basically the customers (users) of the network, as they request and receive services from the servers. Client computers (work stations) have limited capabilities. Each station is assigned to a specific user through a single address according to the address of the network card NIC. These days, it is typical for a client to be a personal computer that the users also use for their own non-network applications. Transmission Media - Transmission media are the facilities used to interconnect computers in a network, such as twisted-pair wire, coaxial cable, and optical fiber cable. Transmission media are sometimes called transmission medium channels, links or lines. Shared data - Shared data are data that file servers provide to clients such as data files, printer access programs and e-mail. Shared printers and other peripherals - Shared printers and peripherals are hardware resources provided to the users of the network by servers. Resources provided include data files, printers, software, or any other items used by clients on the network. Network Interface Card - Each computer in a network has a special expansion card called a network interface card (NIC). The NIC prepares(formats) and sends data, receives data, and controls data flow between the computer and the network. Local Operating System - A local operating system allows personal computers to access files, print to a local printer, and have and use one or more disk and CD drives that are located on the computer. Examples are MS-DOS, Unix, Linux, Windows 2000, Windows 98, Windows XP etc. Network Operating System - The network operating system is a program that runs on computers and servers that allows the computers to communicate over the network. Message routing devices (connection devices) – Message routing devices are devices, which enable complete connectivity between more then two hosts on the network without any host requiring more than a single network interface card (NIC). Each NIC connects directly to the routing device which handles the flow of data on the network. Multiple routing devices can be connected together in the same way to create even larger Ethernet networks. (HUBs, repeaters, switches, bridges, and routers) are examples of message routing devices. Computer networks Classification criteria Computer Networks can be classified according to the following criteria: 1. Network control center. 2. Method of accessing resources. 3. Geographical scope. 4. Management. 5. Network Topology. 6. The communication medium. 1. According to Network control center: Under this criteria, networks have two categories, Centralized and Distributed Networks. A. Centralized Network: This network contains a large mainframe computer called the host. This host is responsible for most of the processing and control of network resources. The rest of the devices are small workstations. B. Distributed Network: In this network, group of computers are connected to each other and share everything. Devices in this type of network take turns controlling network resources. 2. According to the method of accessing resources A. Public Network Public networks are intended for public use and provide public services such as the Internet. Public networks are owned and operated by a public company or multiple companies that coordinate among each other. B. Private Network A private network is an internal local network of an organization that owns and operates the network. Anyone outside this organization can not access this network unless the organization give him a permission and determines the scope of this permission. 3. According to the Geographical scope Based on geographical spread, networks can be classified into the following three categories: A. Local Area Network (LAN) B. Wide Area Network (WAN) C. Metropolitan Area Network (MAN) A. Local Area Network (LAN) Local area network (LAN) is a computer network that consists of few computers and other communication devices connected in the form of a network within a well-defined area such as a room or a building. A typical example is a college or university computer network. Users in a LAN can share both hardware and sharable software resources. For example, hardware resources include expensive laser printer, plotter, fax machines, modem, etc. Almost all local area networks use a single communication media, as it restricted to a limited area. All network resources and their management activities are controlled using special system software called Network Operating System (NOS). LAN 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 and the the data transmission error rate is very low. An example of this type of network is the Ethernet. B. Wide Area Network (WAN) Wide area network (WAN) WAN is a computer network that spans a large geographical area that may include multiple countries or the whole world. It uses dedicated or switched connections to link computers in geographically remote locations. Wide area networks are implemented to connect a large number of LANs and MANs. Due to this reason, it is possible to see a large number of heterogeneous components in a wide area network. Different communication media used, and the network spreads across several national boundaries. Computers connected to a WAN often connected to a public network. They can also be connected through leased lines or satellite links. The government or large concerns mostly use WAN because of the considerable investment made to implement them. WAN depends on telephone networks as a transmission media, so that, its data transfer rate is low and the error rate in data transmission is very high. The Internet is the biggest WAN network. C. Metropolitan Area Network (MAN) Metropolitan area network (MAN) MAN is a network more extensive than a LAN. The name metropolitan is due to the ability to cover a relatively larger area of a city, from a few tens to a maximum of hundred kilometers. Different hardware and transmission media often used in a MAN for efficient transmission of information. MAN 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. Moreover, the error data transmission rate is low in WANs. The following table shows the area scope for the LAN, MAN, and WAN networks: 4. According to the Management Managing networks in a very important issue and some entity has to take the responsibility of managing and controlling the network. According to the management, networks fall under one of the following two types: A. Peer-to-Peer A peer-to-peer network is one in which two or more PCs share files and access to devices such as printers without requiring a separate server computer or server software. It contains devices of equal capabilities, all of them are peers to each other and there is no dedicated device to control the network. In peer-to-peer networks, 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). peer-to-peer networks have some advantages. firstly, no additional software required for network configuration and setup. Also, no servers are needed. So that, peer-to-peer networks are cheap. Moreover, each user in the network acts as if he is the administrator of the network. Therefore, Each user is free to choose the level of security in his device. On the other hand, peer-to-peer networks have some disadvantages too. It can not be expanded to more than 10 hosts. Besides, 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. Because each user is free to choose the level of security in his device, the network suffers from low security measures. Furthermore, users in peer-to-peer networks need training to work efficiently on the devices. B. Client/Server Network In client-server network networks, certain computers act as servers and others act as clients. A server is simply a computer that provides the network resources and provides service to other computers when they request it. A client is the computer running a program that requests the service from a server. A client-server network is one on which all available network resources such as files, directories, applications and shared devices, are centrally managed and hosted and then are accessed by the client. A client usually does not share any of its resources, but it requests content or service from a server. Client server networks are defined by the presence of servers on a network that provide security and administration of the network. Types of Servers The different types of servers are File server − These servers provide the services for storing, retrieving and moving the data. A user can read, write, exchange and manage the files with the help of file servers. Printer server − The printer server is used for controlling and managing printing on the network. It also offers the fax service to the network users. Application server − The expensive software and additional computing power can be shared by the computers in a network with the help of application servers. Message server − It is used to co-ordinate the interaction between users, documents and applications. The data can be used in the form of audio, video, binary, text or graphics. Database server − It is a type of application server. 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. Advantages: 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 Disadvantages: 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. 5. According to the Network Topology A Network Topology is the arrangement with which computer systems or network devices are connected to each other. The different network topologies are: A. Star Topology: All hosts in Star topology are connected to a central device, known as hub device, using a point-to-point connection. That is, there exists a point to point connection between hosts and hub. The electronic signal is transmitted from the sending device through the Hub to all the computers on the network. Hub Advantages: 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. Disadvantages: This kind of network uses a large amount of wire that 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). 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. Advantages 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. Disadvantages The process of detecting, diagnosing and fixing the malfunction is not easy. If you want to add a new device to the network, you have no choice but to break the cable ring, which is likely to bring down the entire network. Failure of any station causes the network to stop working completely. C. Bus topology Network This type of topology is the most basic one. The backbone of this architecture, the transmission medium, consists of a single piece of wire to which all network devices are directly connected. 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. Advantages 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. Disadvantages 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 signals will collide. D. Hybrid topology Network hybrid topology means that—a combination of two or more types of physical or logical network topologies working together within the same network. The following figure depicts a simple hybrid network topology; it shows three star topology networks that are connected to each other via a ring topology. PHYSICAL (Transmission) MEDIA There are three types of popular cables used in modern networking designs: Coaxial Twisted-pair Fiber optic Coaxial Cable Coaxial cable, referred to as coax, contains a center conductor made of copper that’s surrounded by a plastic jacket with a braided shield over it. Coaxial cable is used to connect computers in a network. The following figure shows an example of a coaxial cable. The outer conductor shields the inner conductor from picking up stray signal from the air. Thin coaxial cable, also referred to as Thinnet or 10Base2, is a thin cable. It is basically the same as thick coaxial cable except it’s only about 5 mm diameter coaxial cable. Thin coaxial cable is Radio Grade 58, or just RG- 58. The name 10BASE2 is derived from several characteristics of the physical medium. The 10 comes from the transmission speed of 10 Mbit/s. The BASE stands for baseband signalling, and the 2 for a maximum segment length approaching 200 m (the actual maximum length is 185 m). Thin coaxial cable uses a connector resembles the coaxial connector used for cable TV. Thin cable uses connectors called BNC connectors to attach stations to the network. the following figure shows the BNC connector. When we use thinnet cables, we have to use 50 ohm terminating resistors at each end of the cable in order to achieve the proper performance. The following table shows the different connector types, impedance and there use. Category Impedance Use RG-59 75 W Cable TV RG-58 50 W Thin Ethernet RG-11 50 W Thick Ethernet Each Ethernet cable type has something known as inherent attenuation, which is defined as the loss of signal strength as it travels the length of a cable. Usually, a repeater is used to regenerate the weakened signals. Here are the original IEEE 802.3 standards for coax cables: 10Base2 is also known as Thinnet and can support up to 30 workstations on a single segment. It uses 10 Mbps of baseband technology, coax up to 185 meters in length, and a physical and logical bus with Attachment Unit Interface (AUI) connectors. The 10 means 10 Mbps, and Base means baseband technology—a signaling method for communication on the network—and the 2 means almost 200 meters. 10Base2 Ethernet cards use BNC (British Naval Connector, or Bayonet Nut Connector) and T-connectors to connect to a network. 10Base5 Also known as Thicknet, 10Base5 uses a physical and logical bus with AUI connectors, 10 Mbps baseband technology, and coax up to 500 meters in length. You can go up to 2,500 meters with repeaters and 1,024 users for all segments. Twisted-pair cable Twisted-pair cable consists of multiple individually insulated wires that are twisted together in pairs. Twisted-pair cable is a type of cabling that is used for telephone communications and most modern Ethernet networks which is 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) and it’s used in twisted-pair Ethernet (10BaseT, 100BaseTX, 1000BaseTX) networks. Unshielded Twisted-Pair UTP) UTP consists of 4 pairs (8 wires) of insulated copper wires typically about 1 mm thick. The wires are twisted together to reduce the interference between pairs of wires. This cable type is the most common today for the following reasons: It’s cheaper than other types of cabling. It’s easy to work with (flexible). It allows high transmission rates. Ethernet cable types are described using a code that follows this format: N X. The N refers to the signaling rate in megabits per second. stands for the signaling type—either baseband or broadband—and the X is a unique identifier for a specific Ethernet cabling scheme. Here’s a common example: 100Base X. The 100 tells us that the transmission speed is 100 Mb, or 100 megabits. The X value can mean several different things; for example, a T is short for twisted-pair. 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. UTP cables has the following categories (Category is often shortened to Cat): Cat 1: Two twisted wire pairs (four wires). It’s the oldest type and is only for voice transmission — it isn’t rated for data communication. Cat 3: Four twisted wire pairs (eight wires) with three twists per foot. This type can handle transmissions up to 16 MHz. It was popular in the mid-1980s for up to 10 Mbps Ethernet, but it’s now limited to telecommunication equipment and, again, is obsolete for networks. Cat 4: Four twisted wire pairs (eight wires), rated for 20 MHz; also obsolete. Cat 5: Four twisted wire pairs (eight wires), used for 100BaseTX (two pair wiring) and rated for 100 MHz. But why use Cat 5 when you can use Cat 5e for the same price? Cat 5e (Enhanced): Four twisted wire pairs (eight wires), recommended for 1000BaseT (four pair wiring) and rated for 100 MHz but capable of handling the disturbance on each pair that’s caused by transmitting on all four pairs at the same time—a feature that’s needed for Gigabit Ethernet. Any category below 5e shouldn’t be used in today’s network environments. Cat 6: Four twisted wire pairs (eight wires), used for 1000BaseTX (two pair wiring) and rated for 250 MHz. Cat 6 became a standard in June 2002. Cat 6A (Augmented): Basic Cat 6 cable has a reduced maximum length when used for 10GBaseT; however, Cat 6A cable, or Augmented Cat 6, is characterized to 500 MHz and has improved crosstalk characteristics, which allows 10GBaseT to be run for up to 100 meters. UTP wiring connection UTP cables use a registered jack (RJ) connector, most telephones connect with them. The connector used with UTP cable is called RJ-11 for phones that use four wires; RJ-45 has four pairs (eight wires), as shown in the following figure. We don’t use RJ-11 for local area networks (LANs), but we do use them for our home Digital Subscriber Line (DSL) connections. 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 complementary: One is white with a colored stripe; the other is colored with a white stripe. For example, the orange pair has a white wire with an orange stripe (called white/orange) and an orange wire with a white stripe (called orange/white). Likewise, the blue pair has a white wire with a blue stripe (white/blue) and a blue wire with a white stripe (blue/white). When you attach a twisted-pair cable to a modular connector or jack, you must match up the right wires to the right pins. You can use several different standards to wire the connectors. You can use one of the two popular standard ways of hooking up the wires. One is known as 568A; the other is 568B. the following table shows both wiring schemes. Pin Connections for Twisted-Pair Cable Pin Number Function 568A 568B Pin 1 Transmit + White/green White/orange Pin 2 Transmit - Green Orange Pin 3 Receive + White/orange White/green Pin 4 Unused Blue Blue Pin 5 Unused White/blue White/blue Pin 6 Receive - Orange Green Pin 7 Unused White/brown White/brown Pin 8 Unused Brown Brown It doesn’t matter which of these wiring schemes you use, but pick one and stick with it. If you use one wiring standard on one end of a cable and the other standard on the other end, the cable won’t work. The following figure shows the connection of RJ-45 using the two standards. 10BaseT and 100BaseT actually use only two of the four pairs, connected to pins 1, 2, 3, and 6. One pair is used to transmit data, and the other is used to receive data. The only difference between the two wiring standards is which pair is used for transmit and receive. In the 568A standard, the green pair is used for transmit and the orange pair is used for receive. In the 568B standard, the orange pair is used for transmit and the green pair for receive. Some people wire 10baseT cable differently — using the green and white pair for pins 1 and 2 and the orange and white pair for pins 3 and 6. This doesn’t affect the operation of the network (the network is color-blind), as long as the connectors on both ends of the cable are wired the same. Ethernet Crossover An Ethernet crossover cable is a network cable used to connect two Ethernet network devices directly, such as two computers without a switch or router in between. They are used to send and receive data by enabling complex data transfers between computers, routers, and networks. Ethernet crossover cables are similar to straight-through cable except that they have pairs of wires that crisscross. Their internal wiring reverses the incoming and outgoing signals. It uses a design that allows the data output pins on one end of the cable to be connected directly to the data input pins on the other end of the cable. The following figure shows the crossover wiring for the 568A, 568B standards. Fiber-Optic Cables A fiber optic cable is a network cable that contains glass fibers inside an insulated casing. They're designed for long-distance, high- performance data networking. Compared to wired cables, fiber optic cables provide higher bandwidth and transmit data over longer distances. Optical fibers use light to send information through the optical medium. fiber-optic cable transmits digital signals using light impulses rather than electricity, so that, it’s immune to radio frequency interference (RFI). Fiber cable allows light impulses to be carried on either a glass or a plastic core. Glass can carry the signal a greater distance, but plastic costs less. The optical fiber elements are individually coated with plastic layers and contained in a protective tube suitable for the environment where the cable is used. A fiber optic cable consists of one or more strands of glass, each only slightly thicker than a human hair. The center of each strand is called the core, which provides the pathway for light to travel. The core 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. The two primary types of optical fiber cables are single mode and multi- mode. Single-mode fiber uses extremely thin glass strands and a laser to generate light, while multi-mode optical fiber cables use LEDs In general, there are two kinds of optical fiber: fibers that support many propagation paths or transverse modes are called multimode fibers (MMF), while those that support a single mode are called single mode fibers (SMF). Single mode fiber: A fiber featuring a small light-carrying core of about 9 micrometers (µm) in diameter. For reference, a human hair is closer to 100 µm. The core is surrounded by a cladding that brings the overall diameter of the optical fiber to 125 µm. the transmission distance can reach to at least 5 km, it is used for long-distance signal transmission. Multimode fiber: A fiber with a core of 50 µm or above. A larger core means multiple modes (or rays of light) can travel down the core simultaneously. Just like single mode, the core is surrounded by a cladding that brings the overall diameter of the optical fiber to 125 µm. It is used for communication over short distances, such as within a building or on a campus. Typical 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. Total Internal Reflection Optical fibers rely on total internal reflection for their operation. There is an angle that for any given fiber defines total internal reflection. At higher angles a ray of light will still be refracted but not enough to be reflected back into the core, so it is lost in the cladding of the fiber. Below that angle, it will be reflected back into the core of the fiber and transmitted to the end of the fiber. When light strikes the boundary between glass and air at less than the critical angle (θc), it is refracted and partially reflected; (centre) when it meets the boundary at the critical angle, it is refracted parallel to the boundary; (right) when it meets the boundary at more than the critical angle, it is reflected totally. 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. WIRELESS TRANSMISSION MEDIA Many users choose wireless transmission media because it is more convenient than installing cables. In addition, businesses use wireless transmission media in locations where it is impossible to install cables. Types of wireless transmission media used in communications include infrared, broadcast radio, cellular radio, microwaves, and communications satellites. Infrared Infrared is used for short-range communication like TV remotes, mobile phones, personal computers etc. The limitation of infrared rays is that they cannot penetrate any obstacles and can only use for short-range. Mobile computers and devices, such as a mouse, printer, and smart phone, often have an IrDA port that enables the transfer of data from one device to another using infrared light waves. Radio Waves Radio waves can travel large distances, easy to generate and can penetrate through buildings. The requirement of radio waves is antennas, sending antennas where one can transmit its message and the other is receiving antennas. Some private and government organizations reserve certain radio frequencies for direct communication. Bluetooth, Wi-Fi, and WiMAX communications technologies use broadcast radio signals. Cellular Radio Cellular radio is a form of broadcast radio that is used widely for mobile communications, specifically wireless modems and cell phones. A cell phone is a telephone device that uses high-frequency radio waves to transmit voice and digital data messages. Microwaves Microwaves are a line of sight transmission, meaning both the antennas sending and receiving should be properly aligned. Also, the distance covered by the signal is directly proportional to the height of the antenna. Microwaves have a frequency Range between 1GHz – 300GHz. Basically, we used Microwaves in mobile phones communication and television distribution. Unlike radio waves, they are unidirectional, as they can move in only one direction, and therefore it is used in point-to-point communication or unicast communication such as radar and satellite. It is a very fast way of communication; however, its installation and maintenance are very expensive. Moreover, microwaves are not very effective in bad weather conditions. Communications Satellite A communications satellite is a space station that receives microwave signals from an earth-based station, amplifies the signals, and broadcasts the signals back over a wide area to any number of earth-based stations. NIC A network interface card (NIC), (also known as a network interface controller, network adapter, LAN adapter or physical network interface) is a computer hardware component that connects a computer to a computer network. We can summaries the purpose of the NIC as follows: 1) Physical access to the network. 2) NIC allows both wired and wireless communications. 3) Overcoming the speed difference between the speed of data transmission in wires and the speed of data reception in the computer. 4) Translate electrical signals from the network wire into bytes that the computer processor understands and vice versa. 5) Determine the physical (MAC) address of the computer. 6) NIC is both a physical layer and a data link layer device, i.e. it provides the necessary hardware circuitry so that the physical layer processes and some data link layer processes can run on it. MAC ADDRESS A media access control (MAC) address is a unique 48-bits hardware identifier assigned to a network interface controller (NIC) for use as a network address in communications within a network segment. MAC Addresses are unique for each computer. MAC addresses are primarily assigned by device manufacturers, and are therefore often referred to as the burned-in address, or as an Ethernet hardware address, hardware address, or physical address. MAC Address is a 12-digit hexadecimal number (6-Byte binary number), which is mostly represented by Colon-Hexadecimal notation. The first 3 bytes identify a vendor (also called prefix) and the last 3 bytes are unique for every host or device. The following figure shows an example of a MAC address: All devices on the same network subnet have different MAC addresses. For a network administrator, that makes a MAC address a more reliable way to identify senders and receivers of data on the network. MAC address types: There are three types of the MAC address, static, configurable, and dynamic. Static MAC address: It is a fixed physical address stored inside the network card and can only be changed by changing the network card itself. Static MAC addresses have several advantages: 1. Easy to use 2. NIC cards from different manufacturers can be used in a single network without address conflicts. 3. Permanent (does not change each time the computer is rebooted) Dynamic MAC address: It is a method that gives each computer a physical address when the computer starts up. Advantages: ◦ No need for the hardware manufacturers to coordinate addresses. ◦ Addresses will be small, as each address has to be unique in a single LAN. Disadvantages: ◦ Address conflict may happen as two computers may choose the same address. ◦ Each time a computer boots, it obtains a new address; other computers must learn the new address before they can communicate. Configurable MAC address: In this type, the computer user can set the physical address himself manually or electronically through EPROM programming. Configurable addressing provide a compromise between the static and dynamic schemes. Like static addresses, configurable addresses are permanent. Like dynamic addresses, configurable addresses do not need to be large because the address is unique only on one network. When a NIC fails and must be replaced, a configurable NIC can be replaced without changing the physical address of the computer. 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 Any message sent across the LAN contains two addresses, the address of the sending computer (source) and the address of the intended recipient (destination). Packets and Frames Computer networks do not transfer the message data continuously, the network system divides data 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. Most technologies have frames that each consist of a header followed by a data area. The following figure shows an example of the frame format. Frame Header Frame Data Area A frame header contains information used to process the frame. In particular, a header usually contains an address that specifies the intended recipient. The payload (data) area contains the message being sent, and is usually much larger than the frame header. In most network technologies, the message is opaque in the sense that the network only examines the frame header. Thus, the payload can contain an arbitrary sequence of bytes that are only meaningful to the sender and receiver. Internetworking Protocols And Layering Hardware alone does not solve all communication problems. In the very first networks, the computers involved could communicate only with other computers made by the same manufacturer. To communicate with computers made by other manufacturers, computers use complex software that provides a convenient interface for applications, making applications to communicate easily. However, applications do not interact with hardware directly. All computers must agree on a set of rules to be used when exchanging messages, these rules are called network protocol. Instead of having a single huge protocol, designers have chosen to divide the communication problem into sub-pieces and to design a separate protocol for each sub-piece. Doing so, makes each protocol easier to design, analyze, implement and test. In the late 1970s, The International Standards Organization (ISO) defined a 7-layer reference model called Open Systems Interconnect (OSI). One advantage of dividing the communication protocol into layers is that, it prevents changes in one layer from affecting other layers, facilitating development and making application programming much easier. Although the OSI model is a just a model, it is generally regarded as the most complete model. The OSI model describes how data and network information are communicated from an application on one computer through the network media to an application on another computer. ISO/OSI Reference Model One of the greatest functions of the OSI specifications is to assist in data transfer between disparate (different) hosts regardless if they’re Unix, Windows, or Mac. The following figure shows the different layers of the OSI model: The role of each layer is as follows: Layer 1 (Physical layer): The Physical layer specifies the electrical, mechanical, procedural, and functional requirements for activating, maintaining, and deactivating a physical link between end systems. The Physical layer communicates directly with the various types of actual communication media. It deals with the transmission of 0s and 1s over the physical media, i.e, it is responsible of translation of bits into signals and vice versa. Layer 2 (Data link layer): Data link layer Specifies how to organize data into frames and how to transmit frames over a network. The Data Link layer provides the physical transmission of the data and handles error notification, network topology, and flow control. This means the Data Link layer ensures that messages are delivered to the proper device on a LAN using hardware (MAC) addresses and translates messages from the Network layer into bits for the Physical layer to transmit. It contains Data Link Control and Medium Access Control sublayers. Layer 3 (Network layer): Layer 3 protocols specify how addresses are assigned and how packets are forwarded from one end of the network to another. It is responsible for the following: o It manages logical device addressing. o Path selection between end-systems (routing). o Flow control. o Fragmentation & reassembly o Translation between different network types. o Determines the best way to move data. Layer 4 (Transport layer): Transport layer protocols specify how to handle details of reliable transfer. Reliable transfer means that messages arrive to the destination with error free, and messages arrive in sequence and without duplication. This means that, transport layer provides end-to-end flow control. 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. Layer 5 (Session layer): Layer 5 protocols specify how to establish a communication session with a remote system. it establishes, manages, and terminates sessions between applications. Moreover, specification of security details such as authentication using passwords belong to this layer. the Session layer basically keeps applications’ data separate from other applications’ data. For example, the Session layer allows multiple web browser sessions on your desktop at the same time. Layer 6 (Presentation layer): The Presentation layer gets its name from its purpose: it presents data to the Application layer and is responsible for data translation and code formatting. Also, Presentation layer is responsible of translating data between applications (for example, from ASCII code to EBCDIC code). By providing translation services, the Presentation layer ensures that the data transferred from one system’s Application layer can be read and understood by the Application layer on another system. To sum up, we can say that the Presentation layer is responsible for data encryption, data compression, data conversion (Character set conversion). Layer 7 (Application layer): Layer 7 protocol specifies how one particular application uses a network. The protocol specifies the details of how an application program on one machine makes a request and how the application on another machine responds. The Application layer chooses and determines the availability of communicating partners along with the resources necessary to make their required connections. The following figure summarize the role of each OSI model layer: 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 (at the destination device) uses the control information. The following figure clarifies the idea. When a host transmits data across a network to another device, the data goes through encapsulation: It’s wrapped with protocol information at each layer of the OSI model. Each layer communicates only with its peer layer on the receiving device. To communicate and exchange information, each layer uses Protocol Data Units (PDUs). PDUs hold the control information attached to the data at each layer of the model. They’re usually attached to the header in front of the data field but can also be in the trailer, or end, of it. At a transmitting device, the data-encapsulation method works like this: 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 or datagrams are converted to frames for transmission on the local network. Hardware (MAC) addresses are used to uniquely identify hosts on a local network segment. Frames carry packets. 5. Frames are converted to bits, and a digital encoding and clocking scheme is used. The following figure illustrates these steps: TCP/IP PROTOCOL SUITE It is important to understand that the OSI model provides for a conceptual framework, and no modern protocols implement this model fully. The OSI model is an idealised networking Communication in the Internet depends mainly on the protocol called Transmission Control Protocol/Internet Protocol (TCP/IP) protocol. The TCP/IP protocol layers differ from the OSI model layers, as the TCP/IP protocol consists of only 5 layers as shown in the following figure: Layer 1: Physical Corresponds to Layer 1 in OSI model, which is the physical layer of the network. It specifies the characteristics of the hardware to be used for the network. For example, physical network layer specifies the physical characteristics of the communications media. The physical layer of TCP/IP describes hardware standards such as IEEE 802.3. Layer 2: Data link Corresponds to Layer 2 in OSI model. It specifies how data is divided into frames and how these frames are sent over the network. Layer 3: Network (Internet) Specifies the format of packets to be sent over the Internet. It also specifies how these packets are routed through multiple routers to their final destination. This layer includes the powerful Internet Protocol (IP), the Address Resolution Protocol (ARP), and the Internet Control Message Protocol (ICMP). Layer 4: Transport Corresponds to Layer 4 in OSI model. The TCP/IP transport layer ensures that packets arrive in sequence and without error, by swapping acknowledgments of data reception, and retransmitting lost packets. This type of communication is known as end-to-end. Transport layer important protocols at this level are Transmission Control Protocol (TCP), User Datagram Protocol (UDP). Layer 5: Application Corresponds to Layers 5, 6, and 7 in OSI model. The application layer defines standard Internet services and network applications that anyone can use. These services work with the transport layer to send and receive data. Many application layer protocols exist such as ftp, telnet, and SNMP. Connection devices Networking doesn't work without the physical and virtual devices that make up the network infrastructure. Network devices, also known as networking hardware, are physical devices that allow hardware on a computer network to communicate and interact with one another. This section explores the network devices that are commonly used within enterprise network infrastructures. 1. Repeater A repeater operates at the physical layer. Its job is to regenerate the signal over the same network before the signal becomes too weak or corrupted to extend the length to which the signal can be transmitted over the same network. An important point to be noted about repeaters is that they do not amplify the signal. When the signal becomes weak, they copy it bit by bit and regenerate it. It is a 2-port device. 2. Hub A hub is a basically multi-port repeater, it may include up to 32 ports. A hub connects multiple wires coming from different branches, for example, the connector in star topology which connects different stations. Hubs do not perform packet filtering or addressing functions; they just send data packets to all connected devices. When it receives any data, it sends it to all ports except the port it came from. Types of Hubs: A. Active Hub:- These are the hubs that have their power supply and can clean, boost, and relay the signal along with the network. It serves both as a repeater as well as a wiring center. These are used to extend the maximum distance between nodes. B. Passive Hub:- This type does not enhance the signal and does not have a power supply. These hubs relay signals onto the network without cleaning and boosting them and can’t be used to extend the distance between nodes. C. Hybrid Hub:- This type is based on the mixing of different media types, meaning that UTP & Coaxial cables and any other type of cable can be connected in one hub. D. Intelligent Hub:- It works like an active hub and includes remote management capabilities. They also provide flexible data rates to network devices. It also enables an administrator to monitor the traffic passing through the hub and to configure each port in the hub. This type allows the ports to be divided into different logical networks. 3. Bridge – A bridge operates at the data link layer. A bridge is a repeater, with add on the functionality of filtering content by reading the MAC addresses of the source and destination. It is also used for interconnecting two LANs working on the same protocol. It contains only two ports. This device creates a routing table containing the physical addresses of the devices to determine the correct destination for the passing message. A large LAN can be partitioned using a bridge to improve performance and increase transmission speed through the network. The bridge creates a routing table for messages containing the address and location of each device in the network. At first this table is empty and then fill it bit by bit. 4. Switch – A switch is a multiport bridge with a buffer and a design that can boost its efficiency (a large number of ports imply less traffic) and performance. A switch is a data link layer device. The switch can perform error checking before forwarding data, which makes it very efficient as it does not forward packets that have errors and forward good packets selectively to the correct port only. 5. Routers:- A router is a device like a switch that routes data packets based on their IP addresses. The router is mainly a Network Layer device. Routers normally connect LANs and WANs (i.e, it connects networks not devices) and have a dynamically updating routing table based on which they make decisions on routing the data packets. The role of the router ends when the message reaches the target network, and then other devices (Switch, Hub, …) start delivering the message to the target device. 6. Access point An access point (AP) is a device that sends and 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, enabling them to join the wireless LAN created by the AP. An Ethernet cable physically connects the AP to a router or switch in a wired LAN, which provides the AP with access to the internet and the rest of the network. APs operate at Layer 2 of the OSI model -- the data link layer. Internetworking Despite the incompatibilities among network technologies, researchers have devised a scheme that provides universal service among heterogeneous networks. Called internetworking, the scheme uses both hardware and software. Additional hardware systems are used to interconnect a set of physical networks. Software on the attached computers then provides universal service. The resulting system of connected physical networks is known as an internetwork or internet. Internetworking is quite general. In particular, an internet is not restricted in size. internets exist that contain a few networks and the global Internet contains tens of thousands of networks. Physical Network Connection with Routers The basic hardware component used to connect heterogeneous networks is a router. Physically, a router is an independent hardware system dedicated to the task of interconnecting networks. A router contains a processor and memory as well as a separate I/O interface for each network to which it connects. The network treats a connection to a router the same as a connection to any other computer. The following figure shows two physical networks connected by a router, which has a separate interface for each network connection. Computers can attach to each network. The figure uses a cloud to depict each network because router connections are not restricted to a particular network technology. A router can connect two LANs, a LAN and a WAN, or two WANs. Internet Architecture Routers make it possible for organizations to choose network technologies appropriate for each need and to use routers to connect all networks into an internet. For example, the following figure illustrates how three routers can be used to connect four arbitrary physical networks into an internet. Although the figure shows each router with exactly two connections, commercial routers can connect more than two networks. The goal of internetworking is universal service across heterogeneous networks. To provide universal service among all computers on an internet, routers must agree to forward information from a source on one network to a specified destination on another. The task is complex because frame formats and addressing schemes used by the underlying networks can differ. As a result, protocol software is needed on computers and routers to make universal service possible. A Virtual Network In general, Internet software provides the appearance of a single, seamless communication system to which many computers attach. The system offers universal service: each computer is assigned an address, and any computer can send a packet to any other computer. Furthermore, Internet protocol software hides the details of physical network connections, physical addresses, and routing information. neither users nor application programs are aware of the underlying physical networks or the routers that connect them. The following figure illustrates the virtual network concept as well as a corresponding physical structure. IP Addresses It is essential that each computer can communicate with other computers in the Internet. Therefore, a unified addressing method must be used for all networks to ensure this connection between computers. Since the shape and length of physical addresses vary with the type of network and manufacturing technology, it is not enough to rely on them for addressing through the Internet. The IP protocol provides a logical addressing method for computers in the Internet that ensures that each computer is given a unique address that is used for all communications with that computer. This address is called IP address. IP address is an address having information about how to reach a specific host, especially outside the LAN. An IP address is a 32 bit unique address having an address space of 232. Each packet passing through the Internet carries the IP address of the sender and the IP address of the receiver. Generally, there are two notations in which IP address is written, dotted decimal notation and hexadecimal notation. Dotted Decimal Notation: In this notation, the value of any byte is between 0 and 255 (both included), and there are no zeroes preceding the value in any segment (054 is wrong, 54 is correct). Hexadecimal Notation: Generally, IPv4 address is divided into two parts: Prefix (Network ID) Suffix (Host ID) The 32 bit IP address is divided into five sub-classes. The class of IP address is used to determine the bits used for network ID and host ID and the number of total networks and hosts possible in that particular class. Each Internet Service Provider (ISP) or network administrator assigns IP address to each device that is connected to its network. 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 Each of these classes has a valid range of IP addresses. Classes D and E are reserved for multicast and experimental purposes respectively. The order of bits in the first octet determine the classes of IP address as shown in the following table. For example, the IP address belonging to class A are assigned to the networks that contain a large number of hosts. The network ID is 8 bits long. The host ID is 24 bits long. The higher order bit of the first octet in class A is always set to 0. The remaining 7 bits in first octet are used to determine network ID. The 24 bits of host ID are used to determine the host in any network. Therefore, class A has a total of: 2^7-2= 126 network ID 2^24 – 2 = 16,777,214 host ID The following figure summarizes the maximum number of networks available in each class and the maximum number of hosts per network. Note 1: IP addresses are globally managed by Internet Assigned Numbers Authority(IANA) and regional Internet registries(RIR). Note 2: While finding the total number of host IP addresses, 2 IP addresses are not counted and are therefore, decreased from the total count because the first IP address of any network is the network number and whereas the last IP address is reserved for broadcast IP. Subnet Mask For IPv4, a network may be characterized by its subnet mask or netmask, which is the bitmask that, when applied by a bitwise AND operation to any IP address in the network, yields the network prefix. A subnet mask is a 32-bit number created by setting host bits to all 0s and setting network bits to all 1s. The subnet mask splits the IP address into the host and network addresses, thereby defining which part of the IP address belongs to the device and which part belongs to the network. Subnet masks are also expressed in dot-decimal notation like an IP address. Class A, B, and C networks have default subnet masks as follows: Class A: 255.0.0.0 Class B: 255.255.0.0 Class C: 255.255.255.0 Special IP addresses: It is convenient to have addresses that can be used to denote networks or sets of computers. IP defines a set of special address forms that are reserved. Special IP addresses are never assigned to hosts. Network address: It is convenient to have an address that can be used to denote the prefix assigned to a given network. IP reserves host address zero and uses it to denote a network. For example, the address 128.211.0.0 denotes the network that has assigned the class B prefix 128.211. the network address refers to the network itself and not to the host computers attached to that network. Thus, the network address should never appear as the destination address in a packet. Direct broadcast address: This address is used to send a copy of a packet to all hosts on a physical network. The direct broadcast address is formed by adding a suffix that consists of all 1 bits to the network prefix. The administrator must not assign the all-zeros or all-ones host address to a specific computer. Limited broadcast address: Limited broadcast address means a broadcast on a local physical network. IP reserves the address consisting of all 1 bits to refer to limited broadcast. Thus, IP will broadcast any packet sent to the all- ones address across the local network. This computer address: A computer needs to know its IP address to send or receive packets because each packet contains the address of the source and destination. TCP/IP contains protocols a computer can use to obtain its IP address automatically when the computer boots. When using such startup protocols, a computer cannot supply a correct IP source address. To handle such cases, IP reserves the address that consists of all zeroes to mean this computer. Loopback Address IP defines a loopback address used to test network applications. Programmers often use loopback for preliminary debugging after a network application has been created. To perform a loopback test, a programmer must have two application programs that are intended to communicate across a network. Each application includes the code needed to interact with TCP/IP protocol software. Instead of executing each program on a separate computer, the programmer runs both programs on a single computer and instructs them to use a loopback address when communicating. When one application sends data to another, data travels down the protocol stack to the IP software, which forwards it back up through the protocol stack to the second program. Thus, the programmer can test the program logic quickly without needing two computers and without sending packets across a network. IP reserves the network prefix 127 for use with loopback. The host address used with 127 is irrelevant — all host addresses are treated the same. By convention, programmers often use host number 1, making 127.0.0.1 the most popular loopback address. During loopback testing no packets ever leave a computer — the IP software forwards packets from one application program to another. Consequently, the loopback address never appears in a packet traveling across a network. The following table summarizes the special IP address forms Summary of classful IP addresses Routers And The IP Addressing Principle In addition to assigning an Internet address to each host, the Internet Protocol specifies that routers should be assigned IP addresses as well. In fact, each router is assigned two or more IP addresses, one for each network to which the router attaches. We have to know that: A router has connections to multiple physical networks. Each IP address contains a prefix that specifies a physical network. Thus, a single IP address does not suffice for a router because each router connects to multiple networks and each network has a unique prefix. The IP scheme can be explained by the following fundamental principle: An IP address does not identify a specific computer. Instead, each IP address identifies a connection between a computer and a network. A computer with multiple network connections (e.g., a router) must be assigned one IP address for each connection. The following figure illustrates the idea with an example that shows IP addresses assigned to two routers that connect three networks. Multi-Homed Hosts Can a host connect to multiple networks? Yes. A host computer with multiple network connections is said to be multi-homed. Multi-homing is sometimes used to increase reliability — if one network fails, the host can still reach the Internet through the second connection. Alternatively, multi- homing is used to increase performance. Connections to multiple networks can make it possible to send traffic directly and avoid routers, which are sometimes congested. Like a router, a multi-homed host has multiple protocol addresses, one for each network connection. Subnet And Classless Addressing CIDR Notation CIDR Host Addresses CHAPTER IP Datagrams and datagram forwarding The goal of internetworking is to provide a packet communication system that allows a program running on one computer to send data to a program running on another computer. In a well-designed internet, application programs remain unaware of the underlying physical networks — they can send and receive data without knowing the details of the local network to which a computer connects, the remote network to which the destination connects, or the interconnection between the two. TCP/IP is a protocol that provides two types of data communication services between sender and receiver connection-oriented service, a connectionless service. The connection-oriented networks operate analogous to a telephone system. In connection-oriented service, before two computers can communicate, they must establish a connection through the network. One of the computers requests the network to establish a connection to the other. After the two computers agree to communicate, the network system forms a data path called a connection, and informs the two computers. Once the connection has been established, the two computers can exchange data. Connectionless networks operate analogous to the postal mail system. Whenever it has data to send, a computer must place the data in the appropriate frame format, attach the destination address, and then pass the frame to the network for delivery. The connectionless network system transports the frame to the prescribed destination and delivers it. Frame Format Because the Internet consists of heterogeneous networks that use incompatible frame formats and incompatible physical addresses, the Internet cannot adopt any of the hardware frame formats. More important, a router cannot simply reformat the frame header because the two networks may use incompatible addressing (e.g., the addresses in an incoming frame may make no sense on another network). Although the details vary, most LAN technologies define a frame consists of two parts: Header: contains information such as the source and destination addresses. Data area: contains the information being sent. Header Data area Frame format To overcome heterogeneity, the Internet Protocol defines a packet format that is independent of the underlying hardware. The result is a universal, virtual packet that can be transferred across the underlying hardware intact. As the term virtual implies, the Internet packet format is not tied directly to any hardware. In fact, the underlying hardware does not understand or recognize an Internet packet. As the term universal implies, each host or router in the Internet contains protocol software that recognizes Internet packets. The IP Datagram TCP/IP protocols use the name IP datagram to refer to an Internet packet. Surprisingly, an IP datagram has the same general format as a hardware frame: the datagram begins with a header followed by a data (or payload) area, as shown in the following figure. The amount of data carried in a datagram is not fixed. The size of a datagram is determined by the application that sends data. Allowing the size of datagrams to vary makes IP adaptable to a variety of applications. In the current version of the Internet Protocol (IP version 4), a datagram can contain as little as a single octet of data or at most 64K octets (including the header). Forwarding An IP Datagram We said that a datagram traverses the Internet by following a path from its initial source through routers to the final destination. 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. The router then forwards the datagram to the next hop, either the final destination or another router. To make the selection of a next hop efficient, an IP router uses a forwarding table. A forwarding table is initialized when the router boots, and must be updated if the topology changes or hardware fails. Conceptually, the forwarding table contains a set of entries that each specify a destination and the next hop used to reach that destination. The following figure shows an example internet and the contents of a forwarding table in router R2. In the figure, each router has been assigned two IP addresses, one for each interface. Router R2, which connects directly to networks 40.0.0.0 and 128.1.0.0, has been assigned addresses 40.0.0.8 and 128.1.0.8. Recall that IP does not require the suffix to be the same on all interfaces — a network administrator has chosen the same suffix for each interface to make it easier for humans who manage the network. The important point to note is the forwarding table size, which is crucial in the global Internet: Because each destination in a forwarding table corresponds to a network, The mask the datagram field and number offorwarding entries in a forwarding table is proportional to the number of networks in the Internet, not the number of hosts. The process of using a forwarding table to select a next hop for a given datagram is called forwarding. The mask field in a forwarding table entry is used to extract the network portion of an address during lookup. When a router encounters a datagram with destination IP address D, the forwarding function must find an entry in the forwarding table that specifies a next hop for D. To do so, the software examines each entry in the table by using the mask in the entry to extract a prefix of address D and comparing the resulting prefix to the Destination field of the entry. If the two are equal, the datagram will be forwarded to the Next Hop in the entry. The bit mask representation makes extraction efficient — the computation consists of a Boolean and between the mask and destination address, D. Thus, the computation to examine the ith entry in the table can be expressed as: If ((Mask[i] & D) == destination[i]) forword to nexthop[i] As an example, consider a datagram destined for address 192.4.10.3, and assume the datagram arrives at the center router, R2, in the previous figure. Further assume the forwarding procedure searches entries of the table in order. The first entry fails because 255.0.0.0&192.4.10.3 is not equal to 30.0.0.0. After rejecting the second and third entries in the table, the routing software eventually chooses next hop 128.1.0.9 because 255.255.255.0 &192.4.10.3 == 192.4.10.0 What is the relationship between the destination address in a datagram header and the address of the next hop to which the datagram is forwarded? The DESTINATION IP ADDRESS field in a datagram contains the address of the ultimate destination; it does not change as the datagram passes through the Internet. When a router receives a datagram, the router uses the ultimate destination, D, to compute the address of the next router to which the datagram should be sent, N. Although the router forwards a datagram to the next hop, N, the header in the datagram retains destination address D. In other words: 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. The IP Datagram Header Format A datagram header contains information used to forward the datagram. In particular, the header contains the address of the source (the original sender), the address of the destination (the ultimate recipient). Each address in the header is an IP address. Each field in an IP datagram header has a fixed size, which makes header processing efficient. The following figure shows the fields of an IP datagram header. The fields of the next table describe each field Header Field Description Version 4 bits - Indicates the format of the Internet header Internet Header 4 bits - Specifies the length of the Internet Length (IHL) header in 32-bit words. If no options are present, the value is 5. Type of Service 8 bits - Provides an indication of the parameters of the quality of service desired for the datagram. Total Length 16 bits - Specifies the length of the datagram, measured in octets including both the header and the data. Identification 16 bits - A unique number (usually sequential) assigned to the datagram that is used to gather all fragments for reassembly. Flags 3 bits - individual bits specifying whether the datagram is a fragment and if so, whether the fragment corresponds to the rightmost piece of the original datagram. Fragment Offset 13 bits - Indicates where in the datagram this fragment belongs. Time to Live 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 that processes the datagram. If the value reaches zero, the datagram is discarded and an error message is sent back to the source Type 8 bits - specifies the type of the payload. Header Checksum 16 bits - ones-complement checksum of header fields. Source Address 32 bits - The source IP address of the original sender. Destination 32 bits - The destination IP address of the Address ultimate destination. Options Variable in length - Optional header fields used to control routing and datagram processing. Most datagrams do not contain any options Padding Internet header padding used to ensure that the Internet header ends on a 32-bit boundary Best-Effort Delivery Although IP protocol makes a best-effort to deliver each datagram, IP does not guarantee that it will handle all problems. Specifically, the IP standard acknowledges that the following problems may occur: - Datagram duplication - Delayed or out-of-order delivery - Corruption of data - Datagram loss In the following section some of the transmission errors and their solution will be discussed. Datagram duplication Sometimes because of hardware malfunction, long packet delay or some other reasons, two copies of a packet arrive to the receiver. To solve this problem, 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. Delayed or 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. To overcome this situation, 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. Packet Loss Packet loss is a fundamental problem in computer networks. When a receiver receives a packet with corrupted bits, it discards the packet. 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. 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. In case that 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. 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. 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 Encapsulation, Fragmentation, and Reassembly IP Encapsulation How can a datagram be transmitted across a physical network that does not understand the datagram format? The answer lies in a technique known as encapsulation. When an IP datagram is encapsulated in a frame, the entire datagram is placed in the payload area of a frame. The network hardware treats a frame that contains a datagram. The following figure illustrates the concept. How does a receiver know whether the payload of an incoming frame contains an IP datagram or other data? The sender and receiver must agree on the value used in the frame type field. When it places a datagram in a frame, software on the sending computer assigns the frame type field the special value that is reserved for IP. When a frame arrives with the IP value in its type field, the receiver knows that the payload area contains an IP datagram. A frame that carries an IP datagram must have a destination address. Therefore, in addition to placing a datagram in the payload area of a frame, encapsulation requires the sender to supply the MAC address of the next computer to which the datagram should be sent. To compute the appropriate address, IP on the sending computer must translate the next-hop IP address to an equivalent MAC address, which is the destination in the frame header. Encapsulation applies to one transmission at a time. After the sender selects a next hop, the sender encapsulates the datagram in a frame and transmits the result across the physical network. When the frame reaches the next hop, the receiving software removes the IP 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. The following figure illustrates the idea: MTU And Datagram Fragmentation Each hardware technology specifies the maximum amount of data that a frame can carry, which is called a maximum 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. In particular, because a router can connect networks with different MTU values, a datagram that a router receives over one network can be too large to send over another network. For example, the following figure illustrates a router that interconnects two networks with MTU values of 1500 and 1000. In the figure, host H1 attaches to a network with an MTU of 1500, and can send a datagram that is up to 1500 octets. Host H2 attaches to a network that has an MTU of 1000, which means that it cannot send or receive a datagram larger than 1000 octets. If host H1 sends a 1500-octet datagram to host H2, router R will not be able to encapsulate the datagram for transmission across network 2. To solve the problem of heterogeneous MTUs, a router uses a technique known as fragmentation. 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, and sends each fragment independently. 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 or a complete datagram. Other fields in the header are assigned information that the ultimate destination uses to reassemble fragments to reproduce the original datagram. In particular, the FRAGMENT OFFSET field in the header of a fragment 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 maximum 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. The following figure illustrates the idea: Reassembly Of A Datagram From Fragments The process of recreating a copy of the original datagram from fragments is called reassembly. Because each fragment begins with a copy of the original datagram header, all fragments have the same destination address as the original datagram from which they were derived. The fragment that carries the final piece of data has an additional bit set in the header. Thus, a host performing reassembly can tell whether all fragments have arrived successfully. IP specifies that the ultimate destination should reassemble fragments. For example, consider the following figure: In the figure, if host H1 sends a 1500-octet datagram to host H2, router R1 will divide the datagram into two fragments, which it will forward to R2. Router R2 does not reassemble the fragments. Instead R2 uses the destination address in a fragment to forward the fragment as usual. The ultimate destination host, H2, collects the fragments, and reassembles them to produce the original datagram. An Error Reporting Mechanism Internet Control Message Protocol (ICMP) We said that IP defines a best-effort communication service in which datagrams can be lost, duplicated, delayed, or delivered out of order. It may seem that a best effort service does not need error detection. It is important to realize, however, that a best-effort service is not careless. IP attempts to avoid errors and to report problems when they occur. In fact, we have already seen one example of error detection in IP: a header checksum that is used to detect transmission errors. When a host creates an IP datagram, the host