程序代写代做代考 html clock dns DHCP Networks, Security, and Privacy 158.235

Networks, Security, and Privacy 158.235
Dr Hooman Alavizadeh Massey University
1

Physical Layer
Reading: Chapter 3 in the prescribed textbook
2

Physical Layer
• Layer 1 in the Internet model
• Focus on transmission over circuits
• Types of Circuits
– Physical circuits connect devices & include wires
– Logical circuits refer to the transmission characteristics of the circuit
– Physical and logical circuits may be the same or different. For example, in multiplexing, one physical wire may carry several logical circuits.
Internet Model
Application Transport Network Data Link Physical
3

Outline
• Media
• Digital Transmission of Digital Data • Analog Transmission of Digital Data • Digital Transmission of Analog Data
4

Media
• Physical matter that carries (the voice or data) transmission
• Guided media:
• Transmission flows along a physical guide
• e.g. twisted pair, coaxial cable and fiber optic cable
• Wireless media (radiated media)
• the transmission flows through the air or space
• e.g. Examples radio such as microwave and satellite
5

Guided Media
• Twisted-pair (TP) cable
– Insulated pairs of wires bundled together
– Wires twisted to reduce electromagnetic interference – Some times use additional shielding (STP)
– Commonly used for telephones, LANs
– Characteristics
• Price – inexpensive
• Distance – typically up to 100m • Use – Telephones, LANs
6

Guided Media
• Coaxial cable
– Has a single copper core, plus outer insulation, shielding, and inner insulation
– Less prone to interference – Characteristics
• Price – inexpensive (but more costly than TP)
• Distance – up to 2 km (1.2 miles)
• Use: Cable TV / Internet
7

Guided Media
• Fiber optic cable
– Optical core made of glass or
plastic
– Data transmitted using light from lasers or LEDs
– Resistant to interference and corrosion
– Extremely fast data rates
– Characteristics
• Price: Expensive
• Distance: 500m – 100km
• Use: Trunk line / Backbone, long distance circuits (e.g., undersea cables)
8

Wireless Media
• Radio
– Wireless transmission of electrical waves through
air
– Each device on network has a radio transceiver operating at a specific frequency range
– Enables mobile network communication – Characteristics
• Distance: depends on frequency and power
• Use: Wireless LANs, cellular and cordless phones, baby monitors
9

