Tuesday, April 24, 2012

Part V: Other Aspects of Computer Networking



Chapter 28: Network Performance (QoS and DiffServ)

  • Measures of Performance
    • Latency (delay) - the time required to transfer data across a network
      • Propagation delay - time required for a signal to travel across a transmission medium
      • Access delay - time needed to obtain access to a transmission medium
      • Switching delay - time required to forward a packet
      • Queuing delay - time a packet spends in the memory of a switch or router waiting to be selected for transmission
        • These account for most delays on the Internet
      • Server delay - time required for a server to respond to a request and send a response
    • Throughput (capacity) - the amount of data that can be transferred per unit time
      • Several ways to measure:
        • Capacity of a single channel
        • Aggregate capacity of all channels
        • Theoretical capacity of the underlying hardware
        • Effective data rate achieved by an application (goodput)
          • Most significant for users
          • Some network capacity is not available to user data because protocols:
            • Send packet headers, trailers, and control information
            • Impose a limit on the window size (receive buffer)
            • Use protocols to resolve names and addresses
            • Use a handshake to initiate and terminate communication
            • Reduce the transmission rate when congestion is detected
            • Retransmit lost packets
      • You can always buy more throughput, , but you cannot buy lower delays.
    • Jitter (variability) - the changes in delay that occur and the duration of the changes
      • Two general approaches to handling jitter:
        • Design an isochronous network with no jitter
          • Telephone systems use this approach to guarantee delay along all paths is the same.
        • Use a protocol that compensates for jitter
          • Video and voice over Internet take this approach
          • Much less expensive than isochronous network
          • About to reduce the impact of jitter, but if variance in delay is too large the output will still be affected.
  • The Relationship Between Delay and Throughput
    • Utilization as a Measure of Delay
      • Throughput and delay are not completely independent. As traffic in a computer network increases, delays increase.
        • A network that operates at close to 100% of its throughput capacity experiences severe delay
          • Network should not be operated above 90% of capacity.
        • Effective delay = (Delay when network idle) / (1 - %Network utilization)
    • Delay-Throughput Product
      • Bits present in a network = D x T
        • Measures the volume of data that can be present on the network. 
        • A network with throughput T and delay D can have a total of T x D bits in transit at any time.
  • Active Measurement of Delay, Throughput and Jitter
    • To assess throughput, a sender transfers a large volume of data and a receiver records the time from start of data arriving until all data has arrived, and calculates the amount of data sent per unit time.
    • "Packet train" is used to measure jitter
      • A sender emits a series of packets with a small, fixed delay between packets. The receiver records the time at which each packet arrives and uses the sequence of times to compute differences in delay.
    • Delay measurement requires that two hosts have synchronized clocks. (Over a short distance these clocks must be extremely accurate).
      • Can also measure the round trip time and divide by two using a tool such as Ping.
        • However delay along a path from A to B can differ substantially from the delay along a path from B to A. So the half-roundtrip measure may not be accurate.
    • Measuring network performance can be surprisingly difficult because:
      • Routes are asymmetric
      • Conditions change rapidly
      • Measurement can affect performance
      • Traffic is bursty
        • Aggregate data traffic is also bursty.
  • Passive Measurement, Small Packets and NetFlow
    • Passive measurement monitors a network and counts packets, but does not inject additional traffic.
    • To assess link utilization, an ISP measures the total data transferred over a link per unit time; to assess the impact on a router or switch, an ISP measures the number of packets transferred per unit time.
    • Fine-Grain and Coarse-Grain QoS
      • Fine-Grain - a provider allows a customer to state specific QoS requirements for a given instance of communication; a customer makes a request each time a flow is created (e.g., for each TCP connection).
        • Constant Bit Rate (CBR) - data enters the flow at a fixed rate, such as data from a digitized voice call entering at exactly 64 Kbps
        • Variable Bit Rate (VBR) - data enters the flow at a variable rate within specified statistical bounds which include:
          • Sustained Bit Rate (SBR)
          • Peak Bit Rate (PBR)
          • Sustained Burst Size (SBS)
          • Peak Burst Size (PBS)
        • Available Bit Rate (ABR) - the flow agrees to use whatever data rate is available at a given time
        • Unspecified Bit Rate (UBR) - no bit rate is specified for the flow; the application is satisfied with best-effort service
        • Despite many years of research and standards work, the fine-grain approach to QoS has been relegated to a few special cases.
      • Coarse-Grain - a provider specifies a few broad classes of service that are each suitable for one type of traffic; a customer must fit all traffic into the classes.
        • Course-Grain is the most commonly used.
  • Quality of Service (QoS)
    • Network provisioning allows networks to be designed to provide a specific level of service.
    • A switch or router implements QoS with four steps:
      • Classification and Policing
        • Assigns traffic flow identifier that indicates a traffic class, then the router polices the parameters for the flow of that class. 
      • Forwarding Computation
      • Output Queuing
        • Most implementations create a set of queues for each output port. Flow identifier used to queue the packet.
      • Traffic Scheduling
        • Selects a packet to send whenever the port is idle.
        • No algorithm for traffic scheduling is perfect:
          • Leafy Bucket - allows a queue to send packets at a fixed rate by incrementing the packet counter periodically and using the counter to control transmission.
          • Token Bucket - allows a queue to send data at a fixed rate by incrementing a byte counter periodically and using the counter to control transmission.
          • Weighted Round Robin - selects packets from a set of queues according to a set of weights that divide the capacity into fixed percentages, assuming a uniform packet size.
          • Deficit Round Robin - a variant of the round-robin approach that accounts for bytes sent rather than packets transferred, and allows a temporary deficit caused by a large packet.
    • Internet QoS Technologies
      • Resource Reservation Protocol (RSVP)
      • Common Open Policy (COPS)
      • Differentiated Services (DiffServ)
      • Multiprotocol Label Switching (MPLS)



Chapter 29: Multimedia and IP Telephony (VoIP)

  • Unlike conventional transport protocols, a protocol that transfers real-time data only handles the problem of jitter, and does not retransmit lost packets.
  • To overcome jitter and achieve smooth playback of real-time data, two techniques are employed:
    • Timestamps - a sender provides a timestamp for each piece of data, the receiver uses the timestamps to handle out-of-order packets and to display the data in the correct time sequence.
    • Jitter Buffer - a buffer receives data and delays playback.
  • Real-time Transport Protocol (RTP)
    • RTP sits above the transport layer (transfer protocol)
    • Provides three pieces of data in each packet that permit the receiver to implement a jitter buffer:
      • A sequence number that allows the receiver to place incoming packets in the correct order and to detect missing packets.
      • A timestamp that allows the receiver to play the data in the packet at the correct timein the multimedia stream.
      • A series of source identifiers that allow the receiver to know the source(s) of the data.
    • RTP Encapsulation
      • RTP uses UDP for message transport
        • Frame(IP(UDP(RTP()))) 
  • IP Telephony
    • Routers cost much less than traditional telephone switches, this is driving a replacement trend.
    • Most significant complications arise from desire to be backward compatible with existing Public Switched Telephone Network (PSTN)
    • Signaling and VoIP Standards
      • Audio is encoded with Pulse Code Modulation (PCM)
      • RTP is used to transfer the digitized audio
      • The processes of call setup and termination are known as signaling; multiple signaling protocols have been proposed for use with IP telephony.
    • Components of an IP Telephone System
      • IP Telephone - operates like a conventional telephone, but uses IP to send digitized voice
      • Media Gateway Controller - provides control and coordination between IP telephones for services such as call setup, call termination, and call forwarding.
      • Media Gateway - provides a connection between two networks that use different encodings, and translates as a call passes between them.
      • Signaling Gateway - connects to two networks that use different signaling mechanisms, and translates call management requests and responses.
    • Session Initiation Protocol (SIP) Terminology and Concepts
      • SIP minimizes that need for additional protocols by using existing protocols wherever possible.
      • Operates on the application layer
      • Encompasses all aspects of signaling
      • Provides services such as call forwarding
      • Relies on multicast for conference calls
      • Allows two sides to negotiate capabilities and choose the media and parameters to be used.
      • Defines six basic message types (methods):
        • Invite - session creation, an endpoint is invited to participate in the session
        • Ack - acknowledgement response to invite
        • Bye - session termination, call is ended.
        • Cancel - pending request cancellation
        • Register - registration of the user's location
        • Options - query to determine capabilities of called party
      • SIP defines three new elements that constitute a signaling system:
        • User agent - device that makes a terminates phone calls.
        • Location server - DB of information about each user (IP address, subscribed services, preferences)
        • Support servers:
          • Proxy - can forward requests from user agents to another location; handle routing and policy enforcement
          • Redirect - handles tasks such as call forwarding, 800-number connections
          • Registrar - receives registration requests and updates the DB that location servers consult
    • H.323 Characteristics
      • Handles all aspects of a digital telephone call
      • Includes signaling to set up and manage the call
      • Allows the transmission of video and data while a call is in progress
      • Sends binary messages that are defined by ASN.1 and encoded using Basic Encoding Rules (BER)
      • Incorporates protocols for security
      • Uses special hardware (Multipoint Control Unit) to support conference calls
      • Defines servers to handle tasks such as address resolution, authentication, authorization, accounting and features.
  • Telephone Number Mapping and Routing
    • E.164 Numbers (ENUM)
      • Solves the problem of converting an E.164 phone number into a Uniform Resource Identifier (URI)
      • Uses the Domain Name System to store the mapping
    • Telephone Routing over IP (TRIP)
      • Solves the problem of finding a user in an integrated network
      • A location server or other network element can use TRIP to advertise routes.
      • Divides the world into IP Telephone Administrative Domains (ITADs)



