Computer Networks Lecture 03 (COE768) PDF

Document Details

FastPacedClavichord

Uploaded by FastPacedClavichord

Toronto Metropolitan University

2024

Dr. Khalid A. Hafeez

Tags

computer networks physical layer communication theory data transmission

Summary

This document presents a lecture on computer networks, focusing on the physical layer. The lecture covers fundamental concepts and theoretical basis, along with various transmission media and modulation techniques.

Full Transcript

Computer Networks COE768 Lecture 03 The Physical Layer Dr. Khalid A. Hafeez Fall, 2024 Overview Theoretical Basis for Data Communications Guided Transmission Media Wireless Transmission Communication Satellites Digital Modulation and Multiplexing Publi...

Computer Networks COE768 Lecture 03 The Physical Layer Dr. Khalid A. Hafeez Fall, 2024 Overview Theoretical Basis for Data Communications Guided Transmission Media Wireless Transmission Communication Satellites Digital Modulation and Multiplexing Public Switched Telephone Network Mobile Telephone System Cable Television 2 The Physical Layer The physical layer is the foundation on which other layers are built Properties of wires, fiber, and wireless limit what the network can do It determines throughput, latency, and error rate of a network communication link Key problem is to send (digital) bits using only (analog) signals This is called modulation Application Transport Network Link Physical 3 Theoretical Basis for Data Communication Information can be transmitted on wires by varying some physical property such as voltage or current, frequency, or phase. Communication rates have fundamental limits Fourier analysis » Bandwidth-limited signals » Maximum data rate of a channel » Bandwidth: To electrical engineers, (analog) bandwidth is a quantity measured in Hz. To computer scientists, (digital) bandwidth is the maximum data rate of a channel, in bps. 4 Theoretical Basis for Data Communication Fourier Analysis A time-varying signal can be equivalently represented as a series of frequency components (harmonics) or infinite number of sines and cosines: The signal period is T, so its fundamental frequency is f=1/T  Where an and bn are the sine and cosine amplitudes of the nth harmonics (terms), and c is a constant = Signal over time a, b weights of harmonics 5 Theoretical Basis for Data Communication Bandwidth-Limited Signals Consider the transmission of the ASCII character "b" = "01100010". Having less bandwidth, we lose some of the harmonics  This degrades the received signal 8 harmonics Lost! Bandwidth 4 harmonics Lost! 2 harmonics Lost! 6 Guided Transmission Media (Wires & Fiber) Media have different properties, hence performance in terms of bandwidth, delay, cost, and ease of installation and maintenance. Two groups:  Guided media, – Copper wire » Twisted pairs » » Coaxial cable » » Power lines » – Fiber optics, » Single mode » Multimode  Unguided media, – Terrestrial wireless, – Satellite, – Lasers through the air. 7 Guided Transmission Media (Wires & Fiber) Wires – Twisted Pair Two insulated copper wires; used in LANs, telephone lines  Twists reduce radiated signal (interference)  The signal is carried as the difference in voltage between the two wires.  The bandwidth depends on wire thickness and the distance traveled.  Twisted-pair cabling comes in several categories: – Category 5 (Cat 5) has 4-twisted pairs grouped together: » 100-Mbps Ethernet uses two (out of the four) pairs, one pair for each direction » 1-Gbps Ethernet uses all four pairs in both directions simultaneously – Category 6 (compatible with cat 5): 10Gbps, has more stringent specifications for crosstalk and system noise, up to 100m. » UTP (unshielded twisted pair). – Category 7: it is STP (shielded twisted pair) Twisted pair 8 Guided Transmission Media (Wires & Fiber) Link Terminology Full-duplex link  Used for transmission in both directions at the same time  e.g., use different twisted pairs for each direction Half-duplex link  Both directions, but not at the same time  e.g., senders take turns on a wireless channel Simplex link  Only one fixed direction at all times; not common 9 Guided Transmission Media (Wires & Fiber) Wires – Coaxial Cable (“Co-ax”) Two concentric copper conductors It is more expensive than twisted pair. It has better shielding and more bandwidth for longer distances and higher rates than twisted pair. Commonly used for video, (cable TV), because it needs larger bandwidth. It is bidirectional, broadband (multiple channels on cable) Two types:  50-ohm: mainly used for digital transmission  75-ohm: mainly used for analog transmission (TV cable) – Now it is used for both digital and analog. 10 Guided Transmission Media (Wires & Fiber) Wires – Power Lines Household electrical wiring is another example of wires  Convenient to use, but horrible for sending data  Electricity is at 50-60Hz  Data is at much higher frequencies. 11 Guided Transmission Media (Wires & Fiber) Wires – Fiber Optics Cables Glass fiber carrying light pulses, each pulse a bit  pulse of light indicates a 1 bit and absence of light indicates a 0 bit Used for high-speed point-to-point transmission (e.g., 10’s-100’s Gpbs) It has a low error rate, therefore repeaters spaced far apart  Light is immune to electromagnetic noise Common for high data rates and long distances (backbone)  Long distance ISP links, and Fiber-to-the-Home (FttH)  Light carried in very long, thin strand of glass It has three key components: the light source, the transmission medium, and the detector (generates an electrical pulse when light falls on it.). Light source Light trapped by (LED, laser) Photodetector total internal reflection 12 Guided Transmission Media (Wires & Fiber) Wires – Fiber Optics Cables Single-mode  Core so narrow (10μm) light can’t even bounce around  Used with lasers for long distances, e.g., 100km Multi-mode  Core diameter is 50 μm  So, light can bounce; each ray above the critical incident is said to have a different mode  Used with LEDs for cheaper, shorter distance links 3 fibers in a cable 13 Network Topology How so many computers are connected together? Three various configurations, called topologies, have been used to administer LANs: 1. Bus topology: All nodes are connected to a single communication line that carries messages in both directions – Simple and low-cost – A single cable called a trunk (backbone, segment) – Only one computer can send messages at a time – Passive topology - computer only listen for, not regenerate data 14 Network Topology How so many computers are connected together? 2. Star topology: A configuration that centers around one node to which all others are connected and through which all messages are sent  Each computer has a cable connected to a single point  More cabling, hence higher cost  All transmission through the hub (switch); if down, entire network down  Depending on the intelligence of hub, two or more computers may send message at the same time 15 Network Topology How so many computers are connected together? 3. Ring topology: A configuration that connects all nodes in a closed loop on which messages travel in one direction  Every computer serves as a repeater to boost signals  Typical way to send data by Token passing: – only the computer who gets the token can send data  Disadvantages – If one computer fails, whole network fails – Difficult to add computers – More expensive 16 Network Hardware Network interface cards Network adapter Connects node to the media Unique Machine Access Code (MAC address)  It is a 6 bytes long 17 Network Hardware Network linking devices Connect nodes in the network Cable runs from node to device Crossover cable connects two computers together 18 Network Hardware Network linking devices Hub  Center of a star network  All nodes receive transmitted packets  Slow and insecure 19 Network Hardware Network linking devices Switches  Replacement for hubs  Only intended node receives the transmission  Fast and secure 20 Network Hardware Network linking devices Router  Connects two or more LANs together  Packets sent to the remote LAN will cross  Network is segmented by the IP addresses  Connect internal networks to the Internet  Need to be configured before installation 21 Network Hardware Network linking devices Gateway  Connects two dissimilar networks  Connects coax to twisted pair  Most gateways contained in other devices 22 Wireless Transmission Electromagnetic Spectrum » Radio Transmission » Microwave Transmission » Light Transmission » Wireless vs. Wires/Fiber » 23 Wireless Transmission Electromagnetic Spectrum Signal carried in electromagnetic spectrum The number of oscillations per second of a wave is called its frequency ( f ) and is measured in Hz The time between two consecutive maxima (or minima) is called the period, T in seconds (T=1/f). The distance between two consecutive maxima (or minima) is called the wavelength, λ (lambda) in meters. Electromagnetic waves travel at the speed of light c=3× 108 m/sec, 𝑐 The fundamental relation between f, λ, and c (in a vacuum) is: λ = c × 𝑇 = 𝑓 24 Wireless Transmission Electromagnetic Spectrum Microwave 25 Wireless Transmission Electromagnetic Spectrum Fortunately, there are also unlicensed Industrial, Scientific, and medical (ISM) bands:  Free for use at low power; devices manage interference  Widely used for networking; WiFi, Bluetooth, Zigbee, etc. 802.11 802.11a/g/n, ac b/g/n 26 Wireless Transmission Wireless access networks Shared wireless access network connects end system to router  via base station aka “access point” (AP) Wireless LANs:  within building (100 ft) to Internet  802.11g/n/ac (WiFi): 54/300/1000 Mbps transmission rate Wide-area wireless access  Provided by telecom (cellular) operator, 10’s km  between 1 and 100 Mbps and more  3G, 4G: LTE, 5G to Internet 27 Wireless Transmission Wireless vs. Wires/Fiber Wireless: + Easy and inexpensive to deploy + Naturally supports mobility + Naturally supports broadcast − Transmissions interfere and must be managed − Signal strengths hence data rates vary greatly Wires/Fiber: + Easy to engineer a fixed data rate over point-to-point links − Can be expensive to deploy, especially over distances − Doesn’t readily support mobility or broadcast 28 DIGITAL MODULATION AND MULTIPLEXING Digital Modulation It is the process of converting the data bits into signals Baseband transmission  The signal occupies frequencies from zero up to a maximum  It is common for wires. Passband transmission  Schemes that regulate the amplitude, phase, or frequency of a carrier signal to convey bits  The signal occupies a band of frequencies around the frequency of the carrier signal.  It is common for wireless and optical channels 29 DIGITAL MODULATION Baseband transmission NRZ (Non-Return-to-Zero)  Use a positive voltage to represent a 1 and a negative voltage to represent a 0  We can use more levels of voltages, then the symbol carry more bits (symbol rate = baud rate) Manchester encoding  It mixes the clock signal with the data signal by XORing them together  When the clock is XORed with the 0 level it makes a low-to-high transition → a logical 0.  When it is XORed with the 1 level it is inverted and makes a high-to-low transition → a logical 1. NRZI (Non-Return-to-Zero Inverted)  It is the same as NRZ but code the one as a transition and a zero as no transition (or the other way around) 30 DIGITAL MODULATION Baseband transmission Line codes: (a) Bits, (b) NRZ, (c) NRZI, (d) Manchester, (e) Bipolar or AMI (1: is alternating between +ve and –ve. 0: zero voltage). 31 DIGITAL MODULATION Baseband transmission 4B/5B coding scheme Introduced to limit the number of consecutive 0s or consecutive 1s. Every 4 bits is mapped into a 5-bit pattern with a fixed translation table Data (4B) Codeword (5B) Data (4B) Codeword (5B) 0000 11110 1000 10010 0001 01001 1001 10011 0010 10100 1010 10110 0011 10101 1011 10111 0100 01010 1100 11010 0101 01011 1101 11011 0110 01110 1110 11100 0111 01111 1111 11101 32 DIGITAL MODULATION Passband transmission Uses a range of frequencies that does not start at zero. For wireless channels, it is not practical to send very low frequency signals because the size of the antenna (λ/4) will be very large; λ=c/f Frequencies are governed by a regulating body Digital modulation is accomplished with passband transmission by modulating a carrier signal that sits in the passband We can modulate the carrier's amplitude, frequency, or phase  ASK (Amplitude Shift Keying), two different amplitudes are used to represent 0 and 1.  FSK (Frequency Shift Keying), two or more different frequencies are used.  PSK (Phase Shift Keying), the carrier wave is systematically shifted θ degrees at each symbol period. – If there are two phases, BPSK (Binary Phase Shift Keying). 33 DIGITAL MODULATION Passband transmission A binary signal. Amplitude shift keying. Frequency shift keying. Phase shift keying. 34 MULTIPLEXING Time Division Multiplexing (TDM) Users take turns (in a round-robin fashion), each one periodically getting the entire bandwidth for a little burst of time. Time Division Multiplexing (TDM). 35 MULTIPLEXING Code Division Multiple Access (CDMA) Allowing multiple signals from different users to share the same frequency band all the time  Users are separated by unique codes  In CDMA, each bit time is subdivided into m short intervals called chips. (a) Chip sequences for four stations. (b) Signals the sequences represent (c) Six examples of transmissions. (d) Recovery of station C's signal. 36 The Public Switched Telephone Network Local loop: Digital Subscriber Lines DSL broadband sends data over the local loop to the local office using frequencies that are not used for POTS It uses existing telephone line to central office DSLAM (DSL Access Multiplexer)  Data over DSL phone line goes to Internet and voice goes to telephone network  < 2.5 Mbps upstream transmission rate (typically < 1 Mbps)  < 24 Mbps downstream transmission rate (typically < 10 Mbps)  OFDM is used up to 1.1 MHz for ADSL2 central office telephone network DSL splitter modem DSLAM ISP voice, data transmitted at different frequencies over DSL access dedicated line to central office multiplexer 37 The Public Switched Telephone Network Local loop: Fiber-To-The-Home (FTTH) FTTH broadband relies on deployment of fiber optic cables to provide high data rates to customers  One wavelength can be shared among many houses  Fiber is passive (no amplifiers, etc.)  Up to 100Mbps 38 Cable Television Internet over Cable Internet over cable reuses the cable television plant Data is sent on the shared cable tree from the head-end, not on a dedicated line per subscriber (like DSL) Frequency Division Multiplexing (FDM): different channels transmitted in different frequency bands cable headend … cable splitter cable modem modem CMTS termination system data, TV transmitted at different frequencies over shared cable distribution network ISP C O V V V V V V N I I I I I I D D T D D D D D D A A R E E E E E E T T O O O O O O O A A L 1 2 3 4 5 6 7 8 9 Channels 39 Home network wireless devices to/from headend or central office often combined in single box cable or DSL modem wireless access router, firewall, NAT point (54 Mbps) wired Ethernet (100 Mbps) 40 Enterprise access networks: (Ethernet) Typically used in companies, universities, etc 10 Mbps, 100Mbps, 1Gbps, 10Gbps transmission rates today, end systems typically connect into Ethernet switch institutional link to ISP (Internet) institutional router Ethernet institutional mail, switch web servers 41 Physical media Host: sends packets of data host sending function:  takes application message  breaks into smaller chunks, known as packets, of length L bits  transmits packet into access network at transmission rate R – link transmission rate, aka link capacity, aka link bandwidth two packets, L bits each 2 1 R: link transmission rate host packet time needed to L (bits) transmission = transmit L-bit = R (bits/sec) delay packet into link 42 Physical media Packet-switching: store-and-forward takes L/R seconds to transmit (push out) L-bit packet into link at R bps store and forward: entire packet must arrive at router before it can be transmitted on next link end-end delay = 2L/R (assuming zero propagation delay)  one-hop numerical example: – L = 7.5 Mbits – R = 1.5 Mbps – one-hop transmission delay = 5 sec L bits per packet 3 2 1 source destination R bps R bps 43 Physical media Packet-switching: queueing delay, loss If arrival rate (in bits) to link exceeds transmission rate of link for a period of time:  packets will queue, wait to be transmitted on link  packets can be dropped (lost) if memory (buffer) fills up R = 100 Mb/s C A D R = 1.5 Mb/s B queue of packets E waiting for output link 44 Network-core functions Two key network-core functions routing: determines forwarding: move packets from source-destination route router’s input to appropriate router taken by packets output  routing algorithms routing algorithm local forwarding table header value output link 0100 3 1 0101 2 0111 2 3 2 1001 1 dest address in arriving packet’s header 45 Network-core functions Alternative core: circuit switching end-end resources allocated to, reserved for “call” between source & destination:  In diagram, each link has four circuits. – call gets 2nd circuit in top link and 1st circuit in right link.  dedicated resources: no sharing – circuit-like (guaranteed) performance  circuit segment idle if not used by call (no sharing)  Commonly used in traditional telephone networks 46 Network-core functions Alternative core: circuit switching FDM versus TDM: Example: FDM 4 users frequency time TDM frequency time 47 Circuit vs Packet Switching Switching Circuit switching requires call setup (connection) before data flows smoothly  Also, teardown at end (not shown) Packet switching treats messages independently  No setup, but variable queuing delay at routers Circuits Packets 48 Circuit vs Packet Switching packet switching allows more users to use network! example:  1 Mb/s link  each user: – 100 kb/s when “active” – active 10% of time N users circuit-switching: 1 Mbps link 10 users packet switching: with 35 users, probability to have more than 10 active users at same time is less than 0.0004 49 Circuit vs Packet Switching is packet switching a “slam dunk winner?” great for bursty data resource sharing simpler, no call setup excessive congestion possible: packet delay and loss protocols needed for reliable data transfer, congestion control Q: How to provide circuit-like behavior? bandwidth guarantees needed for audio/video apps 50 Delay, Loss, Throughput in networks How do loss and delay occur? packets queue in router buffers ❖ packet arrival rate to link (temporarily) exceeds output link capacity ❖ packets queue, wait for turn packet being transmitted (delay) A B packets queueing (delay) free (available) buffers: arriving packets dropped (loss) if no free buffers 51 Delay, Loss, Throughput in networks Four sources of packet delay transmission A propagation B nodal processing queueing dnodal = dproc + dqueue + dtrans + dprop dproc: nodal processing dqueue: queueing delay ▪ check bit errors ▪ time waiting at output link for ▪ determine output link transmission ▪ typically < msec ▪ depends on congestion level of router 52 Delay, Loss, Throughput in networks Four sources of packet delay transmission A propagation B nodal processing queueing dnodal = dproc + dqueue + dtrans + dprop dtrans: transmission delay: dprop: propagation delay: ▪ L: packet length (bits) ▪ d: length of physical link ▪ R: link bandwidth (bps) ▪ s: propagation speed in medium ▪ dtrans = L/R (~2x108 m/sec) dtrans and dprop ▪ dprop = d/s very different 53 Delay, Loss, Throughput in networks Queueing delay average queueing ❖ R: link bandwidth (bps) delay ❖ L: packet length (bits) ❖ a: average packet arrival rate traffic intensity = La/R ❖ La/R ~ 0: avg. queueing delay small La/R ~ 0 ❖ La/R → 1: avg. queueing delay increases ❖ La/R > 1: more “work” arriving than can be serviced, average delay infinite! La/R -> 1 54 Delay, Loss, Throughput in networks “Real” Internet delays and routes what do “real” Internet delay & loss look like? traceroute program provides delay measurement from source to router along end-end Internet path towards destination. For all i: sends three packets that will reach router i on path towards destination router i will return packets to sender sender times interval between transmission and reply. 3 probes 3 probes 3 probes 55 Delay, Loss, Throughput in networks “Real” Internet delays and routes traceroute: gaia.cs.umass.edu to www.eurecom.fr 3 delay measurements from gaia.cs.umass.edu to cs-gw.cs.umass.edu 1 cs-gw (128.119.240.254) 1 ms 1 ms 2 ms 2 border1-rt-fa5-1-0.gw.umass.edu (128.119.3.145) 1 ms 1 ms 2 ms 3 cht-vbns.gw.umass.edu (128.119.3.130) 6 ms 5 ms 5 ms 4 jn1-at1-0-0-19.wor.vbns.net (204.147.132.129) 16 ms 11 ms 13 ms 5 jn1-so7-0-0-0.wae.vbns.net (204.147.136.136) 21 ms 18 ms 18 ms 6 abilene-vbns.abilene.ucaid.edu (198.32.11.9) 22 ms 18 ms 22 ms 7 nycm-wash.abilene.ucaid.edu (198.32.8.46) 22 ms 22 ms 22 ms trans-oceanic 8 62.40.103.253 (62.40.103.253) 104 ms 109 ms 106 ms 9 de2-1.de1.de.geant.net (62.40.96.129) 109 ms 102 ms 104 ms link 10 de.fr1.fr.geant.net (62.40.96.50) 113 ms 121 ms 114 ms 11 renater-gw.fr1.fr.geant.net (62.40.103.54) 112 ms 114 ms 112 ms 12 nio-n2.cssi.renater.fr (193.51.206.13) 111 ms 114 ms 116 ms 13 nice.cssi.renater.fr (195.220.98.102) 123 ms 125 ms 124 ms 14 r3t2-nice.cssi.renater.fr (195.220.98.110) 126 ms 126 ms 124 ms 15 eurecom-valbonne.r3t2.ft.net (193.48.50.54) 135 ms 128 ms 133 ms 16 194.214.211.25 (194.214.211.25) 126 ms 128 ms 126 ms 17 * * * 18 * * * * means no response (probe lost, router not replying) 19 fantasia.eurecom.fr (193.55.113.142) 132 ms 128 ms 136 ms 56 Delay, Loss, Throughput in networks Exercise:  To run traceroute on Windows:  Open the command prompt. Go to Start > Run....  In the command prompt, type: tracert hostname.... C:\>tracert google.com Tracing route to google.com [172.217.0.174] over a maximum of 30 hops: 1

Use Quizgecko on...
Browser
Browser