Wireless Media
• Microwave
– High-frequencyradio
– Requires line of sight which may require large antennas and towers
– Affected by weather
– Characteristics
• Distance: ~60 km (due to curvature of earth
• Use: Trunk line / Backbone, long distance
• Satellite
– Special form of microwave
– Long distance leads to propagation delays
communication
communication
10

Factors Used in Media Selection
• Type of network
– LAN, WAN, or Backbone
• Cost
– Always changing; depends on the distance
• Transmission distance
– Short: up to 300 m; medium: up to 500 m
• Security
– Wireless media is less secure
• Error rates
– Wireless media has the highest error rate (interference)
• Transmission speeds
– Constantly improving; Fiber has the highest
11

Media Summary
12

Outline
• Media
• Digital Transmission of Digital Data • Analog Transmission of Digital Data • Digital Transmission of Analog Data
13

Types of Data Transmitted
• Analog data
– Produced by telephones
– Sound waves, which vary continuously over time, analogous to one’s voice
– Can take on any value in a wide range of possibilities
• Digital data
– Produced by computers, in binary form
– Information is represented as code in a series of ones and zeros
– All digital data is either on or off, 0 or 1
14

Types of Transmission
• Analog-Analog transmissions
– Analog data transmitted in analog form
– Examples of analog data being sent using analog transmissions are broadcast TV and radio
• Digital-Digital transmissions
– Computer networks send digital data using digital transmissions
• Analog→Digital Transmissions
– Modem (modulator/demodulator): used when digital data is sent
as an analog transmission
– Codec (coder/decoder): used when analog data is sent via digital transmission
15

Data Type vs. Transmission Type
Analog Transmission
Digital Transmission
Analog Data
AM and FM Radio, Broadcast TV
Pulse code modulation.
MP3, CDs, iPOD, VoIP
Digital Data
Modems – sending email from your house using telephone line
Data transmitted as ASCII/EBCDIC over Ethernet LANs, printer
16

Digital Data-Digital Transmission
• Coding scheme needed to ensure sender and receiver understand messages (e.g., ASCII, Unicode, etc.)
• A character is represented by a group of bits
17

Digital Transmission of Digital Data
• Sender and receiver must agree upon: – Set of symbols
• How bits are encoded as voltages or light pulses
• e.g., +5V might be encodes as a “1” – Symbol rate
• How many symbols are sent per second
• e.g., with a symbol sent at every clock cycle. 64 kilohertz (kHz) = 64,000 symbols/sec
18

Digital Transmission of Digital Data
• Five types of signaling techniques
1. Unipolar – voltage is 0 or positive representing binary bits (in some circuits, 0 and negative voltage could be used)
19

Digital Transmission of Digital Data
• Five types of signaling techniques
2. Bipolar NRZ – voltage is positive or negative,
but not zero
• Fewer errors than unipolar because signals are more distinct
20

Digital Transmission of Digital Data
• Five types of signaling techniques
3. Bipolar RZ – voltage is positive or negative,
returning to zero between each bit
• Fewer synchronization errors than bipolar NRZ
21

Digital Transmission of Digital Data
• Five types of signaling techniques
4. Bipolar AMI – voltage is 0, positive, or negative, returns to zero between each bit, and alternates between positive and negative voltage
22

Digital Transmission of Digital Data
• Five types of signaling techniques
5. Manchester – voltage is positive or negative and
bits are indicated by a mid-bit transition
Ethernet uses it – less susceptible to bit errors to going unnoticed
23

Outline
• Media
• Digital Transmission of Digital Data • Analog Transmission of Digital Data • Digital Transmission of Analog Data
24

Analog Transmission of Digital Data
• Telephone system built for analog data
– Electrical signals mimic sound waves (i.e., voice)
– Analog transmissions take on range of values (vs. discrete values of digital transmissions)
– Need a modem (modulator/demodulator) to convert from analog to digital and vice versa
25

Analog Transmission of Digital Data
• Three characteristics of waves
1. 2.
3.

Amplitude: height of wave (decibels) Frequency: waves per second (hertz)
Wavelength is the inverse of frequency Phase: wave direction (degrees) or the point at which the wave begins
26

Analog Transmission of Digital Data
• Carrier wave is basic wave transmitted through a circuit
• Modulation is the modification of a carrier wave’s fundamental characteristics in order to encode information
• Three ways to modulate a carrier wave:
1. Amplitude Modulation (AM) or Amplitude Shift Keying (ASK)
2. Frequency Modulation (FM) or Frequency Shift Keying (FSK)
3. Phase Modulation (PM) or Phase Shift Keying (PSK)
27

Analog Transmission of Digital Data
• Amplitude Modulation
• Frequency Modulation
• Phase Modulation
28

Analog Transmission of Digital Data
• Symbol: One or more modifications to a carrier wave used to encode data
• Can send 1 bit by defining two different symbols (e.g., amplitudes, frequencies, etc.)
• Can send multiple bits by defining more than two symbols
– Need more complicated information coding schemes – 1 bit of information→2 symbols
– 2 bits of information→4 symbols
– 3 bits of information→8 symbols
– n bits of information→2n symbols
29

Analog Transmission of Digital Data
• Two-bit Amplitude Modulation
– With 4 levels of amplitude defined as symbols, 2 bits can be transmitted per symbol
30

Analog Transmission of Digital Data
• Data rate (or bit rate) is the number of bits transmitted per second
• Symbol rate: number of symbols transmitted per second
Data rate = symbol rate × (# bits/symbol)
• Example
Symbol rate = 16,000 symbols/sec #bits/symbol = 4 bits/symbol
Data rate = 16,000 symbols/sec × 4 bits/symbol = 64,000 bits/sec = 64Kbps
31

Outline
• Media
• Digital Transmission of Digital Data • Analog Transmission of Digital Data • Digital Transmission of Analog Data
32

Digital Transmission of Analog Data
33

Digital Transmission of Analog Data
• Codecs (COde, DECode) is a device or software that converts an analog signal (e.g., voice) into digital form and the reverse
• Pulse-CodeModulation(PCM)convertsanalog
to digital by:
1. Sampling the analog signal at regular intervals
2. Measuring the amplitude of each sample
3. Encoding (quantizing) the amplitude as binary data
34

PAM – Measuring Signal
• Sample analog waveform across time and measure amplitude of signal
• In this example, quantize the samples using only 8 pulse amplitudes or levels for simplicity
• Our 8 levels or amplitudes can be depicted digitally by using 0’s and 1’s in a 3-bit code, yielding 23 possible amplitudes
35

PAM – Encoding and Sampling
000 – PAM Level 1 001 – PAM Level 2 010 – PAM Level 3 011 – PAM Level 4 100 – PAM Level 5 101 – PAM Level 6 110 – PAM Level 7 111 – PAM Level 8
111 110 011……
………… 111 …..
• For digitizing a voice signal, it is typically 8,000 samples per second and 8 bits per sample
• 8,000 samples x 8 bits per sample → 64,000 bps transmission rate needed
• 8,000 samples then transmitted as a serial stream of 0s and 1s
36

Quantizing Errors
• Quantizing Error is the difference between the original analog signal and the approximated, digital signal.
• Illustration of Quantizing Error
https://dspillustrations.com/pages/posts/misc/how-does- quantization-noise-sound.html
37

Minimize Quantizing Errors
• Increase number of amplitude levels
– Difference between levels minimized → smoother signal
– Requiresmorebitstorepresentlevels→moredatato transmit
– Adequatehumanvoice: 7bits→128levels
– Music: at least 16 bits→65,536 levels
• Sample more frequently
– Will reduce the length of each step → smoother signal
– Adequate Voice signal: twice the highest possible frequency (4Khz x 2 = 8000 samples / second)
– RealNetworks: 48,000 samples / second
38

Putting all together!
39

A day in the life: scenario
browser
DNS server
Comcast network 68.80.0.0/13
school network 68.80.2.0/24
web page
web server 64.233.169.105
Google’s network 64.233.160.0/19
40

A day in the life… connecting to the Internet
DHCP
DHCP
❖ connecting laptop needs to get its own IP address, addr of first-hop router, addr of DNS server: use DHCP
❖ DHCP request encapsulated in UDP, encapsulated in IP, encapsulated in 802.3 Ethernet
❖ Ethernet frame broadcast (dest: FFFFFFFFFFFF) on LAN, received at router running DHCP server
❖ Ethernet demuxed to IP demuxed, UDP demuxed to DHCP
UDP
DHCP
IP
DHCP
Eth
DHCP
Phy
DHCP
DHCP
DHCP
UDP
DHCP
IP
DHCP
Eth
router
(runs DHCP)
DHCP
Phy
41

A day in the life… connecting to the Internet
DHCP
DHCP
UDP
DHCP
IP
DHCP
Eth
DHCP
Phy
DHCP
DHCP
UDP
DHCP
IP
DHCP
Eth
router
(runs DHCP)
❖ DHCP server formulates DHCP ACK containing client’s IP address, IP address of first-hop router for client, name & IP address of DNS server
❖ encapsulation at DHCP server, frame forwarded (switch learning) through LAN, demultiplexing at client
❖ DHCP client receives DHCP ACK reply
DHCP
Phy
DHCP
Client now has IP address, knows name & addr of DNS server, IP address of its first-hop router
42

A day in the life… ARP (before DNS, before HTTP)
DNS
DNS
❖ before sending HTTP request, need
IP address of www.google.com:
DNS
❖ DNS query created, encapsulated in UDP, encapsulated in IP, encapsulated in Eth. To send frame to router, need MAC address of router interface: ARP
❖ ARP query broadcast, received by router, which replies with ARP reply giving MAC address of router interface
❖ client now knows MAC address of first hop router, so can now send frame containing DNS query 43
UDP
DNS
ARPIP Eth
DNS
ARP query
Phy
ARP
Eth
ARP reply
Phy
router
(runs DHCP)

A day in the life… using DNS
DNS server
DNS
DNS
DNS
Eth
DNS
UDP
DNS
Phy
DNS
IP
DNS
Eth
DNS
Phy
DNS
Comcast network 68.80.0.0/13
❖ IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
router
(runs DHCP)
❖ IP datagram forwarded from campus network into comcast network, routed (tables created by RIP, OSPF, IS-IS and/or BGP routing protocols) to DNS server
❖ demux’ed to DNS server
❖ DNS server replies to client with IP address of www.google.com
DNS
DNS
UDP
IP
44

A day in the life…TCP connection carrying HTTP
HTTP
HTTP
TCP
SYSNYANCK
IP
SYSNYANCK
Eth
SYSNYANCK
Phy
router
(runs DHCP)
❖ to send HTTP request, client initiate TCP handshake protocol
❖ TCP SYN segment (step 1 in 3-way handshake) inter- domain routed to web server
❖ web server responds with TCP SYNACK (step 2 in 3- way handshake)
❖ TCP connection established! 45
TCP
IP
Eth
Phy
SYSNYANCK
SYSNYANCK
SYSNYANCK
web server 64.233.169.105

HTTP HTTP
A day in the life… HTTP request/reply
❖ web page finally (!!!) displayed
❖ HTTP request sent into TCP socket
❖ IP datagram containing HTTP request routed to www.google.com
❖ web server responds with HTTP reply (containing web page)
❖ IP datagram containing HTTP reply routed back to client
HTTP
TCP
HTTP HTTP
IP
HTTP
Eth
HTTP
Phy
HTTP
router
(runs DHCP)
HTTP
TCP
HTTP
IP
HTTP
Eth
HTTP
Phy
web server 64.233.169.105
46

END
47