Chapter 30: Network Security

  • Major security problems on the Internet
    • Phishing - masquerading as a well-known site to obtain a user's personal information
    • Misrepresentation - making false or exaggerated claims about goods or services, or delivering fake or inferior products
    • Scams - various forms of trickery intended to deceive naive users into investing money or abetting a crime
    • Denial of Service - intentionally blocking a particular internet site to prevent or hinder business activities and commerce.
    • Loss of Control - an intruder gains control of a computer system and uses the system to perpetrate a crime
    • Loss of Data - loss of intellectual property or other valuable proprietary business information.
  • Techniques Used in Security Attacks
    • Wiretapping - making a copy of packets as they traverse a network to obtain information
    • Replay - sending packets captured from a previous session
    • Buffer overflow - sending more data than a receiver expects in order to store values in variables beyond the buffer.
    • Address spoofing - faking the IP source address in a packet to trick a receiver into processing the packet
    • Name spoofing - using a misspelling of a well-known name or poisoning a name server with an incorrect binding
    • DoS and DDoS - flooding a site with packets to prevent the site from successfully conducting normal business.
    • SYN flood - sending a stream of random TCP SYN segments to exhaust a receiver's set of TCP connections.
    • Key breaking - automatically guessing a decryption key or a password to gain unauthorized access to data
    • Port Scanning - attempting to connect to each possible protocol port on a host to find a vulnerability.
    • Packet interception - removing a packet from the Internet which allows substitution and man-in-the-middle attacks.
  • Devising a network security policy can be complex because a rational policy requires an organization to relate network and computer security to human behavior and to assess the value of information.
  • Authorization policies are meaningless without authentication mechanisms that can unambiguously verify the identity of a requester.
  • Security Technologies
    • Hashing - Data Integrity
    • Encryption - Privacy
    • Digital Signatures - Message authentication
    • Digital Certificates - Sender authentication
    • Firewalls - Site integrity
      • Uses packet filtering to prevent unwanted communication.
    • Intrusion Detection Systems - Site integrity
    • Deep Packet Inspection and Content Scanning - Site integrity
      • Since they examine packet payloads which are much larger than packet headers and not organized into fixed fields, Deep Packet Inspection mechanisms are limited to lower-speed networks.
    • Virtual Private Networks - Data privacy
      • Can be implemented with a stand alone device or using VPN software.
      • Three options for encryption:
        • Payload encryption (leaves header unencrypted)
        • IP-in-IP tunneling
          • Encypts all fields in the original datagram.
        • IP-in-TCP tunneling
          • TCP provides for reliable delivery, but head-of-line blocking can cause delays.
      • VPN Tunneling Performance
        • Latency
        • Throughput
        • Overhead and Fragmentation
  • Additional Security Technologies
    • Pretty Good Privacy (PGP) - cryptographic system that applications can use to encrypt data before transmission.
    • Secure Shell (SSH) - application layer protocol for remote login that guarantees confidentiality by encrypting data before transmission across Internet.
    • Secure Socket Layer (SSL) - fits between application and socket API and encrypts data before transmission across Internet. Used in safe financial transactions online.
    • Transport Layer Security (TLS) - designed as a successor to SSL.
    • HTTP Security (HTTPS) - combines HTTP with either SSL or TLS and a certificate mechanism to provide users with authenticated, confidential communication over the web.
    • IP Security (IPsec) - security standard used with IP datagrams
    • Remote Authentication Dial-In User Service (RADIUS) - service used to provide centralized authentication, authorization and accounting. Popular with dial-up ISPs and VPN systems for remote users.
    • Wired Equivalent Privacy (WEP) - originally part of the Wi-Fi wireless LAN standard, has been shown to have security weaknesses. Wi-Fi Protected Access (WPA) developed as a replacement.



Chapter 31: Network Management (SNMP)

  • Although network hardware and protocol software contain mechanisms to automatically route around failures or retransmit lost packets, network managers need to detect and correct underlying problems.
  • FCAPS Model
    • Industry standard characterizes the scope of network management:
      • F - Fault Detection and Correction
      • C - Configuration and Operation
      • A - Accounting and Billing
      • P - Performance Assessment and Optimization
      • S - Security Assurance and Protection
  • Element Management System
    • As it only permits a manager to configure, monitor and control one network element at a time, an element management system is labor intensive and prone to errors.
  • Network Management Tools
    • A large variety of tools exist that help a manager configure, measure, diagnose and analyze networks. These include:
      • Physical Layer Testing
      • Reachability and Connectivity
      • Packet Analysis
      • Network Discovery
      • Device Interrogation
      • Event Monitoring
      • Performance Monitoring
      • Flow Analysis
      • Routing and Traffic Engineering
      • Configuration
      • Security Enforcement
      • Network Planning
  • Simple Network Management Protocol (SNMP)
    • Uses the fetch-store paradigm for interaction between a manager and an agent. A manager fetches values to determine the device status; operations that control the device are defined as the side-effects of storing into objects.
    • Management Information Base (MIB)
      • Although ASN.1 does not provide a mechanism for indexing, MIB variables can correspond to tables or arrays. To emulate a table or an array with an ASN.1 variable, the index for an entry is encoded by appending it to the variable name; when agent software encounters a name that corresponds to a table, the software extracts and uses the index information to select the correct table entry.



Chapter 32: Trends in Networking Technologies and Uses

  • A variety of technologies have been devised to allow Internet services to scale; although approaches differ widely, each is useful in some cases.
    • Content Caching
    • Web Load Balancers
    • Server Virtualization
    • Peer-to-Peer Communication
    • Distributed Data Centers and Replication
    • Universal Representation (XML)
    • Social Networking
    • Mobility and Wireless Networking
    • Digital Video
    • Multicast Delivery
    • Higher-Speed Access and Switching
    • Optical Switching
    • Use of Networking in Business
    • Sensors at Large and in the Home
    • Ad Hoc Networks
    • Multicore CPUs and Network Processors
    • IPv6

Thursday, April 12, 2012

Part IV: Internetworking Using TCP/IP


Chapter 20: Internetworking Concepts, Architecture and Protocols
  • The motivation for internetworking:
    • No single networking technology is best for all needs
  • Universal Service
    • A communications system that supplies universal service allows arbitrary pairs of computers to communicate
    • Although universal service is highly desirable, incompatibilities among network hardware, frames, and addresses prevent a bridged network from including arbitrary technologies
  • Internetworking
    • Physical network connection with routers
      • An internet router is a special-purpose hardware system dedicated to the task of interconnecting networks.
        • It can interconnect networks that use different technologies such as media, physical addressing schemes, or frame formats.
    • Internet architecture
      • An internet consists of a set of networks interconnected by routers. 
      • The internet scheme allows each organization to select the number and type of networks, the number of routers to use to interconnect them and the exact interconnection topology.
        • To build in redundancy and reduce traffic congestion, organizations typically use multiple routers.
      • The internet is a virtual network because the communication system is an abstraction, that provides the illusion of a uniform network.
  • Protocols for internetworking
    • TCP/IP Internet Protocols stand out as the most widely used
      • Layer 3 (Internet) uses the IP protocol
      • Layer 4 (Transport) uses the TCP protocol

Chapter 21: IP Internet Addressing
  •  Addresses for the virtual internet
    • To provide uniform addressing in the Internet, IP defines an abstract addressing scheme that assigns each host a unique protocol address
      • Applications use IP addresses to communicate
  • The IP  Addressing Scheme
    • An internet address (IP address) is a unique 32-bit binary number assigned to a host and used for all communication with the host.
    • IP Address hierarchy
      • Each computer is assigned a unique address
      • Although network number assignments must be coordinated globally, suffixes can be assigned locally without global coordination.
    • Original Classes of IP Addresses (Superceded by newer format)
      •  The original IP addressing scheme divided addresses into classes
        • Classes differed by the number of 8-bit segments alllocated to the prefix and suffix that together comprise the 32-bit  IP address
          • Class A: one bit identifier (0), 7-bit prefix, 24-bit suffix
            • Accommodates 128 networks; 16,777,216 hosts per network
          • Class B: two bit identifier (10), 14-bit prefix, 16-bit suffix 
            • Accommodates 16,384 networks; 65,536 hosts per network
          • Class C: three bit identifier (110), 21-bit prefix, 8-bit suffix
            • Accommodates 2,097,152 networks; 256 hosts per network
          • Class D: four bit identifier (1110), 28-bit multicast address
            • Class D addresses are still used for multicasting, but multicasting does not work globally
          • Class E: four bit identifier (1111), 28-bit address
            • Class E was reserved and not assigned.
    • Dotted Decimal Notation
        • A syntactic form that IP software uses to express 32-bit binary values when interacting with humans.
          • Represents each octet in decimal and uses dots to separate octets.
    • Authority for Addresses
        • Internet Corporation for Assigned Names and Numbers (ICANN) handles address assignment and adjudication disputes.
          • Does not assign individual prefixes, authorizes a set of registrars to do so.
    • Subnet and Classless Addressing
      • Original "classful" addressing scheme became a limitation to growth
        • Organizations demanded Class A or B addresses to accommodate future growth, meanwhile few group wanted the remaining Class C addresses.
      • Two new mechanisms invented to overcome the limitation:
        • Classless addressing
          • Instead of having distinct address classes, they allowed the division between prefix and suffix to occur on an arbitrary bit boundary
            • For example: an ISP might assign a prefix that is 26-bits long with a six-bit suffix, permitting up to 62 hosts on the prefix
              • This effectively splits Class C addresses into four longer prefixes (with the addition of two prefix bits)
        • Subnet addressing
          • To mark the exact boundary between network prefix and host suffix, a 32-bit value known as an address mask was used.
            • The address mask consisted of 1s marking the places of the prefix bits, and 0s marking the places of the suffix bits
            • Routers would join the IP and address mask using a logical AND function to derive the accurate network prefix.
    • Classless Inter-Domain Routing (CIDR) Notation
      • Specifies addressing and forwarding in a format that is more readable to humans by extending Dotted Decimal notation with a slash followed by the number of prefix bits
        • For example, a 26-bit prefixed network with IP 192.5.48.69 would be: 192.5.48.69/26
    • Special IP Addresses
      • A network address is denoted by host address zero
        • 128.211.0.16/28 is a network because all bits beyond the 28th are zero.
      • Directed Broadcast Address
        • Used to send a copy of a packet to all hosts on a physical network
        • Formed by adding a suffix that consists of all 1s to the network prefix
          • 128.211.0.31/28 is a directed broadcast address
      • Limited Broadcast Address
        • Broadcast on a directly-connected network, used during system startup by a computer that does not yet know the network number.
        • IP address for limited broadcast consists of 32 1-bits
          • 255.255.255.255
      • This Computer Address
        • Used on startup since startup protocols use IP to communicate, but the computer does not yet have an IP
        • All zeros (0.0.0.0)
      •  Loopback Address
        • Used to test network applications during debugging
        • 127/8 reserved for use with loopback
          • 127.0.0.1 is the most popular loopback address
    • Routers and the IP Addressing 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.
        • These computers are said to be "multi-homed"

Chapter 22: Datagram Forwarding
  •  Virtual Packets
    • Since it includes incompatible networks, the Internet cannot adopt a particular hardware packet format. 
    • To accommodate heterogeneity, the Internet Protocol defines a hardware-independent packet format
  • IP Datagram
    • Each packet sent across TCP/IP internet is called an IP datagram. Each datagram consists of a header followed by a data area, which is known as a payload.
    • 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.
    • Has a specific header format
  • Forwarding an IP Datagram
    • As each destination in a forwarding table corresponds to a network, the number of entries in a forwarding table is proportional to the number of networks in the Internet, not the number of hosts.
    • Software examines each table entry by using the mask to extract a prefix of the destination address and comparing the result to the Destination field of the table entry. If they are equal the datagram will be forwarded to the Next Hop in the entry.
    • Longest Prefix Match
      • Resolves ambiguity that can arise when more than one entry matches a destination, by examining entries with the longest prefix first
        • For example: 128.10.0.0/16 would otherwise be equivalent to 128.10.2.0/24
  • Destination Address and Next Hop Address
    • Destination address in a datagram header always refers to the ultimate destination; at each point, a next hop is computed, but the next hop address does not appear in the datagram header.
  • Best-Effort Delivery
    • Since IP is designed to operate over all types of network hardware, including hardware that experiences problems, IP datagrams may not be delivered correctly. Although IP makes a best effort to deliver each datagram, it does not guarantee that it will handle all problems. Such problems include:
      • Data duplication
      • Delayed or out-of-order delivery
      • Corruption of data
      • Datagram loss
  • IP Encapsulation
    • A datagram is encapsulated in a frame for transmission across a physical network. The destination address in the frame is the MAC address of the next hop to which the datagram is being sent. The address is obtained by translating the IP address of the next hop to an equivalent MAC address.
  • Transmission across an Internet
    • When a datagram arrives in a network frame, the receiver extracts the datagram from the frame payload area and discards the frame header.
  • Maximum Transmission Unit (MTU) and Datagram Fragmentation
    • Each network has an MTU that specifies the maximum amount of data a frame can carry. When a router receives a datagram that is larger than the MTU of the network over which it is to be sent, the router divides the datagram into smaller pieces called fragments. Each fragment uses the IP datagram format, but carries only part of the original payload.
  • Reassembly of a Datagram from Fragments
    • The ultimate destination reassembles the fragments, not the next hop router. This has two advantages:
      • Reduces the amount of state information in routers since the router does not need to know whether the datagram is a fragment.
      • Allows routes to change dynamically; if an intermediate router was to reassemble the fragment they would all have to reach that router.
    • Collecting the Fragments of a Datagram
      • Fragments of a datagram can get lost or arrive in an arbitrary order.
      • These segments are reassembled in the correct order by:
        • Referencing a unique identification number in the identification field of each datagram and the IP source address in an incoming fragment to determine the datagram to which the fragment belongs.
        • Additionally, the fragment offset field tells a receiver where the data in the fragment belongs in the original datagram.
      • Consequences of Fragment Loss
        • When the first fragments arrive from a given datagram, the receiver starts a reassembly timer. If all segments arrive before the timer runs out, the receiver cancels the timer and reassembles the datagram.
        • If the timer runs out before all fragments arrive, the receiver discards the fragments that have arrived.
          • There is no mechanism for the receiver to tell the sender what fragments did not arrive.
          • If the sender was to retransmit there is no guarantee the data would travel the same path or be fragmented in the same way.
    • Fragmenting a Fragment
      • If a fragment goes though a router with a smaller MTU than the size of the fragment, it will be fragmented again.
      • IP does not distinguish between original fragments and subfragments.
      • A receiver cannot know whether an incoming fragment is the result of one router fragmenting a datagram or multiple routers fragmenting fragments.
        • Designer work hard to avoid this scenario.
        • The advantage of making all fragments the same is that a receiver can perform reassembly of the original datagram without first reassembing subfragments.
          • Saves CPU time and reduces the amount of header information required in each fragment.

