The Technologies Behind the Lecture 1 – April 7, 2016 “Lincoln Towers University” April 2016 Thursdays 7:30-9 pm, 150 WEA Community Room

Instructor: Stephen Weinstein

[email protected], (646) 267-5904 Lecture notes posting site: projectopenlincolntowers.org/lincolntowersuniversity Your instructor

A mostly retired engineer living in Lincoln Towers, with a PhD in electrical engineering from U.C. Berkeley and extensive experience in the communications industry. I am a member of the Boards of the 150WEA Owners Corp. and of Project Open*. My consulting website, cttcservices.com, has further personal background information.

*I maintain the Project Open web site, projectopenlincolntowers.org Goals of this course

1. Provide an intuitive explanation, not requiring an engineering or computer science background, of -Internet history -The technical foundations of the Internet -Relevant basic concepts of communications and information technology.

2. Answer your questions. Don’t be afraid to ask! Topics Covered in Four Lectures

Lecture 1: Internet background and -Definitions of a few basic terms. -Internet definition, history and organizations.

-What "analog" and "digital" mean for media (images, audio and video, and why the world has gone digital. -Analog to Digital (A/D conversion) and digital compression to reduce the size of media files and streams. Lecture 2: Communications I will explain: -Frequency, wavelength, and data rate. -Modulation, modems and networks. -Protocol stacks. -Access (telephone, cable, optical, cellular mobile) networks. Cellular mobile history and techniques. -Local (, WiFi, Bluetooth, infrared) networks. -Line switching, and virtual circuits. Lecture 3: Internet architecture & technologies -Internet architecture (routers, DNS, …). -Connection-oriented vs. connectionless (datagram). -The Internet Protocol (IPv4 and IPv6), protocols in the transport layer above (TCP, UDP), and some other important protocols (OSPF, DHCP). -Translating URLs to IP addresses. -Avoiding address depletion (local addresses and IPv6). Lecture 4: Internet applications -The original application level protocols: ftp, smtp, telnet -The World Wide Web: History, browsers, and web pages HTML web pages and HTTP retrieval. -Audio and video streaming, VoIP (e.g., Skype). -. -Security attacks (e.g., denial of service) and defenses. -The Internet of Things. Lecture 1: Internet background and digital media

Basic terms. Internet definition, history and organizations. A few introductory definitions: Bit: A unit of information, equivalent to the information generated by the toss of an unbiased coin (head or tail). (Byte: 8 bits.) Computer scientists like to say “1” or “0” rather than “head” or “tail”. It’s just a name, not a count! We will, in today’s class, explain how a speech or video signal can be represented by a data sequence of bits.

Analog to digital conversion

…01110000110101000 ... Network (for data communications): A set of originating and terminating nodes, forwarding nodes, and the transport links connecting them, for conveying data (information) traffic. Packet: A data package conveying (in its payload), through a network, bits representing part or all of a message.

Complete message

A series of packets, each carrying part of the message

It’s a lot like packing a large shipment into a series of trucks that may possibly be of different sizes. A network link may carry a mixed stream of packets from different sources represented by 1, 2, 3, 4

2-voice 3-keyboard

1-video 1-video 1-video 1-video (Communication) protocol: A formal description of the format and rules for a message exchange. Several layers of protocols are usually needed to completely specify an information exchange. A packet protocol, for example, will specify elements such as sending and receiving addresses, size, and information type.

Header Information field (payload)

Source & destination addresses, etc. Decimal and binary numbers We have ten fingers and that is why we use decimal numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 We represent an integer by multiples of powers of 10. Example: 14 = 1x10 + 4x1

If we had two fingers, like electronic memories, we would use binary numbers to represent an integer by multiples of powers of 2. Example: 14 (decimal) = 1110 (binary) = 1x8 + 1x4 + 1x2 + 0x1 Definitions of an internet and the Internet An internet (not the Internet) is a combination of several distinct communication networks capable of conveying data between endpoints on different networks. Access Core Networks Local Area networks Networks Bluetooth Satellite Personal Area Networks Cellular Infrared mobile

WiFi Optical Core Network, (IEEE 802.11) Cable (HFC) Bluetooth metropolitan & long haul DSL

Ethernet The Internet is the publicly available combination of multiple distinct communication networks augmented by the Internet Protocol (IP) and subscribing to Internet standards in order to convey data between endpoints on different networks.

IP Domain Name The Internet is one example of Server an internet Router Cellular mobile WiFi Cable (HFC) Optical Core Network, Bluetooth router metropolitan & long haul IP Ethernet Optical fiber

Donald Davies

Lawrence Roberts Leonard Kleinrock

Robert Vinton Kahn J.C.R. Licklider Cerf 1961-62: MIT Prof. J.C.R. Licklider envisioned a "Galactic Network" as a globally interconnected set of computers through which everyone could quickly access data and programs from any site. Leonard Kleinrock published first paper on relevant packet switching theory.

Mid 60s: Publications on packet switching from RAND (Paul Baran) and the National Physical Lab in the U.K. ().

Ref: https://www.internetsociety.org/internet/what-internet/history-internet/brief- history-internet FUNCTIONS OF A PACKET SWITCH (or Router) -Routing (which output line is part of the best path to destination?) -Forwarding (place packet in the waiting line (queue) for the desired output line.

Incoming packets on several lines Outgoing packets on several lines

Ref: https://www.internetsociety.org/internet/what-internet/history-internet/brief- history-internet 1968: Lawrence Roberts and colleagues at the U.S. Defense Advanced Research Projects Agency (DARPA) developed specifications and a Request for Proposals for the ARPANET, in particular for development of packet switches called Interface Message Processors (IMPs). The RFQ was won by Bolt Beranek and Newman (BBN). playing a major role in the design. The first IMP was installed at UCLA in 1969. Early ARPANET Architecture

HOST - A computer serving as an originating/terminating . IMP- Interface Message Processor, a packet switch handling up to four Hosts and four communications lines, implemented in a Honeywell DDP-516 minicomputer. TIP- Terminal Interface Processor, an IMP supporting 64 terminals. T - Terminal (“dumb” , just keyboard and screen). Ref: http://nrg.cs.ucl.ac.uk/internet-history.html IMP Why did they want a packet-switching data network rather than a line switching network like the telephone network?

Resilience : Ability to reroute packets if a link or node goes down. This was a major motivation for military networks.

Burst traffic: Ability to convey brief data bursts (like a keyboard entry) without the delay and complexity of setting up new switched lines.

Flexibility: Ability to mix different kinds of traffic (computer bursts, voice, video) at different data rates. 1971-72: Host-to-Host (computer to computer) Network Control Protocol (NCP). NCP provided connections and flow control between processes (computer programs) running on different ARPANET host computers but did not guarantee end-to-end reliability. NCP ran on top of packet forwarding supplied by the IMP. Fall 1972: Bob Kahn demonstrates ARPANET services at International Conference on Computer Communications (Washington). 1973: and Bob Kahn develop TCP/IP (Transport Control Protocol / Internet Protocol), a protocol pair supporting routing and reliable end-to-end connections built on IP’s “best effort” (datagram) service. Introduced internetworking across dissimilar networks (Kahn wanted to add a satellite network). Originally tightly integrated, TCP and IP were later separated to allow alternative transport-level protocols. These protocols will be described in later lectures. Cerf and Kahn receiving Presidential Medal of Freedom, 2006 This paper largely focused on the TCP part, process-to-process connections. 1980: TCP/IP adopted as a defense standard. 1981: Original DARPA protocol standard for IP (RFC 791). Jan. 1983: ARPANET cutover from NCP to TCP/IP. 1983: MILNET (Military Network) split off from ARPANET. 1986: NSFnet launched by the National Science Foundation, initially to interconnect supercomputers. Connection to ARPANET makes packet network more generally available to all academic users. Ref: https://www.nsf.gov/about/history/nsf0050/internet/launch.htm

http://207.75.117.26/research/nsfnet.php 1987: NSF upgrade solicitation, foreseeing commercial users. IBM, MCI and a consortium of Michigan universities win contract.

July, 1988: New backbone becomes operational, using 1.5 Mbps (megabit per second) links. This may be considered the beginning of the Internet. Demand surges, leading to replacement by 45 Mbps links in 1991. Did Al Gore have a role in realization of the Internet?

Yes, indirectly, of part of the modern Internet. He was prime sponsor of the 1991 High-Performance Computing and Communications Act which allocated $600 million to the National Center for Supercomputing Applications among other entities. The early Mosaic web browser was developed there. 2012, Gore was inducted into the Internet Hall of Fame for being “a key proponent of sponsoring legislation that funded the expansion of and greater public access to the Internet.” But he probably shouldn’t have said, in a 1999 interview with Wolf Blitzer, that “During my service in the United States Congress, I took the initiative in creating the Internet.” https://www.washingtonpost.com/blogs/fact-checker/wp/2013/11/04/a-cautionary- tale-for-politicians-al-gore-and-the-invention-of-the-internet 1989: Tim Berners-Lee invented the World Wide Web while at CERN (European Nuclear Research Center), mainly to help physicists exchange information. World Wide Web technologies (web sites and addresses, hypertext description language, …) will be explained in Lecture 4.

Early web browser 28 Feb. 1990: ARPANET formally decommissioned. It was not transformed into the Internet; they were different entities with the Internet inheriting technical concepts from ARPANET. 1991: Deployment of 45 Mbps links and establishment of for-profit subsidiary to enable commercial development of the network. NSF Backbone carrying 17.8 trillion bytes per month by end 1994. 1993: My wife, Judy, and I, together with several Bellcore, NJ Bell and Morris County Information Network colleagues, launch MORENET, second only to Seattle in providing Internet access to public libraries including dialup from home. http://mclib.info/wp-content/uploads/2015/06/timeline.pdf April, 1995. NSFNET backbone defunded, opening the Internet to full commercial use. NSF funding was $200 million from 1986 to 1995. Regional networks now bought national-scale Internet connectivity from various long-haul network providers. Ref: http://www.zakon.org/robert/internet/timeline/ Internet Organizations

NTIA ISOC Nat. Telecommun. & Internet Society Infor. Administration

IETF Internet Engineering ICANN Task Force Internet Corporation for Assigned Names & Numbers IANA functions IESG IAB Internet Assigned Internet Engineering Internet Architecture Numbers Authority Steering Group Board [Functions on next 2 slides] ISOC (Internet Society) The parent organization, formal or informal, of the Internet management bodies IETF (Internet Engineering Task Force) “The Internet Engineering Task Force (IETF) is a large open international community of network designers, operators, vendors, and researchers concerned with the evolution of the Internet architecture and the smooth operation of the Internet. It is open to any interested individual. “ http://www.ietf.org/old/2009/overview.html Draws up RFCs (Requests for Comments), mostly proposals for enhancing Internet technologies and capabilities, that may or may not be adopted as Internet standards. IAB (Internet Architecture Board) Architectural Oversight of protocols and procedures used by the Internet. Standards Process oversight and appeal Editorial management and publication of the Request for Comments (RFC) document series, and for administration of IANA assignments. IESG (Internet Engineering Steering Group) The major review body for standards. Responsible for technical management of IETF activities and the Internet standards process, specifically for the actions associated with entry into and movement along the Internet "standards track," including final approval of specifications as Internet Standards. Ref. for standards process: https://www.ietf.org/rfc/rfc2026.txt ICANN (Internet Corporation for Assigned Names and Numbers) Administers the IANA (Internet Assigned numbers Authority) functions of IP address space allocation, protocol parameter assignment, domain name system management, and root server system management functions Currently, stewardship is being passed from the U.S. Government's National and Information Administration (NTIA) “to the global, multi-stakeholder community.” Ref: http://www.internetsociety.org/ianaxfer The Internet’s Three Foundation Technologies:

-Digital Media (remainder of this class) -Communications (April 14) -Internet Architecture, Protocols and Applications (April 21 & 28) Digital Media

1. What do "analog" and "digital" mean for media (images, audio and video, and why has the world gone digital? Analog … refers to a continuous representation of an information object.

Examples: The electrical signal analog of a sound waveform in air. The magnetized track, in a VHS cassette, that is an analog of a visible light scene.

Digital … refers to a representation (usually an approximate representation) of an information object by a sequence of integer numbers.

Examples: The binary data sequence (or its recording on a CD) representing a sound waveform in air. The binary data sequence (or its recording on a DVD representing a visual experience (or an analog TV signal). Analog and digital recording media Phonograph record VHS cassette (analog (analog recording in magnetic recording on wiggly grooves) tape)

CD (compact disk) (binary recording using pits) DVD (digital video disk), like CD Continuous Signal with Analog and Digital Representations Sound pressure wave in air Transducer (acoustic to electric) (e.g. telephone mike)

Analog electrical waveform Analog to A/D digital conversion

Binary digital representation ...01110000110101000 ... Corresponding bipolar digital representation: An image, or frame of a video presentation, can also be represented digitally, with numerical values for luminance and colors in each pixel (picture element)

Digital pixel map or raster “Digital data” can be of any origin – audio, video, computational data, etc.

Digital data definition The characters or symbols representing information, on which operations can be performed by a computer, which can be electrically or optically transmitted from one place to another, and which can be magnetically, optically, or mechanically stored. Why did the world go digital? 1. Noise immunity Noise does not build up in digital transmission and recording the way it does in analog transmission and recording.

ANALOG – The Old Way Electrical analog signal (voice, video) Noisy transmission system Transmitter

Receiver

Noisy received waveform from transmission through long channels with amplifiers. DIGITAL – The New Way

A/D Trans Noisy transmission Rec D/A

Sample & decide. As long as decision is in the correct positive or negative direction, the digital signal can be exactly reproduced. 2. Digital compression Digital compressive coding can greatly reduce transmission rate and storage requirements with minimal reduction in perceived quality.

Digital compression voice 64 Kbps 8 Kbps A/D Trans- mitter 3. Error detection and correction Digital data can easily be encoded for secrecy (against a wiretapper) or authentication (verification of the source).

Digital compression voice A/D Digital encryption

Digital decompression Digital voice decryp- D/A tion 4. Adaptation to different rate channels Digital data can be sent faster or slower, adapting to different rate transmission channels, then played at normal rate.

Data at “real time” rate Playout at slower rate Electrical analog signal Buffer (voice, video) A/D Trans- mitter

Buffer Low-rate transmission D/A Receiver channel Playout (later) at “real time” rate

We’ll look into this again when we discuss streaming in lecture 4. Digital Media

Analog to digital conversion and media compression Analog to digital conversion Depends on the sampling theorem – one of the most important concepts in electrical engineering – stating that a bandlimited analog signal can be recovered from samples taken at a rate at least twice the maximum frequency contained in that signal.

Discoverers of the Sampling Theorem

Harry Nyquist (American) Vladimir Kotelnikov (Russian) These samples are then digitized, most simply by quantization and representation by digital words. “Frequency”, “bandlimited”, “spectrum” will be explained in the next class. Please accept, for the time being, an intuitive understanding of frequency as a pitch component of a signal, and spectrum as the set of pitch components for a particular signal. Frequency spectrum vs. time of a sad trombone

Time https://academo.org/demos/spectrum-analyzer Analog to digital (A/D) conversion Bandlimited waveform sample at intervals 1/2W (limit on how fast it wiggles)

Spectrum

-W W A/D converter Round off each 111 sample to the Sampler nearest quantiz- 110 ation level. [Like 101 a salesclerk round- 100 ing off price to the nearest nickel.] Quantization 011 levels 010 011 101 110 … 001 000 Example of quantizing an analog sample and representing it by a digital word

Amplitude Digital word of round- representing Amplitude off level round-off level 4 3.5 3 111 Analog sample 2.5 110 of size 1.9 2 1.5 101 101 1 0.5 100 0 -0.5 -1 011 -1.5 010 -2 -2.5 001 -3 -3.5 000 -4

Quantization error (noise) = difference between true analog value and nearest round-off level = 1.9 – 1.5 = 0.4 and back again: digital to analog (D/A) Conversion

Data from channel or storage 011 101 110 Regenerate Low-pass filter analog samples

-W W Hz

Approximation to original analog waveform Digital signals are robust but are not entirely noiseless because:

The digital quantization levels only approximate the actual analog waveform sample values. The difference is called “quantization noise”. Engineers allocate sufficient transmission or storage resources so that quantization noise is held to an acceptable level.

If there is too much noise in transmission, there may be some detection errors in the recovered digital data. Error correction coding is commonly employed. Digital Compression Media objects such as photographs, voice, music and video contain unneeded or redundant information. For example, a small area in a photo is highly likely to be almost identical to the small areas next door (spatial correlation), and one frame of a movie is very likely to be almost identical to the next frame 1/30 second later (temporal correlation). Digital compression … -Uses a finer representation (more quantization levels) of those signal components (such as lower frequencies or major facial features) that affect humans senses more. -Squeezes out much of the redundancy, doing corrective “updates” rather than resending or re-recording the same information.

Compression ratios (uncompressed file size vs. compressed file size) of 10-100 are common in compressed formats such as jpeg (.jpg) for images, mpeg-H.264 (.mp4) for video and .mp3 for audio. Taking compression too far results in audible or visible distortion. Digital compression example Left: .jpg image, 37KBytes (original .jpg 253KBytes, uncompressed would be about 3 MBytes) Right: .jpg image, 2KBytes

Himalayas at dawn, Mussoorie, India Frequency domain compressive coding

Transform-domain coefficients Fine digital resolution: (proportions of different 8 quantization levels frequency components) (represented by 3 bits) Data (say N numerical X values) from 0 110 Compressed data stream a spatial X area or a 1 temporal 1 waveform XN-1

N:N transform Coarse digital resolution: only 2 quantization to frequency levels (represented by 1 bit) domain values JPEG compressive coding does this, using the Discrete Cosine Transform to generate the frequency-domain coefficients

8x8 pixel block 64 frequency-domain coeffs Longer binary words X , n,m=0,…,7 for higher quantization n,m Quantizer levels Compressed image data DCT Xn,m/Dn,m

Scaling coeffs. [Dn,m]

Dn,m large for coarser quantization, small for finer quantization

DCT: Discrete Cosine Transform, a popular spacial-to-frequency mathematical transform. Motion compensation coding – transmit only the difference between a prediction and reality

Block being coded Current frame Current frame

time

+ Reference Motion vector Motion Source frame prediction vector Σ Σ coder Predicted difference current frame frame

Motion vector Most likely prior location in reference frame H.264 (mp4) compressive coding

H.264 or MPEG-4 Part 10, Advanced Video Coding (MPEG-4 AVC) is a block-oriented motion-compensation-based video compression standard that is currently one of the most commonly used formats for the recording, compression, and distribution of video content. …

The ITU-T H.264 standard and the ISO/IEC MPEG-4 AVC standard (formally, ISO/IEC 14496-10 – MPEG-4 Part 10, Advanced Video Coding) are jointly maintained so that they have identical technical content. https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC H.264 (mp4) compressive coding

-Video Coding Layer (VCL) creates a coded representation of the source content.

-Network Abstraction Layer (NAL) formats VCL data, provides header information, and facilitates customization of the use of VCL data. Ref: H. Schwarz et.al., “Overview of the Scalable Video Coding Extension of the H.264/AVC Standard”, IEEE Trans. On Circuits & Systems, Sept. 2007.

NAL packet Video coding or supplemental data Header 1 byte Macroblock by macroblock video layer compressive coding 8x8 for each of two 16x16 macroblockfor luminance coding chrominance codings

slice Coding of macroblocks

-Samples of a macroblock are either spatially or temporally predicted, and the difference between the prediction and the actual macroblock is represented using transform (frequency) domain coding.

Macroblock being Current frame coded Current macroblock Coding of transform domain coefficients + Reference change vector Motion Transform frame prediction* vector Σ Σ to frequency domain Predicted macroblock Difference macroblock *Change over time (inter-picture temporal prediction, from previous frame) or over space (intra-picture spatial prediction, from neighboring macroblocks) Slices of macroblocks of different predictive types

-Macroblocks are organized in slices of several macroblocks, of which there are 3 types:

1. I-slice: intra-picture predictive coding using spatial prediction from neighboring regions Edited sections usually start with an I slice because it doesn’t depend on earlier or later frames

2. P-slice: both intra-picture and inter-picture predictive coding

3. B-slice. intra-picture, inter-picture and inter-picture bipredictive coding with two prediction signals that are combined with a weighted average to form the region prediction. Compressive video coding is a complex set of technologies …

… and I apologize for imposing on your patience.

It’s important to remember only that compressive coding makes big reductions in transmission and storage requirements by clever prediction and attention to human perception. The approaches are similar for audio encoding, not directly addressed here. End of Lecture 1

Next lecture: Communications