Vous êtes sur la page 1sur 10

1

Overview of Computer Science Overview of Computer Science Overview of Computer Science Overview of Computer Science
CSC 101 CSC 101 Summer Summer 2011 2011
Data Communications Data Communications
LAN d WAN LAN d WAN
Lecture 19 Lecture 19 August August 1, 2011 1, 2011
LANs and WANs LANs and WANs
Announcements Announcements
Final Exam next Tuesday (8/9/11).
This Room 2pm 5pm
Final Review on Monday 8/8/11
2
y
Quiz #3 (?) on Friday Lectures 19 22
Lab #7 Tomorrow
Prelaband Lab-Report is online
WA#7 due Tomorrow @ 5pm
WA#8 due Thursday 8/4/11 @ 5pm
Objectives Objectives
Data communications systems
Data encoding, transmission and error checking
Interconnectionof computers: datanetworks
3
Interconnection of computers: data networks
Classification of data networks
LAN Topologies
2
Information Exchange Information Exchange
Two ways to think about exchanging information
Broadcasting one-to-many, one-way communication (asymmetric)
Radio andtelevision
Print media magazines, newspapers, etc.
Bulk messages(e.g. spamemail)
TheWeb(publishedWebpages)
4
Networking one-to-one, two-way communication (symmetric)
Telephone
Postal mail
Email, IM, texting
Computer resourcesharing(disks, printers, P2P filesharing, etc.)
TheWeb(interactiveor dynamic Webpages), Gchat, FacebookChat
Information Exchange Information Exchange
Data communication systems exist to exchange
information between two agents
Claude Shannon developed a
5
p
general model for information
exchange (1948)
A simple yet fundamental way of
looking at data communication
Six basic components of all communications systems
Shannons Data Communication Model Shannons Data Communication Model
The six components of a data communications
system:
6
3
Shannons Data Communication Model Shannons Data Communication Model
1. An information source generates
a message
2. A transmitter encodes the message
as some kind of signal
7
g
3. The signal is transmitted over a
communications channel
Somemediumthat bridges thedistancebetween transmitter and receiver
4. A receiver extracts the signal fromthe communications channel
and decodes it back into a message
5. The destination receives the message
6. Some noise source is usually present in the channel
A randomelement that affects thesignal in unpredictableways
The six components of information transfer
apply, even to very low-tech messages
Shannons Data Communication Model Shannons Data Communication Model
8
as well as messages that use advanced,
digital technologies
Data Encoding Data Encoding
Messages in digital communications systems are encoded as a
streamof bits (0s and 1s)
Computer files already exist as binary data
Other information can bedigitized as it is being sent
Thesebitscanbetransmittedassometypeof energy
9
These bits can be transmitted as some type of energy
Sound (modem)
Electricity (Ethernet)
Light (fiber-optic cables)
Radio waves (wireless)
Etc.
All of these forms of energy are analog phenomena
Yet they can carry digital information
The physical properties of the communications channel determine
the maximumdata transfer rate (maximumbandwidth)
4
Transmitting the Signal Transmitting the Signal
Digital data may be transmitted as analog signals
Analog signals are composed of waves
Repeating waveforms aremodulated (altered) to encodeinformation
Amplitudemodulation (AM) and frequency modulation (FM) arecommon
10
Digital data must be translated into modulated analog signals for
transmission over many types of media
Sound, electrical signals, radio waves areanalog phenomena
Even so, they can carry digital dataas an analog signal
The analog signal must be translated back into digital data at the
receiver
A modem (modulator/demodulator) is a device that performs
these translations
Modulating Digital Data Modulating Digital Data
With amplitude modulation (AM), the amplitude
(loudness) of the signal is increased to
represent a binary 1
11
Modulating Digital Data Modulating Digital Data
With frequency modulation (FM), the frequency
(pitch) of the signal is increased to represent a
binary 1
12
5
Data Encoding and Error Checking Data Encoding and Error Checking
ASCII (American Standard Codefor Information Interchange) was
designed for text communications
A way to digitizetext datausing abinary codefor each letter or character
Need to ensurethat thecorrect character is received
13
Error checking can accommodate communication noise
Minor errors in transmission can changethemessage
To be able to identify errors in ASCII data:
8 binary bits used to represent each text character
An extraparity bit is often used to detect transmission errors
8 databits +1 parity bit =9 bits (1 byte+1 extrabit) per character
Parity Bit Error Detection Parity Bit Error Detection
Sending systemsets the parity bit
Two types of parity error detection
Odd parity error detection
Transmitter sets theparity bit so that thetotal number
of 1 bitsintheb teisanoddn mber
14
of 1 bits in thebyteis an oddnumber
Even parity error detection
Theparity bit is set to makethetotal number
of 1 bits an evennumber
Receiver checks the parity
If the total number of 1 bits in the byte is not correct
(odd or even), this indicates an error, and the byte is discarded
Parity Bit Error Detection Parity Bit Error Detection
Data in an 8-bit byte with parity
Eight bits of encoded data
Ninth bit (the parity bit) provides error checking
15
Par i t y Bi t
8-bi t ASCI I c ode
6
Example:
The ASCII code for N is 01001110 01001110
In odd parity, what should the parity bit be?
Parity Bit Error Detection Parity Bit Error Detection
16
It should be set to 11 to make an odd number of 11s
8-bi t ASCI I c ode
Par i t y Bi t
11 11 11 11 11 00 00 00 00
Parity Bit Error Detection Parity Bit Error Detection
If one bit is in error, the parity bit disagrees and
the error is detected
Oddparity, but an evennumber of 11 bits
Thisbytemust beinerror!
17
This byte must be in error!
(But, this does not provide a way to correct the error)
8-bi t ASCI I c ode
Par i t y Bi t
11 11 11 11 11 00 00 00 00 11 11 00 11 00 00 00 00
Di sc ar d
t hi s byt e!
Di sc ar d
t hi s byt e!
Parity Bit Error Detection Parity Bit Error Detection
If there are two single-bit errors, the parity bit
cannot detect the error
Oddparity, but still an oddnumber of 11 bits
18
data appears to be valid, even though it is not
8-bi t ASCI I c ode
Par i t y Bi t
11 11 11 11 11 00 00 00 00 11 11 00 11 11 00 00 00
7
Checksum Checksum
Parity works well to find single-bit errors
Parity cant detect two-bit errors, but thesearevery uncommon
Almost all errors aresingle-bit errors, so parity works well as a
first-line error detection method
19
Higher-level error detection methods include calculating the
checksum of a data packet
Sender: Add together thenumerical values of all thebytes in the
packet and includethat checksumwith thepacket when its sent
Receiver: Add together thenumerical values of all thebytes in the
received packet and compareit to thechecksumsent by thesender
If they aredifferent, therewas an error; receiver requests a resend
Bandwidth Bandwidth
The bandwidth of a communication channel is its
capacity to transmit data
Analogous to pipe sizes in plumbing
A l i l i lt l t i diff t
20
An analog signal may simultaneously contain different
waveforms of various frequencies
Each waveformcarries some information
The number of frequencies simultaneously supported by
a channel determines its overall bandwidth
Similar to the radio dial many stations simultaneously
broadcasting, each at a different frequency
Types of Data Networks Types of Data Networks
There are many ways to connect devices
The word network implies many different connections and
types of connections
Datacommunicationnetworkscanbeclassifiedbytheir
21
Data communication networks can be classified by their
various properties
Scope or expanse covered by the network
Type of medium used for transmission of signals
Type of switching performed to route the signal
8
Networks Classified by Networks Classified by Scope Scope
LAN (Local-Area Network)
Small geographical area fromaroomup to afew buildings
WAN (Wide-Area Network)
May span across states, nationwide, even worldwide
Oftenservesasingleorganization actinglikeasinglenetwork
22
Often serves asingleorganization, acting likeasinglenetwork
MAN (Metropolitan-Area Network)
Medium-sized, such as acity, campus, or multiplesites of asingleinstitution
PAN (Personal-Area Network)
Up to afew meters in size, usually onepersons devices
An internet
An interconnection of autonomous networks
Thelargest of all internets is the Internet
Basic Characteristics of LANs Basic Characteristics of LANs
A local area network (LAN) provides:
Computer connectivity with 2-way communication
Between servers and nodes or between individual nodes
h i
23
Resource sharing
Servers provide resources to other nodes
Files, backups, softwarelicenses, security validation, printing, etc.
A server might beacomputer or just astand-aloneperipheral
Transparency of use
LANs are designed to be almost plug-and-play
Remotely shared resources often appear as virtual local
resources
Networks Classified by Networks Classified by Medium Medium
Wired media
Specific, physical connections
Copper wire
Coaxial cable
24
Coaxial cable
Optical fiber cable
Wireless networking
Connections can come and go
Infrared waves (IR)
Radio frequency waves (RF)
Sometimes called Wi-Fi
Includes wireless now deployed on campus
9
Transmission Media Transmission Media
Wired media
Twisted-pair cable (copper wires)
Limited to about 100 meters max
25
Optical fiber cable
Pulses of laser light over very thin glass strands
One cable can connect up to 25 miles or more
Low error rates and very high data bandwidth (up to Tbps)
Transmission Media Transmission Media
Wireless networking Wi-Fi
Radio frequency (RF) connection
to an access point
Speedsof upto54Mbpsarecommon(80211g) Speeds of up to 54 Mbps are common (802.11g)
100 Mbps is becoming widely available(802.11n)
Limited range
Tens to hundreds of feet
Reduced by walls or other obstructions
Possibleinterferencefromportablephones, microwaveovens,
etc.
Transmission Media Transmission Media
Wireless networking Wi-Fi
Public hotspots are common
All WFU buildings and some outdoor areas (WFUvisitor)
Publicareassuchas4thSt indowntownWinston-Salem Public areas such as 4th St. in downtown Winston Salem
(free)
Other public or commercial locations (free or pay)
Private access points
All buildings and some outdoor campus areas (WFUstudent)
Businesses, etc., that use wireless networking
Personal (in-home) wireless
Security issues must be considered
10
Transmission Media Transmission Media
Wireless networking cellular
Blackberry; cellular modem; 3G and 4G phones
Long range Wireless connectivity
Goodcoverageinmost populatedareas dependingonprovider Good coveragein most populated areas, depending on provider
Currently ~110 Mbps
Transmission Media Transmission Media
Wireless networking
Bluetooth
Short range personal area network
Computer peripherals
C ll h d i l h d t
29
Cell phoneand music player headsets
Automobiledashboards
Homenetworking (gaming and entertainment)
Etc.
1-2 Mbps
Transmission Media Transmission Media
Wireless networking
IR (infrared)
Like television remote controls
Requires line-of-sight
30
q g
Works well only within enclosed spaces
Sometimes used for simple
networking tasks (beaming)
Laptop-to-PDA (e.g. PalmPilot)
PDA-to-printer
Digital camerauploads
Etc.
115 Kbps (slow!)