Chapter 23: Support Protocols and Technologies
  •  Address Resolution
    • IP addressses are abstractions provided by protocol software. Since physical network hardware does not know how to locate a computer from its IP address, the next hop address must be translated to an equivalent MAC address before a frame can be sent.
    • Mapping between a protocol address and a hardware address is called address resolution. A host or router uses address resolution when it needs to send a packet to another computer on the same physical network.
      • A computer never attempts to resolve the address of a computer that attaches to a remote network.
    • Address Resolution Protocol (ARP)
      • If computer B needs to resolve the IP address of computer C, computer B broadcasts a request for the MAC address of the computer that has the given IP address. This broadcast travel only across the one network. When it receives the request, computer C sends a directed reply to computer B indicating that it has the IP address in question and giving its MAC address.
      • ARP Message Format
        • Although the ARP message format is sufficiently general to allow arbitrary protocol and hardware addresses, ARP is almost always used to bind an IP address to a 48-bit Ethernet address
      • ARP Caching and Message Processing
        • To reduce network traffic, ARP software extracts and saves the information from responses so it can be used for subsequent packets.
        • The information is kept in a small cache, and when it needs to bind an address, ARP starts by searching the cache.
          • An entry is replaced when a response arrives, and the oldest entry is removed whenever the table runs out of space or after an entry has not been updated for a long period of time (20 minutes)
          • Most computer communication involves two-way traffic, if a message travels from B to C, the probability is high that a reply will travel from C to B.
          • As each address binding requires memory, a computer cannot store an arbitrary number of address bindings.
      • Conceptual Address Boundary
        • ARP forms a conceptual boundary in the protocol stack: layers above ARP use IP, and layers below ARP use MAC addresses.
  • Internet Control Message Protocol (ICMP)
    • Includes both messages about errors and informational messages.
    • ICMP encapsulates messages in IP for transmission, and IP uses ICMP to report problems.
  • Protocol Software, Parameters and Configuration
    • Protocol software is parameterized to allow a compiled binary image to run on multiple computers in a variety of network environments without change. 
    • When a copy of the software is started on a given computer, it must be configured by setting parameters that supply information about the computer and the networks to which it attaches.
  • Dynamic Host Configuration Protocol (DHCP)
    • Allows a computer to move to a new network and obtain configuration information without requiring an administrator to make manual changes to a database.
    • Operation and Optimizations
      • The three most significant performance optimization elements are:
        • Recovery from loss or duplication
        • Caching of server addresses
        • Avoidance of synchronized flooding
  • Network Address Translation (NAT)
    • Allows multiple computers to share a single, globally valid IP address
    • NAT Operation and Private Addresses
      • NAT provides blocks of private (nonroutable) addresses
        • 10.0.0.0/8 - Class A private address block
        • 169.254.0.0/16 - Class B private address block
        • 172.16.0.0/12 - 16 contiguous Class B blocks
        • 192.168.0.0/16 - 256 contiguous Class C blocks
      • The most basic form of NAT replaces the IP source address in datagrams passing from the site to the Internet, and replaces the IP destination address in datagrams passing from the internet to the site.
    • Transport Layer NAT (NAPT)
      • The basic version of NAT described above only handles situations in which each host at a site communicates with a unique server in the Internet. If two hosts at the site attempt to communicate with the same remote server, NAT will not be able to correctly route the incoming datagrams.
      • The solution is to use protocol port numbers to distinguish among services.
        • Entries in the translation table used by NAPT contain a quadruple of source and destination IP addresses and protocol port numbers.
        • NAT is particularly useful in a residence or small business that is sharing an internet connection via Ethernet or Wi-Fi.

Chapter 24: The Future IP (IPv6)
  •  Previous chapters discuss IPv4 which has been extremely successful
    • Made it possible for the Internet to handle heterogeneous networks, dramatic changes in network technologies, and extreme increases in scale.
  • Motivation for change
    • At the current Internet growth rate, each of the possible IPv4 network prefixes will eventually be assigned. Larger addresses are necessary to accommodate continued growth
    • New features could provide special facilities for some applications such as real-time audio and video
    • More complex routing to accommodate replicated services such as Google's distributed data centers or multi-user collaboration tools
  • Since IP is central to all Internet communication, changing IP requires a change to the entire Internet
  • IPv6 Features
    • Address size - 128 bits rather than 32 bits
    • Header format - almost every field in the header has been changed, some have been replaced
    • Extension headers - IPv6 encodes information into separate headers, the base IPv6 header followed by zero or more extension headers, followed by data.
    • Support for Real-time Traffic - includes a mechanism that allows a sender and receiver to establish a high-quality path through the underlying network and to associate datagrams with that path. 
      • Can also be used to associate datagrams with low-cost paths.
    • Extensible protocol - unlike IPv4, IPv6 does not specify all possible protocol features, senders can add additional information to the datagram and new features can be added to the design as needed.
  • IPv6 Datgram Format
    • Base Header
      • Version - identifies the protocol as v6
      • Traffic Class - uses differentiated services to specify general characteristics that the datagram needs
        • Low-latency, low jitter, etc.
      • Flow Label - originally intended to associate a datagram with a particular underlying network path
        • End-to-end flow labels have since fallen out of favor
      • Payload Length - size of the data being carried
      • Next Header - specifies the type of information that follows the current header, if there is an extension header it specifies the type or if no extension header exists it specifies the type of data being carried in the payload.
      • Hop Limit - corresponds to IPv4 "Time-to-Live" field
        • Interpreted stictly, datagram will be discarded if the Hop Limit counts down to zero before the datagram arrives at its destination.
      • Source Address
      • Destination  Address
    • Optional Extension Headers 1 - N
    • Payload
  • Fragmentation, Reassembly and Path MTU
    • IPv6 places fragment information in a separate fragment extension header
      • The presence of this header identifies the datagram as a fragment.
      • The base header and headers that control routing are treated as unfragmentable
    • Fragmentation is performed by the sending host, not by routers as in IPv4. If fragmentation is required, the sending host receives an ICMP error message, and reduces the fragment size until fragments can be sent to the destination.
      • If a router along the path receives a datagram that is larger than the network MTU, it will send an error message and discard the datagram.
      • Path MTU discovery is used to determine the minimum MTU
        • This is an iterative procedure
        • The result is that the sender fragments the datagram into a size equal to the path MTU
  • The Purpose of Multiple Headers
    • Economy
      • Makes it possible to define a large set of features without requiring each datagram header to have at least one field for each feature
    • Extensibility
      • Adding a new feature does not change the existing protocol headers as it would have in IPv4
  • IPv6 Addressing
    • Unicast - the address corresponds to a single computer. A datagram sent to the address is routed along a shortest path to the computer.
    • Multicast - the address corresponds to a set of computers, and membership in the set can change at any time. IPv6 delivers one copy of the datagram to each member of the set.
    • Anycast - the address corresponds to a set of computers that share a common prefix. A datagram sent to the address is delivered to exactly one of the computers (e.g., the computer closest to the sender).
  • IPv6 Colon Hexadecimal Notation
    • Since IPv6 occupies 128 bits the dot decimal notation used to make IPv4 addresses more readable results in 16 numbers separated by dots
    • In order to make this notation more readable Colon Hex is used to represent the address with 16 bits separated by colons.
      • 69DC:8864:FFFF:FFFF:0:1280:8C0A:FFFF
    • Zero compression is also used, replacing a string of zeros with a double colon
      • FF0C:0:0:0:0:0:0:B1 can be written FF0C::B1

Chapter 25: UDP Datagram Transport Service 
  • User Datagram Protocol (UDP)
    • One of two Transmission Control Protocols in the TCP/IP suite (the other is TCP)
    • UDP is less complex and easier to understand than TCP.
      • Know as a "thin protocol layer." 
    • UDP characterized as:
      • End-to-end. 
        • It can distinguish among multiple application programs running on a given computer.
      • Connectionless.
        • The interface it provides to applications follows a connectionless paradigm.
        • Any application can send data at any time and UDP does not transmit any packets other than the packets that carry user data.
      • Message-oriented.
        • An application that uses UDP sends and receives individual messages called user datagrams and consisting of two parts:
          • A short header that specifies the sending and receiving application programs. The header includes:
            • UDP Source Port
            • UDP Destination Port
            • UDP Message Length
            • UDP Checksum - this is optional.
              • When a message arrives at its destination, UDP examines the checksum field and only verifies it if the value is non-zero.
          • A payload that carries the data being sent.
        • If a UDP message is larger than the network MTU, IP will fragment the resulting datagram, which reduces efficiency.
      • Best-effort.
        • Offers the same best-delivery semantics as IP. Arises becuase UDP uses IP for transmission.
        • Communication semantics same as IP so messages can be lost, duplicated, delayed, delivered out-of-order, or corrupted.
        • UDP only suffices for applications such as voice or video that can tolerate delivery errors.
      • Arbitrary interaction.
        • Allows an application to send to many other applications, receive from many other applications, or communicate with exactly one other application.
        •  Modes of Interaction and Broadcast Delivery
          • Four styles of interaction:
            • 1-to-1
            • 1-to-Many
            • Many-to-1
            • Many-to-Many
      • Operating system independent.
        • Provides a means of identifying application programs that does not depend on identifiers used by the local operating system.
        • UDP uses an abstract set of identifiers called protocol port numbers
        • Each computer that implements UDP must provide a mapping between protocol port numbers and the program identifiers that the operating system uses.
    • UDP Checksum and Pseudo Header
      • The UDP header does not include the source of destination IP address
        • This makes UDP smaller and more efficient, but introduces a possibility of error.
      • To confirm that a message has reached the correct destination UDP extends the checksum.
        • When computing the checksum, UDP includes a pseudo header that contains the source, destination and type (i.e., Proto) fields for the IP datagram and a UDP datagram length.
          • The sender computes the checksum as if the UDP header contained extra fields.
          • To verify the checksum, a receiver must obtain the UDP length and the source, destination, and type fields from the IP datagram, then appends them to the UDP message before verifying the checksum.

