Network2

advertisement
Chapter 2 Different Modes
of Data Transmission
2.1
2.2
2.3
2.4
2.5
2.6
Bandwidth
Serial and Parallel Transmissions
Simplex and Duplex
Multiplexing
Concept of Packets
Access Methods
Chapter 2 Data Transmission
2.1 Bandwidth
 Bandwidth of a channel
is the maximum data transmitted per second
indicate the capacity of the channel
has unit
bps (bits per second).
Kbps, Mbps, or Gbps
 Note:
bandwidth is not the physical speed of signal movement
it does not measure how long it takes for data to travel from
one point to the other.
Chapter 2 Data Transmission
2.2 Serial and Parallel Transmissions
 Two modes of transmission:
parallel
several lines for several bits to move simultaneously
serial
a single line only
bits move one after the other
Chapter 2 Data Transmission
2.2 Serial and Parallel Transmissions
Chapter 2 Data Transmission
2.2.1 Comparing Serial and Parallel
 Under identical conditions,
parallel transmission is faster, because
more channels are used
 (This explains why
multiple parallel lines are found on printed circuit boards)
 Disadvantages of parallel transmission:
very thick cables
high cost
difficult to install
 Therefore, data transmission in networking media is mainly serial.
 Note:
modern technology has increased the rate of transmission over serial
cable.
Chapter 2 Data Transmission
2.2.2 Serial and Parallel Conversion
 Why conversion is needed?
Transmission inside the computer is parallel, but is serial
outside.
 How?
Done by Network Interface Card (NIC)
which converts between
• parallel data streams from the CPU, and
• serial data along the cables
Chapter 2 Data Transmission
2.2.2 Serial and Parallel Conversion
Chapter 2 Data Transmission
2.2.2 Serial and Parallel Conversion
Chapter 2 Data Transmission
2.3 Simplex and Duplex
 Simplex
one way data flow
e.g. TV broadcast.
 Duplex
bi-directional data transmission
 half-duplex
transmission in one direction at a time
When A is sending data, B has to
wait until the transmission is over.
e.g. walkie-talkies, hubs
 full-duplex
two-way transmission at the same time
e.g. telephone, switches
Chapter 2 Data Transmission
2.4 Multiplexing (1/2)
 Multiplexing
means using a single line to carry signals from several devices
e.g. You may surf the Web, while speaking over the phone – both
use the same phone line (DSL broadband).
by interleaving the signals
Chapter 2 Data Transmission
2.4 Multiplexing (2/2)
 Multiplexing (cont’)
allows better use of the bandwidth of a channel
Typical examples
mobile phone systems, cable TV and DSL broadband
requires the bandwidth of the shared channel several times
higher than the transmission rate of individual device
 De-multiplexing
interleaved signals are sent to the corresponding receivers
Chapter 2 Data Transmission
2.5 Concept of Packets
 Almost all networks break messages into smaller pieces of
data before transmission takes place.
 Packets (or frames)
are fundamental units of information carriage in a computer
network.
Chapter 2 Data Transmission
2.5.1 Reasons for Using Packets
 1. Avoid monopolisation
Packets from different nodes can be interleaved
 2. Even load distribution between lines
Packets may use different paths
 3. Avoiding complete failure
Packets may be routed round the problem
 4. Easier error recovery
Only packets with errors need re-transmission
Chapter 2 Data Transmission
2.5.2 Packet-switching
 Packet-switching
involves packets
may use different paths
involves routers
which directs the packets
is designed to make full use of bandwidth
is adopted by WANs and the Internet
 Circuit-switching
a path is established between the sender and receiver until
communication is over
is used in traditional phone connection
the available bandwidth is not fully utilised
Chapter 2 Data Transmission
2.5.3 Packet Structure (1/2)
 Each packet must carry
data content
addresses
sender address
• for acknowledge receipt of
data
• for re-transmission
receiver address
• for delivery
Chapter 2 Data Transmission
2.5.3 Packet Structure (2/2)
 Each packet must carry (cont’)
control information
sequencing
• for re-assembling
– because packets may arrive out of order
error-control
• for detecting or correcting errors
time-to-live (TTL)
• for avoiding undelivered packets to move forever.
Chapter 2 Data Transmission
2.5.4 Packets Creation and Receive
 The NIC
creates outgoing packets
adds MAC addresses
• of its own and the receiver
sends the packet onto the networking medium.
examines incoming packets
accepting those targeting for it, and
ignoring those not targeting for it.
 The receiver computer
reassembles the packets
to re-construct the original message
by making use of the sequencing information
Chapter 2 Data Transmission
2.5.4 Packets Creation and Receive
Chapter 2 Data Transmission
2.6 Access Methods
 Data collision
occurs in shared networking medium
when two computers send data at the same time
Both data will be destroyed
Chapter 2 Data Transmission
2.6 Access Methods
 Access methods
ensure that data can be sent successfully over shared
medium
including
CSMA/CD
CSMA/CA
Token passing
Chapter 2 Data Transmission
2.6.1 CSMA/CD
 CSMA/CD (Carrier Sense Multiple Access with Collision Detection)
Computer ready send data
1. listens to the channel
2. If the channel is free,
2.1
2.2
2.3
•
sends the data.
listens to see whether collision occurs or not.
If there is a collision,
waits a random period of time before re-send
A random period is necessary, otherwise, the cycle “wait-send-collide”
would occur repeatedly.
the most popular access method
used by Ethernet networks
Chapter 2 Data Transmission
2.6.2 CSMA/CA
 CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance)
The computer ready to send data
1. listens to the channel
2. If the channel is free,
2.1
2.2
2.3
•
sends an “intend-to-send” signal
listens to see if there is another “intend-to-send” signal
If there is another “intend-to-send” signal
wait a random period of time, and repeat the above process
– until the channel is absolutely free.
3. sends the data.
CSMA/CA is commonly used by wireless LAN
because collisions cannot be detected.
Chapter 2 Data Transmission
2.6.3 Token Passing (1/2)
 Token is
a small piece of code
created when the network is turned on
moving around continuously
reaching each computer in turn
 Token passing can only work in ring networks
e.g. Token Ring
Chapter 2 Data Transmission
2.6.3 Token Passing (1/2)
Chapter 2 Data Transmission
2.6.3 Token Passing (2/2)
 Token Passing
Computer ready to send data
1. grabs the token
2. adds data to the token
• including addresses and data content to it
3. sends the token out as a packet
If the packet is delivered successfully,
4.1.1 The receiver returns a message to acknowledge arrival
4.1.2 The sender sends out a new token
If no receiver is found,
4.2.1 The packets returns to the sender computer
4.2.2 The sender either
• re-try or sends out a new token
Download