PUI CHING MIDDLE SCHOOL AL Computer Studies Notes Chapter 3 Applications of Information Technology by Leung Man Kit and Ma Hoi Hung 3.1 An overview of office automation 3.2 Network Communications 3.3 Applications in industry, commerce, science and education Pui Ching Middle School AL Computer Studies Notes Network communication — Concept and terminology (§3.2) Why linking up computers? Computer networking enables the sharing of hardware, software, data and other resources. Computer networks also provide a base for communication among users. Bandwidth Bandwidth is defined as the amount of information that can flow through a network connection in a given period of time. It is essential to understand the concept of bandwidth when studying networking for the following four reasons: Bandwidth is finite. Bandwidth is not free. Bandwidth is a key factor in analyzing network performance, designing new networks, and understanding the Internet. The demand for bandwidth is ever increasing. Measurement In digital systems, the basic unit of bandwidth is bits per second (bps). Bandwidth is the measure of how much information, or bits, can flow from one place to another in a given amount of time, or seconds. Although bandwidth can be described in bits per second, usually some multiple of bits per second is used. Limitations Bandwidth varies depending upon the type of media as well as the LAN and WAN technologies used. The physics of the media account for some of the difference. Signals travel through twisted-pair copper wire, coaxial cable, optical fiber, and air. The physical differences in the ways signals travel result in fundamental limitations on the information-carrying capacity of a given medium. However, the actual bandwidth of a network is determined by a combination of the physical media and the technologies chosen for signaling and detecting network signals. Page 2 Pui Ching Middle School AL Computer Studies Notes Page 3 Pui Ching Middle School AL Computer Studies Notes Throughput Throughput refers to actual measured bandwidth, at a specific time of day, using specific Internet routes, and while a specific set of data is transmitted on the network. Unfortunately, for many reasons, throughput is often far less than the maximum possible digital bandwidth of the medium that is being used. The following are some of the factors that determine throughput: Internetworking devices Type of data being transferred Network topology Number of users on the network User computer Server computer Power conditions For example, a typical LAN might be built to provide 100 Mbps to every desktop workstation, but this does not mean that each user is actually able to move one hundred megabits of data through the network for every second of use. This would be true only under the most ideal circumstances. Baud rate The time required to transmit a character through a network depends on the encoding method and the signaling speed. Signaling speed — the number of times per second that the signal changes its value (e.g., its voltage) Baud — the number of changes per second in the signal A b baud line does not necessarily transmit b bits per second because each signal may convey several bits. For example, if the voltages 0, 1, 2, 3, 4, 5, 6 and 7 were used, each signal value could be used to convey 3 bits, so the bit rate would be three times the baud rate. If there are only 0s and 1s used as signal levels, the bit rate is equal to the baud rate. Page 4 Pui Ching Middle School AL Computer Studies Notes Types of networks Most data networks can be classified as either local area networks (LANs) or wide area networks (WANs). LANs are usually located in single buildings or campuses, and handle interoffice communications. WANs cover a large geographical area, and connect cities and countries. For your reference: Distance between CPUs 0.1 m 10 m Location of CPUs Printed circuit board personal data assistant Millimeter Mainframe Room 100 m Building 1000 m = 1 km Campus 100000 m = 100 km Country 1000000 m = 1000 km Continent 10000000 m = 10000 km Planet 100000000 m = 100000 km Earth-moon system 1.0 m Name Motherboard Personal Area Network (PAN) Computer Systems Network Local Area Network (LAN) your classroom Local Area Network (LAN) your school Local Area Network (LAN) Stanford University Wide Area Network (WAN) A large company Wide Area Network (WAN) Africa Wide Area Network (WAN) The Internet Wide Area Network (WAN) Earth and artificially satellites LANs are designed to: operate within a limited geographic area; allow multi-access to high-bandwidth media; control the network privately under local administration; provide full-time connectivity to local services; connect physically adjacent devices. Page 5 Pui Ching Middle School AL Computer Studies Notes Network topology Network topology defines the structure of the network. One part of the topology definition is the physical topology, which is the actual layout of the wire or media. The other part is the logical topology, which defines how the media is accessed by the hosts for sending data. Physical topology A bus topology uses a single backbone cable that is terminated at both ends. All the hosts connect directly to this backbone. A ring topology connects one host to the next and the last host to the first. This creates a physical ring of cable. A star topology connects all cables to a central point of concentration. An extended star topology links individual stars together by connecting the hubs and/or switches. This topology can extend the scope and coverage of the network. A hierarchical topology is similar to an extended star. However, instead of linking the hubs and/or switches together, the system is linked to a computer that controls the traffic on the topology. A mesh topology is implemented to provide as much protection as possible from interruption of service. The use of a mesh topology in the networked control systems of a nuclear power plant would be an excellent example. As seen in the graphic, each host has its own connections to all other hosts. Although the Internet has multiple paths to any one location, it does not adopt the full mesh topology. Page 6 Pui Ching Middle School AL Computer Studies Notes Logical topology The logical topology of a network is how the hosts communicate across the medium. The two most common types of logical topologies are broadcast and token passing. Broadcast topology simply means that each host sends its data to all other hosts on the network medium. There is no order that the stations must follow to use the network. It is first come, first serve. Ethernet works this way as will be explained later in the course. The second logical topology is token passing. Token passing controls network access by passing an electronic token sequentially to each host. When a host receives the token, that host can send data on the network. If the host has no data to send, it passes the token to the next host and the process repeats itself. Two examples of networks that use token passing are Token Ring and Fiber Distributed Data Interface (FDDI). A variation of Token Ring and FDDI is Arcnet. Arcnet is token passing on a bus topology. Protocol Protocol suites are collections of protocols that enable network communication from one host through the network to another host. A protocol is a formal description of a set of rules and conventions that govern a particular aspect of how devices on a network communicate. Protocols determine the format, timing, sequencing, and error control in data communication. Without protocols, the computer cannot make or rebuild the stream of incoming bits from another computer into the original format. Protocols control all aspects of data communication, which include the following: How the physical network is built How computers connect to the network How the data is formatted for transmission How that data is sent How to deal with errors These network rules are created and maintained by many different organizations and committees. Included in these groups are the Institute of Electrical and Electronic Engineers (IEEE), American National Standards Institute (ANSI), Telecommunications Industry Association (TIA), Electronic Industries Alliance (EIA) and the International Telecommunications Union (ITU), formerly known as the Comité Consultatif International Téléphonique et Télégraphique (CCITT). Page 7 Pui Ching Middle School AL Computer Studies Notes Switching Circuit Switching When you or your computer places a telephone call, the switching equipment within the telephone system seeks out a physical “copper” (including fibre and radio) path all the way from your telephone to the receiver’s telephone. This technique is called circuit switching. The basic idea of circuit switching is: “one a call has been set up, a dedicated path between both ends exists and will continue to exist until the call is finished. The end-to-end path has to be set up before any data been sent. The elapsed time can be as long as 10 seconds. During this time interval, the telephone system is hunting for a copper path (call request propagates all the way to the destination and be acknowledged). For many computer applications, long set-up times are undesirable. Call request signal Call accept signal AB trunk Data Propagation delay BC trunk CD trunk Time spent hunting for an outgoing trunk Time A B C D But the advantage of circuit switching is: once the setup of the dedicated path has been completed, the only delay for data is the propagation time for the electromagnetic signal (about 5 ms per 1000 km). Also, there is no danger of congestion. Page 8 Pui Ching Middle School AL Computer Studies Notes Message switching When message switching is used, no physical copper path is established in advance between sender and receiver. When the sender has a block of data to be sent, it is stored in the first switching office (i.e., router) and then forwarded later, one hop at a time. Each block is received in its entirety, inspected for errors, and then retransmitted. Message Queuing delay AB trunk Message BC trunk Message CD trunk A B C D Time With message switching, there is no limit on block size, which means that routers must have disks to buffer long blocks. That is, a single block may tie up a router-router line for a long time. Packet switching Packet switching resembles message switching, except that packet-switching networks place a tight upper limit on block size, allowing packets to be buffered in router main memory instead of disk. By making sure that no user can monopolize any transmission line very long (milliseconds), packet-switching networks are well suited to handling interactive traffic. Pkt 1 Pkt 2 Pkt 3 Pkt 1 AB trunk Pkt 2 Pkt 3 Pkt 1 BC trunk Pkt 2 Pkt 3 Time CD trunk A B C D An advantage of packet switching over message switching: the first packet of a multicast message can be forwarded before the second has fully arrived, reducing delay and improving throughput. Actually, message switching is never applied in computer networks. Page 9 Pui Ching Middle School AL Computer Studies Notes Differences between circuit switching and packet switching Item Dedicated “copper” path Bandwidth available Potentially wasted bandwidth Store-and-forward transmission Each packet follows the same route Call setup When can congestion occur Charging Circuit-switched networks Yes Fixed Yes No Yes Yes At setup time Per unit time Packet-switched networks No Dynamic No Yes No No On every packet Per packet Page 10 Pui Ching Middle School AL Computer Studies Notes Networking Models OSI model The OSI reference model is a framework that is used to understand how information travels throughout a network. The OSI reference model explains how packets travel through the various layers to another device on a network, even if the sender and destination have different types of network media. In the OSI reference model, there are seven numbered layers, each of which illustrates a particular network function. Dividing the network into seven layers provides the following advantages: It breaks network communication into smaller, more manageable parts. It standardizes network components to allow multiple vendor development and support. It allows different types of network hardware and software to communicate with each other. It prevents changes in one layer from affecting other layers. It divides network communication into smaller parts to make learning it easier to understand. In order for data to travel from the source to the destination, each layer of the OSI model at the source must communicate with its peer layer at the destination. This form of communication is referred to as peer-to-peer. During this process, the protocols of each layer exchange information, called protocol data units (PDUs). Each layer of communication on the source computer communicates with a layer-specific PDU, and with its peer layer on the destination computer as illustrated in the following figure. Page 11 Pui Ching Middle School AL Computer Studies Notes TCP/IP model The Transmission Control Protocol/Internet Protocol (TCP/IP) suite is the primary protocol used on the Internet. TCP/IP is a suite of protocols that work together to transmit data. The TCP/IP model has the following four layers: Application layer Transport layer Internet layer Network access layer Although some of the layers in the TCP/IP model have the same name as layers in the OSI model, the layers of the two models do not correspond exactly. Most notably, the application layer has different functions in each model. The designers of TCP/IP felt that the application layer should include the OSI session and presentation layer details. They created an application layer that handles issues of representation, encoding, and dialog control. Some of the most commonly used application layer protocols include the following: File Transfer Protocol (FTP) Hypertext Transfer Protocol (HTTP) Simple Mail Transfer Protocol (SMTP) Domain Name System (DNS) Trivial File Transfer Protocol (TFTP) The transport layer deals with the quality of service issues of reliability, flow control, and error correction. One of its protocols, the transmission control protocol (TCP), provides excellent and flexible ways to create reliable, well-flowing, low-error network communications. Page 12 Pui Ching Middle School AL Computer Studies Notes TCP is a connection-oriented protocol. It maintains a dialogue between source and destination while packaging application layer information into units called segments. Connection-oriented does not mean that a circuit exists between the communicating computers. It does mean that Layer 4 segments travel back and forth between two hosts to acknowledge the connection exists logically for some period. The purpose of the Internet layer is to divide TCP segments into packets and send them from any network. The packets arrive at the destination network independent of the path they took to get there. The specific protocol that governs this layer is called the Internet Protocol (IP). Best path determination and packet switching occur at this layer. The relationship between IP and TCP is an important one. IP can be thought to point the way for the packets, while TCP provides a reliable transport. The name of the network access layer is very broad and somewhat confusing. It is also known as the host-to-network layer. This layer is concerned with all of the components, both physical and logical, that are required to make a physical link. It includes the networking technology details, including all the details in the OSI physical and data link layers. Encapsulation process All communications on a network originate at a source, and are sent to a destination. The information sent on a network is referred to as data or data packets. If one computer (host A) wants to send data to another computer (host B), the data must first be packaged through a process called encapsulation. Encapsulation wraps data with the necessary protocol information before network transit. Therefore, as the data packet moves down through the layers of the OSI model, it receives headers, trailers, and other information. Page 13 Pui Ching Middle School AL Computer Studies Notes Routing overview Routing is an OSI Layer 3 function. Routing is a hierarchical organizational scheme that allows individual addresses to be grouped together. These individual addresses are treated as a single unit until the destination address is needed for final delivery of the data. Routing is the process of finding the most efficient path from one device to another. The primary device that performs the routing process is the router. The following are the two key functions of a router: Routers must maintain routing tables and make sure other routers know of changes in the network topology. This function is performed using a routing protocol to communicate network information with other routers. When packets arrive at an interface, the router must use the routing table to determine where to send them. The router switches the packets to the appropriate interface, adds the necessary framing information for the interface, and then transmits the frame. A router is a network layer device that uses one or more routing metrics to determine the optimal path along which network traffic should be forwarded. Routing metrics are values used in determining the advantage of one route over another. Routing protocols use various combinations of metrics for determining the best path for data. Routers interconnect network segments or entire networks. Routers pass data frames between networks based on Layer 3 information. Routers make logical decisions regarding the best path for the delivery of data. Routers then direct packets to the appropriate output port to be encapsulated for transmission. The encapsulation and de-encapsulation process occurs each time a packet transfers through a router. Page 14 Pui Ching Middle School AL Computer Studies Notes TCP/IP Transport Layer The primary duties of the transport layer, Layer 4 of the OSI model, are to transport and regulate the flow of information from the source to the destination, reliably and accurately. End-to-end control and reliability are provided by sliding windows, sequencing numbers, and acknowledgments. Flow control As the transport layer sends data segments, it tries to ensure that data is not lost. A receiving host that is unable to process data as quickly as it arrives could be a cause of data loss. The receiving host is then forced to discard it. Flow control avoids the problem of a transmitting host overflowing the buffers in the receiving host. TCP provides the mechanism for flow control by allowing the sending and receiving host to communicate. The two hosts then establish a data-transfer rate that is agreeable to both. Congestion can occur during data transfer for two reasons. First, a high-speed computer might be capable of generating traffic faster than a network can transfer it. Second, if many computers simultaneously need to send datagrams to a single destination, that destination can experience congestion, although no single source caused the problem. When datagrams arrive too quickly for a host or gateway to process, they are temporarily stored in memory. If the traffic continues, the host or gateway eventually exhausts its memory and must discard additional datagrams that arrive. Instead of allowing data to be lost, the transport function can issue a “not ready” indicator to the sender. Acting like a stop sign, this indicator signals the sender to stop sending data. When the receiver can handle additional data, the receiver sends a “ready” transport indicator. When this indicator is received, the sender can resume the segment transmission. Page 15 Pui Ching Middle School AL Computer Studies Notes Three-way handshake TCP is a connection-oriented protocol. TCP requires connection establishment before data transfer begins. For a connection to be established or initialized, the two hosts must synchronize their Initial Sequence Numbers (ISNs). Synchronization is done through an exchange of connection establishing segments that carry a control bit called SYN, for synchronize, and the ISNs. Segments that carry the SYN bit are also called “SYNs". This solution requires a suitable mechanism for picking an initial sequence number and a slightly involved handshake to exchange the ISNs. The synchronization requires each side to send its own initial sequence number and to receive a confirmation of exchange in an acknowledgment (ACK) from the other side. Each side must also receive the INS from the other side and send a confirming ACK. The sequence is as follows: 1. A→B SYN—(A) initial sequence number is X, ACK number is 0, SYN bit is set, but ACK bit is not set. 2. B→A ACK—(A) sequence number is X + 1, (B) initial sequence number is Y, and SYN and ACK bit are set. 3. A→B ACK—(B) sequence number is Y + 1, (A) sequence number is X + 1, the ACK bit is set, but the SYN bit is not set. This exchange is called the three-way handshake. Page 16 Pui Ching Middle School AL Computer Studies Notes Windowing Data packets must be delivered to the recipient in the same order in which they were transmitted to have a reliable, connection-oriented data transfer. The protocol fails if any data packets are lost, damaged, duplicated, or received in a different order. An easy solution is to have a recipient acknowledge the receipt of each packet before the next packet is sent. If the sender must wait for an acknowledgment after sending each packet, throughput would be low. Therefore, most connection-oriented, reliable protocols allow more than one packet to be outstanding on the network at one time. Because time is available after the sender finishes transmitting the data packet and before the sender finishes processing any received acknowledgment, this interval is used for transmitting more data. The number of data packets the sender is allowed to have outstanding without having received an acknowledgment is known as the window size, or window. TCP uses expectational acknowledgments. Expectational acknowledgements mean that the acknowledgment number refers to the packet that is next expected. Windowing refers to the fact that the window size is negotiated dynamically during the TCP session. Windowing is a flow-control mechanism. Windowing requires that the source device receive an acknowledgment from the destination after transmitting a certain amount of data. The receiving TCP process reports a “window” to the sending TCP. This window specifies the number of packets, starting with the acknowledgment number, that the receiving TCP process is currently prepared to receive. Page 17 Pui Ching Middle School AL Computer Studies Notes With a window size of three, the source device can send three packets to the destination. The source device must then wait for an acknowledgment. If the destination receives the three packets, it sends an acknowledgment to the source device, which can now transmit three more packets. If the destination does not receive the three packets, because of overflowing buffers, it does not send an acknowledgment. Because the source does not receive an acknowledgment, it knows that the packets should be retransmitted, and that the transmission rate should be slowed. TCP window sizes are variable during the lifetime of a connection. Each acknowledgement contains a window advertisement that indicates the number of bytes the receiver can accept. TCP also maintains a congestion-control window. This window is normally the same size as the window of the receiver. However, this window is cut in half when a packet is lost, perhaps as a result of network congestion. This approach permits the window to be expanded or contracted as necessary to manage buffer space and processing. A larger window size allows more data to be processed. Page 18 Pui Ching Middle School AL Computer Studies Notes DNS (Domain Name System) URL stands for Uniform Resource Locator. The URL specifies the Internet address of a file stored on a host computer connected to the Internet. Every file on the Internet, no matter what its access protocol, has a unique URL. Web software programs use the URL to retrieve the file from the host computer and the specific directory in which it resides. This file is then displayed on the monitor connected to the user's local machine. URLs are translated into numeric addresses using the Domain Name System (DNS). The DNS is a worldwide system of servers that stores location pointers to Web sites. The numeric address, called the IP (Internet Protocol) address, is actually the "real" URL. Since numeric strings are difficult for humans to use, alphanumeric addresses are employed by end users. Once the translation is made by the DNS, the browser can contact the Web server and ask for a specific file located on its site. Anatomy of a URL This is the format of the URL: protocol://host/path/filename For example, this is a URL on the home page of the House Committee on Agriculture of the U.S. House of Representatives: http://www.house.gov/agriculture/schedule.htm This URL is typical of addresses hosted in domains in the United States. Structure of this URL: 1. Protocol: http 2. Host computer name: www 3. Second-level domain name: house 4. Top-level domain name: gov 5. Directory name: agrictulture 6. File name: schedule.htm Note how much information about the content of the file is present in this well-constructed URL. Other examples: telnet://opac.albany.edu the University at Albany library text-based catalog ftp://ftp.uu.net/graphics/picasso a file at an ftp site Page 19 Pui Ching Middle School AL Computer Studies Notes Several top-level domains (TLDs) are common in the United States: com commercial enterprise edu educational institution gov U.S. government entity mil U.S. military entity net network access provder org usually nonprofit organizations New domain names were approved in November 2000 by the Internet Corporation for Assigned Names and Numbers (ICANN): .biz, .museum, .info, .pro (for professionals) .name (for individuals), .aero (for the aerospace industry), and .coop (for cooperatives). In addition, dozens of domain names have been assigned to identify and locate files stored on host computers in countries around the world. These are referred to as two-letter Internet country codes, and have been standardized by the International Standards Organization as ISO 3166. For example: ch Switzerland de Germany jp Japan uk United Kingdom In Unix, DNS can be queried interactively using the command nslookup. Network operating system An operating system which includes software to communicate with other computers via a network. This allows resources such as files, application programs, and printers to be shared between computers. Examples are Berkeley Software Distribution Unix, Novell, LAntastic, MS LAN Manager. Page 20