Chapter 26: TCP Reliable Transport Service
  • Transmission Control Protocol (TCP) is a transport layer protocol that provides reliability.
  • TCP service has seven major features:
    • Connection orientation
      • An application must first request a connection to a destination, and then use the connection to transfer data.
      •  TCP connections are virtual connections because they are achieved in software.
    • Point-to-Point communication
      • Each TCP connection has exactly two endpoints.
    • Complete reliability
      • TCP guarantees that the data sent across a connection will be delivered exactly as sent, complete and in order.
    • Full duplex communication
      • Allows data to flow in either direction, and allows either application program to send data at any time.
    • Stream interface
      • Applications send a continuous stream of octets across a connection. 
      • TCP does not group data into records or messages, and does not guarantee to deliver data in the same size pieces that were transferred by the sending application.
    • Reliable connection startup
      • Allows two applications to reliably start communication.
    • Graceful connection shutdown
      • Before closing a conneciton, TCP ensures that all data has been delivered and that both sides have agreed to shut down the connection.
  • End-to-end protocol 
    • It provides communication between an application on one computer and an application on another computer. 
    • Transport protocols do more than detect errors, they employ techniques that can repair or circumvent problems.
    • Major problems to an end-to-end transport protocol include:
      • Unreliable communication - messages sent across the internet can be lost, duplicated, corrupted, delayed, or delivered out of order.
        • To compensate for corrupted bits a protocol might include parity bits, a checksum, or a cyclic redundancy check (CRC).
        • Sequencing handles duplicates and out-of-order delivery
          • Sending side attaches a sequence number to each packet.
          • Receiving side stores both the sequence number of the last packet received in order, as wellas a list of additional packets that arrived out of order.
          • When a packet arrives the receiver examines the sequence number:
            • If it is the next one expected, it is delivered to the next highest layer and the list is checked to see if other packets can also be delivered.
            • If out of order, the protocol adds the packet to the list.
          • If a packet arrives that has already been delivered or matches one already on the list, the duplicate packet is discarded.
        • To handle packet loss, transport protocols use positive acknowledgement with retransmission.
          • When a frame arrives intact the receiving protocol software sends a small acknowledgement.
          • The sender takes responsibility for ensuring that each packet is transferred successfully.
            • When a packet is sent the sender sets a timer
            •  If no acknowledgement is received before the timer expires, the sender will retransmit the packet.
        • Replay errors in which a delayed packet affects later communication
          • To prevent replay, protocols mark each session with a unique ID and require that ID to be present in each packet.
          • Packets that arrive with an incorrect ID are discarded.
      • End system reboot - at any time during communication either of the two end systems might crash and reboot. There must be no confusion between sessions (some embedded systems can reboot in less time than it takes a packet to cross the internet)
      • Heterogeneous end systems - a powerful sender can generate data so fast that it overruns a slow receiver.
        • Flow control prevents data overrun, several techniques available:
          • Stop-and-go is the simplest form
            • Sender waits after transmitting each packet to receive a control message (usually an acknowledgement) from the receiver.
            • Prevents overrun but results in extremely low throughput.
          • Sliding Window offers high throughput rates
            • Sender and receiver use a fixed window size to determine the amount of data that can be sent before an acknowledgement arrives.
            • The throughput can be increased by increasing the window size, but the network bandwidth imposes an upper bound.
              • Sliding window throughput = min(Network bandwidth, Stopandgo protocol throughput x Window size)
      • Congestion in the Internet - if senders aggressively transmit data intermediate switches and routers can become overrun with packets, analogous to a congested highway.
        •  Transport protocols attempt to avoid congestion collapse by monitoring the network and reacting quickly once congestion starts. There are two basic approaches:
          • Arrange for intermediate systems (routers) to inform a sender when congestion occurs
          • Use increased delay or packet loss as an estimate of congestion
        • Modern network hardware works well, so most delay and loss result from congestion, not hardware failure.
    • Techniques Used in TCP to Handle Packet Loss
      • The delay required for data to reach a destination and an acknowledgement to return depends on traffic in the Internet as well as the distance to the destination. 
      • As TCP allows multiple application programs to communicate with multiple application programs to communicate with multiple destinations concurrently and traffic conditions to affect delay, TCP must handle a variety of delays that can change rapidly.
      • Buffers, Flow Controls and Windows
        • TCP uses a window mechanism to control the flow of data. 
          • A TCP window is measured in bytes.
          • A notification that specifies the size of the window is known as a window advertisement.
            • A receiver sends a window advertisement with each acknowledgement.
            • A sender that receiver a zero window advertisement will stop sending until the receiver again advertises a positive window.
      • TCP's Three-Way Handshake
        • TCP uses the term synchronization segment (SYN segment) to describe the control messages to create a connection, and the term finish segment (FIN segment) to describe the control messages to close a connection. Acknowledgments (ACK). 
        • To start a connection:
          • Each side sends a control message that specifies an initial buffer size (for flow control) and a sequence number. 
            • Host 1: Send syn
            • Host 2: Receiver syn; send syn and ack
            • Host 1: Receive syn and ack; send ack
        • TCP requires each end to generate a random 32-bit sequence  number that becomes the initial sequence for data sent.
            • The probability of replay is very low since TCP chooses a new random number after reboot.
      • TCP Congestion Control
        • Conceptually a transport protocol should reduce the rate of transmission when congestion occurs. 
        • Since it uses an variable size window TCP can achieve a reduction in data rate by temporarily reducing the window size. 
          • In extreme cases where loss occurs, TCP temporarily reduces the window size to half its current value.
      • TCP Segment Format
        • The sequnce number field in a TCP segments gives the sequence number for the first byte of data carried in the segment in the forward direction.
        • An acknowledgement number gives the first sequence number for which data is missing in the reverse direction.

Chapter 27: Internet Routing and Routing Protocols
  • IP routing can be partitioned into two broad categories:
    • Static routing
      • Most Internet hosts use static routing.
        • The host's forwarding table contains two entries: one for the network to which the host attaches, and a default entry that directs all other traffic to a separate router.
    • Dynamic routing
      • Most Internet routers use dynamic routing
        • Each router runs software that learns about destinations other routers can reach, and informs other routers about destinations that it can reach.
        • The routing software uses incoming information to update the local forwarding table continuously.
  • Autonomous Systems
    • The internet is divided into autonomous systems; routers within an autonomous system exchange routing information, which is then summarized before being passed to another group.
    • Two types of Internet routing protocols
      • Interior gateway protocols (IGPs)
        • Usually easy to install and operate, but may limit the size or routing complexity of an autonomous system.
      • Exterior gateway protocols (EGPs)
        • Used to exchange routing information with a router in another autonomous system; and to implement policy constraints.
        • More complex to install and operate than IGPs, but offer more flexibility and lower overhead.
    • Optimal routes, routing metrics and IGPs
      • Although most internet routing protocols are designed to use a hop count metric, it is possible for a network administrator to override the metric to enforce a policy.
      • Within an autonomous system, IGP software uses a routing metric to choose an optimal path to each destination. EGP software finds a path to each destination, but cannot find an optimal path because it cannot compare routing metrics from multiple autonomous systems.
    • Border Gateway Protocol (BGP)
      • Is the exterior gateway protocol that Tier-1 ISPs use to exchange routing information among autonomous systems at the center of the Internet.
        • Current version is BGP-4
      • BGP has the following characteristics:
        • Routing among autonomous systems
        • Provision for policies
        • Facilities for transit routing
        • Reliable transport
    • Routing Information Protocol (RIP)
      • Among the first IGP protocols used in the Internet
      • Has the following characteristics:
        • Routing within an autonomous system
        • Hop count metric
        • Unreliable transport - uses UDP to transfer messages among routers.
        • Broadcast or multicast delivery
        • Support for CIDR and Subnetting
        • Support for default route propagation
        • Distance vector algorithm
        • Passive version for hosts
      • Illustrates a disadvantage of distance vector protocols: the size of a message is proportional to the number of networks that can be reached. 
        • Sending RIP messages introduces delay and processing RIP messages consumes many CPU cycles.
          • Delay means route changes propagate slowly.
        • RIP works well among a few routers, but does not scale well.
    • Open Shortest Path First Protocol (OSPF)
      • Satisfies the demand for a routing protocol that can scale to large organizations. Uses Dijkstra's SPF algorithm to compute shortest paths.
      • OSPF has the following characteristics:
        • Routing within an autonomous system 
        • CIDR support
        • Authenticated message exchange
        • Imported routes - can introduce routes learned from other means such as BGP
        • Link-state algorithm
        • Support for metrics - allows an administrator to assign a cost to each route.
        • Support for multi-access networks - traditional link state routing is inefficient across a multi-access network, OSPF optimizes by designating a single router to broadcast on the network.
      • OSPF Areas
        • Since it allows a manger to partition the routers and networks in an autonomous system into multiple areas, OSPF can scale to handle a larger number of routers than other IGPs.
    • Intermediate System-Intermediate System (IS-IS)
      • An IGP developed at Digital Equipment Corp. created at the same time as OSPF with much of the same functionality. The main differences are:
        • IS-IS was proprietary, OSPF was created as an open standard.
        • OSPF designed to run over IP; IS-IS was designed to run over CLNS (part of the OSI protocol stack that is no longer in use)
        • OSPF was designed to propagate IPv4 routes; IS-IS  was designed to propagate routes for OSI protocols.
        • Over time, OSPF gained many features, as a result IS-IS now has less overhead.
      • Since DEC has dissolved, IS-IS is no longer under copyright protection so a new version was defined in the 2000s to integrate with IP and the internet.
        • The largest ISPs have grown to a size where the extra overhead is OSPF makes IS-IS more attractive. So it is making a comeback.
    • IP Multicast Semantics
      • Membership in an IP multicast group is dynamic: a computer can join or leave a group at any time.
      • Group membership defines a set of receivers; an arbitrary application can send a datagram to the group, even if the application is not a group member.
      • Internet Group Management Protocol (IGMP)
        • Used only on the network between the host and the router.
        • Defines the host, not the application to be a group member.
        • When the last application on a host leaves the group, the host uses IGMP to inform the local router that it is no longer a member of the group.
      • Forwarding and Discovery Techniques
        • Flood and Prune
          • Ideal when group is small and all members are attached to a contiguous LAN.
          • Routers forward each datagram to all networks
          • Uses Reverse Path Broadcasting (RPB) to avoid routing loops by breaking cycles.
          • If a router learns that not hosts on a given network are members of the group, the router prunes the network from the set.
        • Configuration and Tunneling
          •  Ideal when the group is geographically dispersed
          • A router at each site is configured to know about other sites.
          • When a multicast datagram arrives, the router at the site transmits the datagram on all directly attached LANs via hardware multicast.
          • Consults configuration table to determine which remote sites should receive a copy and uses IP-in-IP tunneling to transfer a copy of the multicast datagram to each of the remote sites.
        • Core-based Discovery
          • Allows multicast to scale gracefully from a small group to a large group with members in arbitrary locations.
          • To provide smooth growth, some multicast routing protocols designate a unicast address for each multicast group. 
          • When router1 receives a multicast datagram that must be transmitted to a group, it encapsulates the multicast datagram in a unicast datagram and forwards the unicast datagram to the group's core unicast address. 
          • When the datagram reaches router2 that participates in the group, router2 removes and processes the multicast message.
      • Multicast Protocols
        • Th dynamic characteristics of Internet multicast make the problem of multicast route propagation difficult. 
        • Although many protocols have been proposed, the Internet does not currently have an Internet-wide multicast routing facility.

