640 likes | 872 Views
Chapter 7: Computer Networks, the Internet, and the World Wide Web. Invitation to Computer Science, C++ Version, Third Edition 2004 Course Technology Additions by Paul Durand, Kent State Univ, 2005. Objectives. In this chapter, you will learn about: Basic networking concepts
E N D
Chapter 7: Computer Networks, the Internet, and the World Wide Web Invitation to Computer Science, C++ Version, Third Edition 2004 Course TechnologyAdditions by Paul Durand, Kent State Univ, 2005
Objectives In this chapter, you will learn about: • Basic networking concepts • Communication protocols • Network services and benefits • A brief history of the Internet and the World Wide Web Invitation to Computer Science, C++ Version, Third Edition
Introduction • Computer network • Computers connected together • Purpose: exchanging resources and information • Just about any kind of information can be sent • Examples: television and radio signals, voice, graphics, handwriting, photographs, movies Invitation to Computer Science, C++ Version, Third Edition
Basic Networking Concepts • Computer network • Set of independent computer systems connected by telecommunication links • Purpose: sharing information and resources • Nodes, hosts, or end systems • Individual computers on a network Invitation to Computer Science, C++ Version, Third Edition
Communication Links • Switched, dial-up telephone line • A circuit is temporarily established between the caller and callee • Analog medium • Requires modem at both ends to transmit information produced by a computer • Computer produces digital information Invitation to Computer Science, C++ Version, Third Edition Diagram by PJD, 2005
Invitation to Computer Science, C++ Version, Third Edition Diagram by PJD, 2005
Figure 7.1 Two Forms of Information Representation Invitation to Computer Science, C++ Version, Third Edition
Figure 7.2 Modulation of a Carrier to Encode Binary Information Invitation to Computer Science, C++ Version, Third Edition
Communication Links (continued) • Dial-up phone links • Transmission rate: 56,000 bps (56 Kbps) • Broadband • Transmission rate: exceeding 128,000 bps (128 Kbps) Invitation to Computer Science, C++ Version, Third Edition
Communication Links (continued) • Options for broadband communications • Home use • Digital subscriber line (DSL) • Cable modem • Commercial and office environment • Ethernet • Fast Ethernet • Gigabit Ethernet Broadband Tutorial CableModem Tutorial Ethernet Tutorial Invitation to Computer Science, C++ Version, Third Edition Links added by PJD, 2005
Figure 7.3 Transmission Time of an Image at Different Transmission Speeds Invitation to Computer Science, C++ Version, Third Edition
Communication Links (continued) • Wireless data communication • Uses radio, microwave, and infrared signals • Enables “mobile computing” • Types of wireless data communication • Wireless local access network • Wireless wide-area access network Invitation to Computer Science, C++ Version, Third Edition
Local Area Networks • Local area network (LAN) • Connects hardware devices that are in close proximity • The owner of the devices is also the owner of the means of communications • Common wired LAN topologies • Bus • Ring • Star Invitation to Computer Science, C++ Version, Third Edition
Figure 7.4 Some Common LAN Topologies Invitation to Computer Science, C++ Version, Third Edition
Local Area Networks (continued) • Ethernet • Most widely used LAN technology • Uses the bus topology • Two ways to construct an Ethernet LAN • Shared cable • Hubs: the most widely used technology Invitation to Computer Science, C++ Version, Third Edition
KSU 12/1/2004 A bridge is also called a switch. - It is 'smarter' than a repeater. - It is aware of which nodes are on which side of the lan. - It determines whether a message should be passed on to another network Figure 7.5: An Ethernet LAN Implemented Using Shared Cables Invitation to Computer Science, C++ Version, Third Edition Comment by PJD, 2005
Figure 7.6 An Ethernet LAN Implemented Using a Hub Invitation to Computer Science, C++ Version, Third Edition
Wide Area Networks • Wide area networks (WANs) • Connect devices that are across town, across the country, or across the ocean • Users must purchase telecommunications services from an external provider • Dedicated point-to-point lines • Most use a store-and-forward, packet-switched technology to deliver messages Invitation to Computer Science, C++ Version, Third Edition
UOT = Packet - approx 1000 bytes • Non-fixed routing • Fault Tolerant Text by PJD, 2005 Figure 7.7 Typical Structure of a Wide Area Network Invitation to Computer Science, C++ Version, Third Edition
Overall Structure of the Internet • All real-world networks, including the Internet, are a mix of LANs and WANs • Example: a company or a college • One or more LANs connecting its local computers • Individual LANs interconnected into a wide-area “company network” Invitation to Computer Science, C++ Version, Third Edition
KSU 12/1/2004 A router connects various networks. It differs from a bridge. a bridge connects two identical types of networks. A router can transfer messages between two distinct networks, each using a totally different communication technique. Figure 7.8(a) Structure of a Typical Company Network Invitation to Computer Science, C++ Version, Third Edition Comment by PJD, 2005
Overall Structure of the Internet (continued) • Internet Service Provider (ISP) • A wide-area network • Provides a pathway from a specific network to other networks, or from an individual to other networks • ISPs are hierarchical • Interconnect to each other in multiple layers to provide greater geographical coverage Invitation to Computer Science, C++ Version, Third Edition
Figure 7.8(b) Structure of a Network Using an ISP Invitation to Computer Science, C++ Version, Third Edition
Figure 7.8(c) Hierarchy of Internet Service Providers Invitation to Computer Science, C++ Version, Third Edition
Overall Structure of the Internet (continued) • Internet • A huge interconnected “network of networks” • Includes nodes, LANs, WANs, bridges, routers, and multiple levels of ISPs • Early 2003 • 170 million nodes (hosts) • Hundreds of thousands of separate networks located in over 225 countries Invitation to Computer Science, C++ Version, Third Edition
Communication Protocols The internet is operated by the Internet Society, a non-profit, non-governmental, professional society. This group establishes and enforces network protocol standards. IAB – Internet Architecture Board IETF – Internet Engineering Task Force • A protocol • A mutually agreed upon set of rules, conventions, and agreements for the efficient and orderly exchange of information • TCP/IP • The Internet protocol hierarchy • Governs the operation of the Internet • Five layers Invitation to Computer Science, C++ Version, Third Edition Comment by PJD, 2005
Internet Maps • http://www.cybergeography.org/atlas/more_isp_maps.html • http://www.isoc.org/internet/infrastructure/maps.shtml Invitation to Computer Science, C++ Version, Third Edition
Figure 7.10 The Five-Layer TCP/IP Internet Protocol Hierarchy Invitation to Computer Science, C++ Version, Third Edition
Physical Layer • Protocols govern the exchange of binary digits across a physical communication channel • Goal: create a “bit pipe” between two computers Invitation to Computer Science, C++ Version, Third Edition Figure added by PJD, 2005
Data Link Layer KSU 12/1/2004 Medium access control - How to arbitrate ownership of a shared line? - Central master control node? - Contention based approach? - no central control - equal access for all • Protocols carry out • Error handling • Framing (identify start and end of message) • Creates an error-free “message pipe” • Composed of two services • Layer 2a: medium access control • Layer 2b: logical link control Invitation to Computer Science, C++ Version, Third Edition
Data Link Layer (continued) • Medium access control protocols • Determine how to arbitrate ownership of a shared line when multiple nodes want to send at the same time • Logical link control protocols • Ensure that a message traveling across a channel from source to destination arrives correctly Invitation to Computer Science, C++ Version, Third Edition
Layer 2aMedium access control protocols Invitation to Computer Science, C++ Version, Third Edition
Automatic Repeat Request (ARQ) Algorithm Part of Logical Link Protocols - layer 2b Assures message travels from A to B correctly Invitation to Computer Science, C++ Version, Third Edition
Automatic Repeat Request (ARQ) • Process of requesting that a data transmission be resent • Main ARQ protocols • Stop and Wait ARQ (A half duplex technique) • Sender sends a message and waits for acknowledgment, then sends the next message • Receiver receives the message and sends an acknowledgement, then waits for the next message • Continuous ARQ (A full duplex technique) • Sender continues sending packets without waiting for the receiver to acknowledge • Receiver continues receiving messages without acknowledging them right away Invitation to Computer Science, C++ Version, Third Edition
Stop and Wait ARQ Sender Receiver Sends the packet, then waits to hear from receiver. Sends acknowledgement Sends the next packet Sends negative acknowledgement Resends the packet again Invitation to Computer Science, C++ Version, Third Edition
Continuous ARQ Sender sends packets continuously without waiting for receiver to acknowledge Notice that acknowledgments now identify the packet being acknowledged. Receiver sends back a NAK for a specific packet to be resent. Invitation to Computer Science, C++ Version, Third Edition
Source of Error What causes it How to prevent it Line Outages Faulty equipment, Storms, Accidents (circuit fails) White Noise (hiss) (Gaussian Noise) Movement of electrons (thermal energy) Increase signal strength (increase SNR) Impulse Noise (Spikes) Sudden increases in electricity (e.g., lightning, power surges) Shield or move the wires Cross-talk Multiplexer guard bands are too small or wires too close together Increase the guard bands, or move or shield the wires Echo Poor connections (causing signal to be reflected back to the source) Fix the connections, or tune equipment Attenuation Gradual decrease in signal over distance (weakening of a signal) Use repeaters or amplifiers Intermodulation Noise Signals from several circuits combine Move or shield the wires Jitter Analog signals change (small changes in amp., freq., and phase) Tune equipment Harmonic Distortion Amplifier changes phase (does not correctly amplify its input signal) Tune equipment Sources of Errors and Prevention More important mostly on analog Invitation to Computer Science, C++ Version, Third Edition
Error Detection Sender calculates an Error Detection Value (EDV) and transmits it along with data Receiver recalculates EDV and checks it against the received EDV Mathematical calculations Mathematical calculations ? = Data to be transmitted EDV • If the same No errors in transmission • If different Error(s) in transmission Larger the size, better error detection (but lower efficiency) Invitation to Computer Science, C++ Version, Third Edition
Error Detection Techniques • Parity checks • Longitudinal Redundancy Checking (LRC) • Polynomial checking • Checksum • Cyclic Redundancy Check (CRC) Invitation to Computer Science, C++ Version, Third Edition
Parity Checking • One of the oldest and simplest • A single bit added to each character • Even parity: number of 1’s remains even • Odd parity: number of 1’s remains odd • Receiving end recalculates parity bit • If one bit has been transmitted in error the received parity bit will differ from the recalculated one • Simple, but doesn’t catch all errors • If two (or an even number of) bits have been transmitted in error at the same time, the parity check appears to be correct • Detects about 50% of errors Invitation to Computer Science, C++ Version, Third Edition
sender receiver EVEN parity 01101010 number of all transmitted 1’s remains EVEN parity sender receiver ODD parity 01101011 number of all transmitted 1’s remains ODD parity Examples of Using Parity To be sent: Letter V in 7-bit ASCII: 0110101 Invitation to Computer Science, C++ Version, Third Edition
LRC - Longitudinal Redundancy Checking • Adds an additional character (instead of a bit) • Block Check Character (BCC) to each block of data • Determined like parity but, but counting longitudinally through the message (as well as vertically) • Calculations are based on the 1st bit, 2nd bit, etc. (of all characters) in the block • 1st bit of BCC number of 1’s in the 1st bit of characters • 2nd bit of BCC number of 1’s in the 2ndt bit of characters • Major improvement over parity checking • 98% error detection rate for burst errors ( > 10 bits) • Less capable of detecting single bit errors Invitation to Computer Science, C++ Version, Third Edition
Using LRC for Error Detection Example: Send the message “DATA” using ODD parity and LRC Letter D A T A ASCII 1 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 1 Parity bit 1 1 0 1 BCC1 1 0 1 1 1 1 1 Note that the BCC’s parity bit is also determined by parity Invitation to Computer Science, C++ Version, Third Edition
Polynomial Checking • Adds 1 or more characters to the end of message (based on a mathematical algorithm) • Two types: Checksum and CRC • Checksum • Calculated by adding decimal values of each character in the message, • Dividing the total by 255. and • Saving the remainder (1 byte value) and using it as the checksum • 95% effective • Cyclic Redundancy Check (CRC) • Computed by calculating the remainder to a division problem: Invitation to Computer Science, C++ Version, Third Edition
Cyclic Redundancy Check (CRC) Example: P = 58 G = 8 Q = 7 R = 2 P / G = Q + R / G Quotient (whole number) Message (treated as one long binary number) • Remainder: • added to the message as EDV) • could be 8 bits, 16 bits, 24 bits, or 32 bits long A fixed number (determines the length of the R) • Most powerful and most common • Detects 100% of errors (if number of errors <= size of R) • Otherwise: CRC-16 (99.998%) and CRC-32 (99.9999%) Invitation to Computer Science, C++ Version, Third Edition
Network Layer • Delivers a message from the site where it was created to its ultimate destination • Critical responsibilities • Creating a universal addressing scheme for all network nodes • Delivering messages between any two nodes in the network Invitation to Computer Science, C++ Version, Third Edition
Network Layer (continued) • Provides a true “network delivery service” • Messages are delivered between any two nodes in the network, regardless of where they are located • IP (Internet Protocol) layer • Network layer in the Internet Invitation to Computer Science, C++ Version, Third Edition
Ethernet (IEEE 802.3) Frame Used by Virtual LANs; (if no vLAN, the field is omitted If used, first 2 bytes is set to: 24,832 (8100H) Used to hold sequence number, ACK/NAK, etc., (1 or 2 bytes) 00 01 10 11 Repeating pattern of 1’s and 0’s (1010101010) (number of bytes in the message field) Used to exchange control info (e.g., type of network layer protocol used) Invitation to Computer Science, C++ Version, Third Edition
Transport Layer • Provides a high-quality, error-free, order preserving end-to-end delivery service • TCP (Transport Control Protocol) • Primary transport protocol on the Internet • Requires the source and destination programs to initially establish a connection Invitation to Computer Science, C++ Version, Third Edition
Figure 7.15 Logical View of a TCP Connection Invitation to Computer Science, C++ Version, Third Edition