Saturday, March 31, 2012

Part III: Packet Switching and Network Technologies



Chapter 13: Local Area Networks - Packets, Frames and Topologies

  • Circuit switching provides the illusion of an isolated physical path between a pair of communicating entities; a path is created when needed, and discontinued after use.
    • Three general properties define a circuit switched paradigm:
      • Point-to-point communications
      • Separate steps for circuit creation, use and termination
      • Performance equivalent to an isolated physical path
  • Packet switching, which forms the basis of the internet, is a form of statistical multiplexing that permits many-to-many communication. A sender must divide a message into a set of packets; after transmitting a packet, a sender allows other senders to transmit before transmitting a successive packet.
    • Three general properties define a switched paradigm:
      • Arbitrary, asynchronous communication
      • No set-up required before communication begins
      • Performance varies due to statistical multiplexing among packets
  • Local and Wide Area Packet Networks
    • Local Area Network (LAN) - least expensive, spans a single room or building
    • Metropolitan Area Network (MAN) - medium expense, spans a major city or metroplex
    • Wide Area Network (WAN) - most expensive, spans sites in multiple cities
  • Standards for Packet Format and Identification
    • Each standards organization focuses on particular layers of the protocol stack.
      • IEEE standards focus on specification for the lowest two layers of the stack and LAN technologies, data link and physical
        • IEEE 802 Model and Standards
          • Divides layer 2 into two conceptual sublayers
            • Logical Link Control (LLC) - Used for addressing and multiplexing
            • Media Access Control (MAC) - Used for access to shared media
      • W3C standards focus on the application layer
      • IETF standards focus on the transport and internet layer
      • Textbooks present all five as equally important: Application, Transport, Internet, Data Link, Physical
  • Networks are classified into broad categories according to their topology
    • Bus - all computers connected to a single cable, any computer can send data to any other but must coordinate traffic to be sure only one computer sends a signal at a time, line must also be terminated to prevent reflected electrical signals along the cable
    • Ring - all computers connect to a circular bus that forms a closed loop
    • Star - all computers connected to a central hub, which in practice tends to vary in distance to each computer
    • Mesh - every computer connected to every other computer but is disadvantaged by cost.
      • Connections in a mesh network = (n^2 - n)/2
  • Unicast, Broadcast and Multicast Addresses
    • Unicast - uniquely identifies a single computer, and specifies that only the identified computer should receive a copy of the packet
    • Broadcast - corresponds to all computers, and specifies that each computer on the network should receive a copy of the packet
    • Multicast - idenifies a subset of the computers on a given network, and specifies that each computer in the subset should receive a copy of the packet
  • Frames and Framing
    • Framing refers to the structure added to a sequence of bits or bytes that allows the sender and receiver to agree on the exact format of the message.
    • In a packet switched network each frame corresponds to a packet and consists of two conceptual parts:
      • Header the contains metadata, such as an address
      • Payload that contains the data being sent
    • In the ASCII character set the Start of Header (SOH) character marks the beginning of a frame, and the End of Transmission (EOT) character marks the end of a frame
  • Byte and Bit Stuffing (aka Data Stuffing and Character Stuffing)
    • To avoid conflicts with a payload that includes the SOH or EOT character, the sender replaces the control bytes (or bits) with a character sequence and the receiver replaces that sequence with the original value.


Chapter 14: The IEEE MAC Sub-layer

  • Static and Dynamic Channel Allocation
    • Static channel allocation suffices when the set of communicating entities is known in advance and does not change; most networks require a form of dynamic channel allocation
  • Channelization Protocols
    • Frequency Division Multi-Access (FDMA)
    • Time Division Multi-Access (TDMA)
    • Code Division Multi-Access (CDMA)
  • Controlled Access Protocols
    • Polling - centralized controller repeatedly polls stations and allows each to transmit one packet
      • Two general polling policies include:
        • Round Robin Order - each station has equal opportunity to transmit packets
        • Priority Order - some stations have more opportunity to send
    • Reservation - stations submit a request for the next round of data transmission
      • Often used with satellite transmission, employs a two-step process in which each potential sender identifies whether it has a packet to send during the next round and the controller transmits a list of the stations that will be transmitting. The stations then use this list to know when they should be transmitting.
    • Token passing - stations circulate a token; each time it receives the token, a station transmits one packet
      • Most often associated with ring topologies in which the order of circulation is defined by the ring and a token is pass in sequence to allow each station to transmit. In other topologies, each station is assigned a position in a logical sequence and the token is passed according to this assigned sequence.
  • Random Access Protocols
    • ALOHA - historic protocol used in an early radio network in HI; popular in textbooks and easy to analyze, but not used in real networks
      • Uses two carrier frequencies, one for inbound one for outbound. Station transmits on the inbound frequency then listens to confirm that the central transmitter repeats the transmission on the outbound frequency. If a copy arrives the station moves to the next packet, if no copy arrives the station waits a short time (randomized to reduce the probability of interference) and retransmits the original signal.
    • CSMA/CD - Carrier Sense Multi-Access with Collision Detection; the basis for Ethernet and the most widely used random access protocol
      • Ethernet offers three innovations in the handling of collisions:
        • Carrier Sense - each station is required to monitor the cable to detect whether another transmission is already in progress which prevents the most obvious collision problems.
        • Collision Detection - each station monitors the cable during transmission, if the signal on the cable differs from the signal that the station is sending a collision has occurred. When a collision is detected the sending station aborts transmission.
          • Following transmission all stations must wait for an interpacket gap to ensure that all stations sense an idle network and have a chance to transmit
        • Binary Exponential Backoff - to prevent secondary collisions Ethernet requires each computer to double the duration of a random delay after each collision.
    • CSMA/CA - Carrier Sense Multi-Access with Collision Avoidance; the basis for Wi-Fi wireless networks
      • Because computers on a wireless LAN can span distances greater than a signal can propagate, wireless LANs use CSMA/CA in which the sending and receiving computers each send a control message before packet transmission occurs.


Chapter 15: Wired LAN Technology (Ethernet and 802.3)

  • Ethernet Frame Format (8-bit bytes)
    • Header: 6-byte destination address, 6-byte source address, 2-byte type
    • 46-1500 bytes of payload
    • 4-byte cyclic redundancy check (CRC)
  • Ethernet Type Field and Demultiplexing
    • Allows a given computer to have multiple protocols operating simultaneously
      • Type 0800 - IP datagrams
      • Type 0806 - ARP messages
  • IEEE's Version of Ethernet (802.3)
    • Header: 48-bit destination addresss, 48-bit source address, 16-bit length
    • IEEE LLC/SNAP Header: 24-bit LLC, 24-bit OUI, 16-bit Type
      • Logical link control/sub-network attachment point 
    • If bytes 13-14 of an Ethernet frame contain a numeric value less than 1500, the field is interpreted as a packet length and the 802.3 standard applies; otherwise, the field is interpreted as a type field and the original Ethernet standard applies.
  • Twisted Pair Ethernet Wiring and Hubs
    • Twisted pair Ethernet wiring uses an electronic devices known as a hub in place of a shared cable.
  • Physical and Logical Ethernet Topology
    • Distinguishing between logical and physical topologies allows us to understand that twisted pair Ethernet uses a start physical topology, but logically acts like a bus.
    • Twisted pairs reduce EM interference on the transmission lines by canceling out between the two wires.
  • Variants of Twisted Pair Ethernet and Speeds
    • 10BaseT - Twisted Pair Ethernet - 10 Mbps - Cat 5
    • 100BaseT - Fast Ethernet - 100 Mbps - Cat 5E
    • 1000BaseT - Gigabit Ethernet - 1 Gbps - Cat 6


Chapter 16: Wireless Networking Technologies

  • Personal Area Networks (PANs)
    • Bluetooth - communication over a short distance between a small peripheral device such as a headset or mouse and a system such as a cell phone or a computer
    • Infrared - line-of-sight communication between a small device, often a hand-held controller, and a nearby system such as a computer or entertainment center
    • ISM wireless - communication using frequencies set aside for Industrial Scientific and Medical devices, an environment where electromagnetic interference may be present.
      • ISM wireless bands: 902-928 Mhz, 2.4-2.484 GHz, 5.725-5.850 GHz
  • Spread Spectrum Techniques - can help wireless LANs function in noisy environments
    • Direct Sequence Spread Spectrum (DSSS) - similar to CDMA where a sender multiplies the outgoing data by a sequence to form multiple frequencies and the receiver multiplies by the same sequence to decode
    • Frequency Hopping Spread Spectrum (FHSS) - a sender uses a sequence of frequencies to transmit data, and a receiver uses the same sequence of frequencies to extract data
    • Orthogonal Frequency Division Multiplexing (OFDM) - a frequency division multiplexing scheme where the transmission band is divided into many carriers in such a way that the carriers do not interfere
  • Other Wireless LAN Standards
    • Many exist (802.11e-s) each offering some advantage
  • Wireless LAN Architecture
    • Ad hoc - wireless hosts communicate among themselves without a base station
    • Infrastructure - a wireless host only communicates with an access point, and the access point relays all packets
      • Most wireless LANs use an infrastructure architecture in which a wireless computer communicates through an access point (base station).
  • Overlap, Association, and 802.11 Frame Format
    • CTL, DUR, Destination Address, Source Address, Router's Address, SEQ, Address 4 (used in Ad Hoc mode), Payload, CRC
  • Coordination Among Access Points
    • Two basic approaches exist:
      • Complex access points coordinate to ensure smooth handoff 
      • Lower cost access points operate independently and rely on wireless computers to change their association from one access point to another.
  • Contention and Contention-Free Access
    • Point Coordinated Function (PCF) for contention-free service
      • An access point controls stations in the basic service set (BSS) to ensure that transmissions do not interfere with each other
    • Distributed Coordinate Function (DCF) for contention-based service
      • Arranges for each station in a BBS to run a random access protocol
      • The CSMA/CA technique used in Wi-Fi networks includes timing parameters that specify how long a station waits before sending an initial packet and how long a station waits before sending a reply. 802.11 standard defines three timing parameters:
        • SIFS - Short Inter-Frame Space of 10 microseconds
        • DIFS - Distributed Inter-Frame Space of 50 microseconds
        • Slot time of 20 microseconds
  • Wireless MAN Technology and WiMax
    • Main features:
      • Uses licensed spectrum offered by carriers
      • Each cell can cover a radius of 3-10 Km
      • Uses scalable orthogonal FDM
      • Guarantees quality of services for voice or video
      • Can transport 70 Mbps in each direction at short distances
      • Provides 10 Mbps over a long distance (10 Km)
    • Two main versions of WiMax are commonly referred to as:
      • Fixed WiMax - refers to systems built using IEEE standard 802.16-2004 (802.16d); this technology does not provide for handoff among access points. Designed to provide connections between a service provider and a fixed location.
      • Mobile WiMax - refers to systems built according to standard 802.16e-2005 (802.16e); provides handoff among access points and can be used with portable devices.
    • Another proposed type is called Backhaul
      • Access
        • Last mile alternative to DSL or cable modems
        • High-speed interconnection for nomadic users
        • Unified data and telecommunications access
        • As a backup for a site's Internet connection
      • Interconnect
        • Backhaul from Wi-Fi access points to a provider
        • Private connections among sites of a company
        • Connection between small and large ISPs
  • PAN Technologies and Standards
    • Bluetooth
      • Wireless data replacement for cables
      • Uses 2.4 GHz band
      • Short distance (up to 5 meters, with variations that extend the range to 10-50 m)
      • Device is master or slave
      • Master grants permission to slave
      • Data rate is up to 721 Kbps
    • Ultra Wideband (UWB)
      • Uses wide spectrum of frequencies
      • Consumes very low power
      • Short distance (2 to 10 meters)
      • Signal permeates obstacles such as walls
      • Data rate of 110 at 10 meters and up to 500 Mbps at 2 meters
      • IEEE unable to resolve disputes and form a single standard
    • Zigbee (802.15.4)
      • Wireless standard for remote control, not data
      • Target is industry as well as home automation
      • Three frequency bands used (868 Mhz, 915 MHz, 2.4 GHz)
      • Data rate of 20, 40, or 250 Kbps, depending on frequency band
      • Low power consumption
      • Three levels of security being defined
  • Other Short Distance Communication Strategies
    • InfraRED (IrDA) - has widely accepted standards and the chief characteristics include:
      • Family of standards for various speeds and purposes
      • Practical systems have range of one to several meters
      • Directional transmission with a cone covering 30 degrees
      • Data rates between 2.4 Kbps (control) and 16 Mbps (data)
      • Generally low power consumption with very-low power versions
      • Signal may reflected from surfaces, but cannot penetrate solid objects
    • Radio Frequency Indentication (RFID) - small tags contain identification that a receiver can pull from the tag
      • Over 140 RFID standards exist for a variety of applications
      • Passive RFIDs draw power from the signal sent by the reader
      • Active RFIDs contain a battery, which may last up to 10 years
      • Limited distance, although active RFIDs extend further than passive
      • Can use frequencies from less than 100 MHz to 868-954 MHz
      • Used for inventory control, sensors, passports, and other applications
  • Wireless WAN Technologies can be divided into two categories:
    • Cellular communication systems
      • Architecture: each cell contains a tower, and a group of cells is connected to a mobile switching station which tracks a mobile user and manages the handoff as the user passes from one cell to another
      • Idealized coverage is modeled on hexagonal cells that fit together in a honeycomb shape, in practice there are overlaps and gaps between cells.
        • Practical systems vary cell size according to the density of cell phones and obstructions that cause coverage to be irregular.
      • Follows a key principle: interference can be minimized if an adjacent pair of cells do not use the same frequency
      • Generations of Cellular Technology
        • 1G - first generation from 1970s-1980s, uses analog signals
        • 2G/2.5G - second generation began in early 1990s and continues to be used, uses digital signals to carry voice (2.5G includes some 3G features)
          • GSM includes GPRS, EDGE (EGPRS), EDGE Evolution, HSCSD
          • CDMA includes IS-95A, IS-95B
          • TDMA includes iDEN, IS-136, PDC
        • 3G/3.5G - third generation began in 2000s and focuses on the addition of higher-speed data services (DL rates of 400 Kbps - 2 Mbps) to support applications such as web browsing and photo sharing. Allows for roaming across North America, Japan and Europe.
          • WCDMA includes UMTS and HSDPA (successors to IS-136, IS-95A, EDGE, PDC, UMTS)
          • CDMA 2000 includes 1xRTT (successor to IS-95B), EVDO and EVDV (successors to 1xRTT) 
        • 4G - fourth generation began around 2008 and focuses on support for real-time multimedia such as television or high-speed video download, uses multiple connection technologies (such as Wi-Fi and satellite) that phone automatically monitors to choose the best connection available.
    • Satellite communication systems
      • Very Small Aperture Terminal (VSAT) - uses dishes less than three meters in diameter
        • Uses three frequency ranges that differ in the strength of the signal delivered, sensitivity to rain, and coverage area
          • C Band, 3-7 GHz, Low strength, Medium sensitivity, Large footprint
          • Ku, 10-18 GHz, Medium strength, Moderate sensitivity, Medium footprint
          • Ka, 18-31 GHz, High strength, Severe sensitivity, Small footprint
      • Global Position System (GPS) Satellites
        • Not used as part of computer communication, but provides accurate time and location information. Key features include:
          • Accuracy between 20 and 2 meters (military versions have higher accuracy)
          • 24 total satellites orbit the Earth
          • Satellites arranged in six orbital planes
          • Provides time synchronization that is used in some communication networks
  • Software Radio and the Future of Wireless
    • Traditional radios are being replaced by radios that follow a programmable paradigm in which features are controlled by software running on processor. These features include:
      • Frequency - the exact set of frequencies used at a give time
      • Power - the amount of power the transmitter emits
      • Modulation - the signal and channel coding and modulation
      • Multiplexing - any combination of CDMA, TDMA, FDMA and others
      • Signal direction - antennas can be tuned for a specific direction
      • MAC protocol - all aspects of framing and MAC addressing


Chapter 17: LAN Extensions - Fiber Modems, Repeaters, Bridges and Switches

  • Distance Limitation and LAN Design
    • A maximum length specification is a fundamental part of LAN technology
    • LAN hardware will not work correctly over wires that exceed the bound.
  • Fiber Modem Extensions
    • A pair of fiber modems and optical fibers can be used to provide a connection between a computer and a remote LAN such as an Ethernet.
  • Repeaters
    • An analog hardware device used to extend a LAN
    • Amplify and send all incoming signals to the other side
  • Bridges and Bridging
    • A mechanism that connects two LAN segments and forward frames form one segment to another.
    • Computers cannot tell whether they are on a single segment or a bridged LAN.
  • Learning Bridges and Frame Filtering
    • An adaptive bridge uses the source MAC address in a packet to record the location of the sender, and uses the destination MAC address to determine whether to forward the frame.
  • Why Bridging Works Well
    • Because a bridge permits simultaneous activity on attached segments, a pair of computers on one segment can communicate at the same time as a pair of computers on another segment.
  • Distributed Spanning Tree (DST)
    • Computed from an algorithm implemented by bridges to prevent a cycle from causing an endless loop.
      • Views bridges as nodes in a graph and imposes a tree on the graph.
      • Ethernet bridges communicate among themselves using a multicast address this is reserved for spanning tree: 01:80:C2:00:00:00
    • Original approach called Spanning Tree Protocol (STP) consists of three steps:
      • Root election
      • Shortest path computation
      • Forwarding
  • Switching and Layer 2 Switches
    • An Ethernet switch (aka Layer 2 Switch) is a digital device with multiple ports, each for a single computer, that forwards packets by simulating a bridged network with one port per LAN segment.
      • Uses an intelligent interface attached to each port and a central fabric that provides simultaneous transfer between pairs of interfaces.
        • An interface contains a processor, memory, and other hardware needed to accept an incoming packet, consult a forwarding table, and send the packet across the fabric to the correct output port.
          • Because it has memory it is able to buffer arriving packets when an output computer is busy.
      • Chief advantage over a hub is that a switch permits multiple transfers to occur at the same time, provided the transfers are independent.
        • A switch with N ports can transfer up to N/2 packets simultaneously.
    • Virtual Local Area Network (VLAN) Switches
      • Extension to switches that includes virtualization, allowing a single switch to be configured to emulate multiple, independent switches with separate broadcast domains.
    • Bridging Used with Other Devices
      • Vendors no longer sell stand-alone bridge devices, the concept of bridging has been incorporated in network devices such as modems used in access technologies.


Chapter 18: WAN Technologies and Dynamic Routing

  • Large Spans and Wide Area Networks
    • Networking technologies can be classified according to the distance they span:
      • PAN - a region near and individual
      • LAN - a building or campus
      • MAN - a large metropolitan area
      • WAN - multiple cities or countries
    • Traditional WAN Architecture
      • Developed before LAN technologies, WANs used packet switches
        • Provide local connections for computer at the site as well as connections for data circuits that lead to other sites.
      • A traditional WAN is formed by interconnecting packet switches
        • The topology and capacity of connections are chosen to accommodate expected traffic and need for redundancy.
    • Store and Forward Paradigm
      • Wide area packet switching systems use the store-and-forward technique in which packets arriving at a packet switch are placed in a queue until the packet switch can forward them on toward their destination. 
        • The technique allows a packet to switch to buffer a short burst of packets that arrive simultaneously.
    • Addressing in a WAN
      • Hierarchical addressing
        • Divides each address into Site and Computer at the site
    • Next Hop Forwarding
      • Only the first part of a destination address is used when forwarding a packet across a WAN. Once the packet reaches the switch to which the destination computer attaches, the second part of the address is used to forward the packet to the correct local computer.
      • Source Independence
        • Allows the forwarding mechanism in a computer to be compact and efficient
          • Only one table is required
          • Only the destination address needs to be extracted from a packet
          • Uses a uniform process for packets from directly connected computers and those from another packet switch.
    • Dynamic Routing Updates in a WAN
      • Each switch must have a forwarding table whose value guarantee:
        • Universal communication - must contain a valid next-hop route for each possible destination address
        • Optimal routes - the next-hop value for a given destination must point to the shortest path to the destination
      • Default Routes
        • A mechanism used to eliminate duplicate entries by using a single default route to replace a long list of entries with the same next-hop value
    • Forwarding Table Computation
      • Two basic approaches:
        • Static Routing - a program computes and installs routes when a packet switch boots; the routes do not change.
        • Dynamic Routing - a program builds an initial forwarding table when a packet switch boots; the program then alters the table as conditions in the network change.
    • Distributed Route Computation
      • Rather than one centralized program computing all shortest paths, each packet switch must computer its own forwarding table locally. There are two general forms:
        • Link-State Routing (LSR), using Dijkstra's algorithm
          • Also known as Shortest Path First (SPF) Routing
          • Packet switches periodically send messages across the network (to all switches) that carry the status of a link between two packet switches. Each switch runs software that collects incoming status messages and uses them to build a graph of the network and then Dijkstra's algorithm to build a forwarding table by choosing itself as the source.
            • Dijkstra's algorithm computers R, a next-hop forwarding table, and D, the distance to each node form the specified source node.
          • Able to adapt to hardware failures.
        • Distance-Vector Routing (DVR)
          • Also arranges for packet switches to exchange messages periodically, but requests a complete list of destinations and the current cost of reaching each.
          • DVR messages are not broadcast, each packet switch periodically sends a DVR message to its neighbors containing pairs of destination/distance
          • When a message arrives at packet switch from neighbor N, the packet switch updates its forwarding table if the neighbor has a shorter path to some destination D.
          • One of the primary problems with DVR comes from backwash (packet switch receives information that it sent) which creates a routing loop
            • Routing mechanisms contain constraint and heuristics to prevent problems like routing loops, one such technique is split horizon
              • Specifies that a switch does not send information back to its origin
            • Other systems include hysteresis that prevents software from making many changes in a short time
              • This can cause routing problems in a large network where many link fail and recover frequently.
        • Shortest Path Computation in a Graph
          • Because it uses weights on links when computing shortest paths, Dijkstra's algorithm can be used with measures other than geographic distance.
          • The algorithm requires four data structures to store:
            • Information about the graph
            • Current distance to each node
            • Next-hop for the shortest path
            • Information about the remaining set of nodes


Chapter 19: Networking Technologies Past and Present

  • Connection and Access Technologies
    • Synchronous Optical Network or Digital Hierarchy (SONET/SDH)
      • Originally designed as a system to carry digital voice telephone calls, it has become the standard for digital circuits used throughout the internet. Permits a physical ring to be constructed for the purpose of redundancy. Hardware can detect and correct problems.
      • Add-Drop multiplexor is used to connect a site to a SONET ring. Uses TDM. 
      • SDH provides standards for circuits such as T3 that can be configured across a SONET ring.
    • Optical Carrier (OC)
      • OC standards specify signaling used on an optical fiber SONET ring. Offer higher data rates than the T-series standard provided by SDH
    • Digital Subscriber Line (DSL) and Cable Modems
      • These technologies are the principle means of providing broadband internet to private residences and small businesses. DSL offers 1-6 Mbps rates, depending on the distance between the central office and the subscriber; Cable modems offer up to 52 Mbps.
    • WiMAX and Wi-Fi
      • Wireless technology is widely used and has continued to increase data rates. WiMAX uses fixed or mobile optimization.
    • Very Small Aperture Satellite (VSAT)
      • Has high data rates but long delays, delivers Internet access via satellite
    • Power Line Communication (PLC)
      • Uses existing infrastructure to deliver Internet services across power lines at high frequencies.
  • LAN Technologies
    • IBM Token Ring
      • Major LAN technology for many years in corporate applications. Began at 4 Mbps and ultimately reformulated as 16 Mbps. Pricey.
    • Fiber and Copper Distributed Data Interconnect (FDDI and CDDI)
      • Developed in the late 1980s to address data rate issues with early Ethernet and Token Rings. Introduced one of the earliest LAN switches, but was ultimately abandoned due to the rise of fast Ethernet.
    • Ethernet
      • Although Ethernet dominates the LAN market, the original Ethernet (10 Mbps) has disappeared completely, replaced by new technology (100 Mbps - 1 Gbps) still called Ethernet.
  • WAN Technologies
    • ARPANet
      • Advanced Research Projects Agency (ARPA) funded networking research in the late 1960s for the USDOD to determine if wide area networks and packet switching would be valuable for the military. Connected researchers from academia and industry. Operated at 56K. Its concepts, algorithms and terminology are still in use today as APRANet formed the first Internet backbone in 1983 when ARPA began using Internet protocols.
    • X.25
      • invented before personal computers became popular used to connect ASCII terminals; this technology captured key strokes, placed each in an X.25 packet and transmitted them across the network
    • Frame Relay
      • developed by long distance carriers to transport data; designed to accept and deliver blocks of data (up to 8K octets); designed to run at 4-100 Mbps, but high cost drove much business to less expensive, slower connection technologies
    • Switched Multi-megabit Data Services (SMDS)
      • high-speed (>1 Mbps) wide area data service offered by long distance carriers; designed to carry data rather than voice using a special connectionless hardware interface
    • Asynchronous Transfer Mode (ATM)
      • Introduced as an alternative to the Internet in the 1990s it offered high data rates that could accommodate video; used label switching to change address each time a packet passed through a switch. Hardware was complex and expensive.
    • Multi-Protocol Label Switching (MPLS)
      • Resulted from ATM efforts; adapted label switching for use in Internet routes
    • Integrated Services Digital Network (ISDN)
      • 128 Kbps, advance over dial-up modems but by the time it was available seemed slow for the price.

Monday, March 5, 2012

Part II: Data Communications

Chapter 5: Overview of Data Communications
Although it includes concepts from physics and mathematics, data communications provides a foundation that is used to construct practical communication systems. 

  • Three main topics define the scope of data communications:
    • Sources of data can be arbitrary types
    • Transmission uses a physical system
    • Multiple sources of information can share the underlying medium
  • Data communications has subtopics:
    • Information sources. Analog or digital
    • Source encoder and decoder. Data compression.
    • Encryptor and decryptor. Cryptographic techniques and algorithms.
    • Channel encoder and decoder. Detect and correct transmission errors.
    • Multiplexor and demultiplexor. Multiple sources combine data for transmission. Simultaneous sharing and turn-taking techniques.
    • Modulator and demodulator. Analog and digital modulation schemes, and modems.
    • Physical channel and transmission. Transmission media and modes. Bandwidth, noise and interference, channel capacity, modes such as serial or parallel.


Chapter 6: Information Sources and Signals
Throughout the study of data communications, it is important to remember that the source of information can be arbitrary and includes devices other than computers.

Sine waves are fundamental to input processing because many natural phenomena produce a signal that corresponds to a sine wave as a function of time.

  • Four important characteristics of signals relate to sine waves:
    • Frequency. Oscillations per unit time.
    • Amplitude. Difference between maximum and minimum signal heights.
    • Phase. Shift of the sine wave start position from reference time
    • Wavelength. Length of a cycle as a signal propagates across a medium.
  • The importance of composite signals and sine functions:
    • Modulation usually forms a composite signal.
    • Can decompose a composite signal into its constituent parts: a set of sine functions each with frequency, amplitude and phase.
      •  Discovered by Fourier
  • The bandwidth of an analog signal is the difference between the highest and lowest frequency of its components. 
    • If the signal is plotted in the frequency domain, the bandwidth is trivial to compute.
  • Digit signals and signal levels
    • A communication system that uses two signal levels can only send one bit at a given time.
      • A system that supports 2^n signal levels can send n bits at a time.
  • An alternative method of increasing the amount of data that can be transferred in a given time consists of decreasing the amount of time that the system leaves a signal at a given level.
    • bits per second = baud x [log sub2(levels)]
  • Converting from digital to analog
    • Approximating an analog signal from a digital one using Fourier results in an infinite set of sine waves, so approximation is used in practice.
      • As few as three are necessary.
      • A digital signal has infinite bandwidth.
    • Line coding
      • A variety of coding techniques are available that differ in how they handle synchronization as well as other properties such as the bandwidth used.
        • Manchester Encoding - detecting a transition in the signal level is easier than measuring the  signal level. 1 corresponds to the transition from 0V to a positive voltage level. Similarly, 0 corresponds to the transition from a positive voltage level to zero.
        • Differential Manchester Encoding (Conditional DePhase Encoding) - uses relative transitions rather than absolute. Transition always occurs in the middle of the bit time. The logical value of the bit is represented by the presence or absence of a transition at the beginning of the bit time. 0 = transition, 1=no transition.
  • Converting from analog to digital
    • Two basic approaches:
      • Pulse code modulation (PCM)
        • PCM encoder consists of a sequence of sampling (recording), quantization (converting recording into small integer values) and encoding (onto a specific format).
        • Used in data systems that expect data values to be lost or changed during transmission.
      • Delta modulation
        • Also takes samples, but instead of quantization for each sample, delta modulation sends one quantization value followed by a string of values that give the difference between the previous value and the current value.
          • Transmitting differences requires fewer bits than full values, particularly if the signal does not vary rapidly.
          • Drawback is in the propagation of errors. One lost or damaged item will call all successive values to be misinterpreted.
    • Nyquist Theorem and Sampling Rate
      • Too few samples is undersampling (results in crude oversimplification of the original signal), too many is oversampling (generates unnecessary data which uses more bandwidth).
      • Ideal sampling rate = 2 x highest frequency in the composite signal
        • Digitized voice call = 8K samples/second x 8 bits/second = 64K bits/second
    • Encoding and data compression
      • Lossy - some information is lost during compression
        • JPG, MP3
      • Lossless - all information is retained in the compressed version.
        • Most implementations use the dictionary approach where compression finds repeated strings and compresses by building and referencing a dictionary of those strings.


Chapter 7: Transmission Media

  • Guided and unguided transmission:
    • By type of path
      • Communication can follow an exact path such as a wire, or can have no specific path, such as a radio transmission.
    • By form of energy
      • Electrical energy is used on wires, radio transmission is used for wireless, and light is used for optical fiber.
  • Background radiation and electrical noise
    • The random electromagnetic radiation generated by devices such as electric motors can interfere with communication that uses radio transmission or electrical energy sent over wires.
      • Random electromagnetic radiation (noise) permeates the environment
      • When it hits metal, electromagnetic radiation induces a small signal
      • Because it absorbs radiation, metal acts as a shield.
    • Twisted pair copper wire
      • Unshielded Twisted Pair (UTP)
        • Twisting eliminates the potential difference that builds up along parallel wires.
      • Coaxial cable
        • Heavy shielding and symmetry make coaxial cable immune to noise, capable of carrying high frequencies, and prevent signals on the cable from emitting noise to surrounding cables.
      • Shielded Twisted Pair (STP)
        • Cat 7 = 600 Mbps
  • Media using light energy and optical fibers
    • Optical fibers
      • Angle of incidence is:
        • Less than the critical angle = refraction
        • Equal to the critical angle = absorption
        • Greater than the critical angle = reflection
      • Types of fiber and light transmission
        • Multimode, Step Index: least expensive because boundary between fiber and cladding is abrupt causing frequent reflection and signal dispersion.
        • Mutimode, Graded Index: slightly more expensive than step index, fiber density increased near the edge, reducing reflection and lowering dispersion.
        • Single Model: most expensive, least dispersion. Small diameter and other properties to reduce reflection. Used for long distances and higher bit rates.
      • Transmission:
        • Light Emitting Diode (LED)
        • Injection Laser Diode (ILD)
      • Reception
        • Photo-sensitive cell
        • Photodiode
      • Compared to copper wire
        • Immune to electrical noise
        • Less signal attenuation
        • Higher bandwidth
        • Higher cost
        • More expertise and equipment required
        • More easily broken
    • InfraRed transmission
      • Best suited for indoors in situation where the path between sender and receiver is short and free from obstruction.
    • Point-to-point lasers
      • Transmitter and receive must be aligned precisely
        • Typical installations affix the equipment to a permanent structure.
  • Electromagnetic (Radio) Communication
    • Signal propagation
      • Low frequency, <2Mbps, waves follow Earth's curvature but can be blocked by unlevel terrain.
      • Medium frequency, 2-30Mbps, wave can reflect from layers of the atmosphere
      • High frequency, >30Mbps, wave travels in a direct line and will be blocked by obstructions.
    • Wireless technologies are classified into two broad categories:
      • Terrestrial. Communication uses equipment such as radio or microwave transmitters, is relatively close to the Earth's surface.
      • Nonterrestrial. Some of the equipment used in communication is outside the Earth's atmosphere.
        • Types of satellites:
          • Low Earth Orbit (LEO): low delay, moves across the sky
            • A cluster of LEO satellites work together to forward messages.
          • Medium Earth Orbit (MEO): elliptical orbit, polar communications
          • Geostationary Earth Orbit (GEO): fixed position but further away (so more delay)
            • Distance required = 35,785 km (1/10th distance to the moon)
            • Radio wave to the GEO satellite and back = 0.238 seconds
            • Can cover the whole earth with three satellites at 120 degrees from one another.
  • Tradeoffs Among Media Types
    • Cost: materials, installation, operation and maintenance
    • Data rate
      • Channel capacity = the maximum data rate that the medium can support
      • Claude Shannon's Theorem determines the maximum data rate that could be achieved over a transmission system that experiences noise. C= data rate in bps, B=hardware bandwidth, S/N=signal to noise ratio or average signal power divided by the average noise power.
        • C = B log sub2(1 + S/N)
        • S/N often expressed in dB
          • dB=10 log sub10[P2/P1]
    • Delay: time required for signal propagation or processing
      • Propagation delay = the time required for a signal to traverse the medium
    • Affect on signal: attenuation or distortion
    • Environment: susceptibility to interference and electrical noise
    • Security: susceptibility to eavesdropping
  • Significance of Channel Capacity
    • Nyquist's Theorem encourages engineers to explore ways to encode bits on a signal because a clever encoding allows more bits to be transmitted per unit time.
    • Shannon's Theorem informs engineers that no amount of clever encoding can overcome the laws of physics that place a fundamental limit on the number of bits per second that can be transmitted in a real communications system.


Chapter 8: Reliability and Channel Coding

  • There are three main sources of transmission errors:
    • Interference - electromagnetic radiation emitted from devices or from background cosmic radiation
    • Distortion - all physical systems distort signals. Wires have properties of capacitance and inductance that block signals at some frequencies while admitting signals at other frequencies.
    • Attenuation - as a signal passes across a medium, the signal becomes weaker.
  • Although transmission errors are inevitable, error detection mechanisms add overhead. A designer must choose which error detection and compensation mechanisms will be used.
  • Effect of Transmission Errors on Data
    • Single bit error - only a single bit in a block of bits is changed. Often results from very short duration interference.
    • Burst error - multiple bits in a block of bits are changed. Results from longer duration interference.
    • Erasure (ambiguity) - signal that arrives at the receiver is ambiguous, not clearly a logical 1 or 0. Can result from distortion or interference.
  • Two strategies for handling channel errors:
    • Forward Error Correction (FEC) mechanisms
      • Block Error Codes: block code divides the data to be sent into sets of blocks and attaches extra information known as redundancy to each block. The encoding for a given block depends only on the bits themselves, not on bits that were sent earlier. Block error codes are memoryless in the sense that the encoding mechanism does not carry state information from one block of data to the next.
        • Single parity checking (SPC) is a basic form of channel coding in which a sender adds an extra bit to each byte to make an even (or odd) number of 1 bits and a receiver verifies that the incoming data has the correct number of 1 bits.
      • Convolutional Error Codes: convolutional code treats data as a series of bits, and computes a code over a continuous series. Thus, the code computed for a set of bits depends on the current input and some of the previous bits in the stream. Convolutional codes are said to be codes with memory.
    • An ideal channel coding scheme is one where any changes to bits in a valid codeword produces an invalid combination. There is a tradeoff between error detection and overhead
      • Hamming Distance measures a code's strength and can be used on strings in a codebook.
        • To find the maximum number of bit changes that can transform a valid codeword into another valid codeword, compute the minimum Hamming distance between all pairs in a codebook.
      • Row and Column (RAC) encoding
        • Allows a receiver to correct any single bit error and to detect errors in which two or three bits are changed.
      • 16-bit Checksum Used in the Internet
        • Two forms of zero:
          • All 0s, meaning unused
          • All 1s, represents a checked all 0s
      • Cyclic Redundancy Codes (CRCs)
        • Three key properties:
          • Arbitrary message length
          • Excellent error detection
          • Fast hardware implementation
        • Many disciplines have studied CRC.
    • Automatic Repeat reQuest (ARQ) mechanisms
      • Requires the sender and receiver to communicate metainformation
        • Receiving side sends a short acknowledgement message back
        • If no acknowledgement received after T time units, the sender retransmits a copy assuming the original message has been lost.


Chapter 9: Transmission Modes

  • Taxonomy of transmission modes:
    • Serial - one bit sent at a time
      • Advantages:
        • Can be extended over long distances without timing problems
        • Less expensive (fewer physical wires and intermediate electronic components are less expensive)
      • Transmission order
        • Most significant bit (MSB or big-endian)
        • Least significant bit (LSB or little-endian)
        • Bit order and byte order are independent of one another
          • Ethernet uses byte big-endian bit little-endian
      • Timing of Serial Transmission
        • Asynchronous - can occur at any time with an arbitrary delay between the transmission of two data items.
          • Sends extra information before each transmission that allows a receiver to synchronize with the signal
          • EIA RS-232-C is an accepted standard for asynchronous, serial communication over short distances and precedes each character with a start bit, sends each bit of the character, and follows each character with an idle period at least one bit long (stop bit).
        • Synchronous - occurs continuously with no gap between the transmission of two data items.
          • When compared to synchronous transmission an asynchronous RS-232 mechanism has 25% overhead per character.
          • Framing
            • Although the underlying mechanism transmits bits continuously, the use of an idle sequence and framing permits a synchronous transmission mechanism to provide a byte-oriented interface and to allow idle gaps between blocks of data.
        • Isochronous - at regular intervals with a fixed gap between the transmission of two data items.
          • Designed to provide a steady bit flow for multimedia applications like video.
          • Accepts data at a fixed rate
          • For an isochronous connection operating at fixed rate R, there is an underlying synchronous mechanism that operates at slightly more than R bps
    • Parallel - multiple bits sent at the same time
      • Two chief advantages:
        • High speed
        • Matches the communication mode of the underlying hardware
  • A communication channel is classified a one of three types depending on the direction of transfer:
    • Simplex - unidirectional data transfer
    • Full-Duplex - concurrent bidirectional data transfer
    • Half-Duplex - shared transmission mechanism that allows bidirectional data transfer where only one side transmits at a given time
  • Data Communications Equipment (DCE) is equipment owned by the phone company, while Data Terminal Equipment (DTE) is equipment owned by the subscriber.



Chapter 10: Modulation and Modems

  • Analog modulation schemes
    • Modulation refers to changes made in a carrier according to the information being sent
    • Three primary techniques exist to modulate an electromagnetic carrier according to a signal:
      • Amplitude modulation
        • Varies the amplitude of a carrier in proportion to the information being sent (the signal). Frequency stays constant.
        • In practice modulation only changes the amplitude of a carrier slightly depending on the modulation index constant.
          • Prevents amplitude from reaching zero, where Shannon's theorem predicts the signal to noise ration would also approach zero. The larger the signal to noise ratio the more bits per second can be transferred.
      • Frequency modulation
        • Varies the frequency of a carrier in proportion to the information being sent. Amplitude of the carrier is unaltered (continues as a sine wave).
      • Phase Shift modulation
        • Phase is the offset from a reference time at which the sine wave begins. It is possible to represent a signal by using changes in phase.
        • This technique seldom used with an analog signal. For analog signal phase shift modulation is essentially a special case of frequency modulation.
  • Modulation, Digital Input and Shift Keying
    • Shift keying is the digital equivalent of Analog modulation
      • Amplitude Shift Keying (ASK)
      • Frequency Shift Keying (FSK)
      • Phase Shift Keying (PSK)
        • Changes the phase of the carrier abruptly to encode data. Each change is called a phase shift.
          • The chief advantage of mechanisms like phase shift keying arises from the ability to represent more than one data bit at a given change. 
            • A constellation diagram shows the assignment of data bits to phase changes.
            • Although many variations of phase shift keying exist, noise and distortion limit the ability of practical systems to distinguish among arbitrarily small differences in phase changes.
        • Quadrature Amplitude Modulation (QAM)
          • Uses both change in phase and change in amplitude to represent values to increase the data rate.


Chapter 11: Multiplexing and Demultiplexing (Channelization)

  • There are four basic approaches to multiplexing:
    • Frequency Division Multiplexing
      • Because carrier waves on separate frequencies do not interfere, FDM provides each sender and receiver pair with a private communication channel over which any modulation scheme can be used.
        • Long-lived (since early experiments with radio)
        • Widely used (radio, TV, cable, AMPS cellular telephone)
        • Analog (accepts and delivers analog signals, even if the carrier is modulated to contain digital information FDM treats the carrier as an analog wave; also makes it susceptible to noise and distortion)
        • Versatile (filters on ranges of frequencies without examining other aspects of the signals)
      • Can use a range of frequencies in FDM to:
        • Increase the data rate
        • Increase the immunity to interference
      • Hierarchical FDM
        • It is possible to build a hierarchy of frequency division multiplexing in which each stage accepts as inputs the outputs from the previous stage
    • Wavelength Division Multiplexing
      • When frequency division multiplexing is applied to optical fiber, prisms are used to combine or separate individual wavelengths of light, and the result is known as wavelength division multiplexing.
    • Time Division Multiplexing
      • Means simply transmitting an item from one source, then transmitting an item from another source, etc.
      • Broad concept that appears in many forms 
      • Synchronous TDM
        • The synchronous TDM mechanism used for digital telephone calls includes a framing bit at the beginning of each round. The framing sequence of alternating 1s and 0s insures that a demultiplexor either remains synchronized or detects the error.
    • Inverse Multiplexing
      • When the only connection between two points consists of multiple transmission media, but no single medium has a sufficient bit rate, inverse multiplexing allows one to spread high-speed digital input over multiple lower-speed circuits for transmission and combine the results on the receiving end.
    • Code Division Multiplexing
      • Relies on mathematical idea: values from orthogonal vector spaces can be combined and separated without interference.
      • CDM incurs lower delay than TDM when a network is highly utilized.


Chapter 12: Access and Interconnection Techniques
A typical residential subscriber receives much more information than the subscriber sends, Internet access technologies are designed to transfer more data in one direction than the other.



  • Internet access technologies can be divided into two broad categories based on the data rate they provide:
    • Narrowband
      • Generally <= 128 kbps
      • Dialup telephone connections, leased circuit using modems, fractional T1 data circuits, ISDN and other telco data services
    • Broadband
      • Delivers >=128 kbps, though some professionals suggest broadband is really >1Mbps
      • DSL, cable modem, wireless access technologies, data circuits at T1 or higher
        • Because it uses FDM, ADSL and plain old telephone service (POTS) can use the same wires simultaneously.
        • VDSL=52Mbps
        • ADSL uses an adaptive technology in which a pair of modems probe many frequencies on the line between them, and select frequencies and modulation techniques that yield optimal results on the line.
        • Cable modems use FDM, so a cable modem can be easily attached directly to existing cable wiring without a splitter.
      • Access technologies the employ optical fiber
        • FTTC - Fiber to the Curb. Uses twisted copper for feeder circuits that cover the final distance to building or home.
        • FTTB - Fiber to the Building. Business subscribers.
        • FTTH - Fiber to the Home. Residential subscribers.
        • FTTP - Fiber to the Premises. Encompasses FTTB and FTTH
      • Wireless Access Technologies
        • 3G services - third generation cellular telephone services for data
        • WIMAX - wireless access technology up to 155 Mbps using radio frequencies
        • Satellite - data services over satellite
      • High Capacity Connections at the Internet Core
        • Digital circuits leased from common carriers form the fundamental building blocks for long-distance data communications. The cost depends on the circuit capacity and distance.
        • A digital circuit needs a device known as a DSU/CSU at each end. The DSU/CSU translates between the digital representation used by phone companies and the digital representation used by the computer industry.
      • Synchronous Optical NETwork (SONET)
        • Although the SONET standard defines a technology that can be used to build a high-capacity ring network with multiple data circuits multiplexed across the fibers that constitute the ring, most data networks only use SONET to define framing and encoding on a leased circuit.