CS254 Network Technologies
Lecture 4: HDLC & Medium Access Control Dr Nikos Antonopoulos Department of Computing University of Surrey Autumn 2006
11.5 HDLC Configurations and Transfer Modes Frames Frame Format Examples Data Transparency
1
11.15
NRM
11.16
ABM
2
11.17
HDLC frame
11.18
HDLC frame types
3
11.19
I-frame
11.20 S-frame control field in HDLC
4
11.21
U-frame control field in HDLC
Table 11.1 U-frame control command and response Command/response
Meaning
SNRM
Set normal response mode
SNRME
Set normal response mode (extended)
SABM
Set asynchronous balanced mode
SABME
Set asynchronous balanced mode (extended)
UP
Unnumbered poll
UI
Unnumbered information
UA
Unnumbered acknowledgment
RD
Request disconnect
DISC
Disconnect
DM
Disconnect mode
RIM
Request information mode
SIM
Set initialization mode
RSET
Reset
XID
Exchange ID
FRMR
Frame reject
5
Example 3 Figure 11.22 shows an exchange using piggybacking where is no error. Station A begins the exchange of information with an I-frame numbered 0 followed by another I-frame numbered 1. Station B piggybacks its acknowledgment of both frames onto an I-frame of its own. Station B’s first I-frame is also numbered 0 [N(S) field] and contains a 2 in its N(R) field, acknowledging the receipt of A’s frames 1 and 0 and indicating that it expects frame 2 to arrive next. Station B transmits its second and third I-frames (numbered 1 and 2) before accepting further frames from station A. Its N(R) information, therefore, has not changed: B frames 1 and 2 indicate that station B is still expecting A frame 2 to arrive next.
11.22
Example 3
6
Example 4 In Example 3, suppose frame 1 sent from station B to station A has an error. Station A informs station B to resend frames 1 and 2 (the system is using the Go-BackN mechanism). Station A sends a reject supervisory frame to announce the error in frame 1. Figure 11.23 shows the exchange.
11.23
Example 4
7
Note: Bit stuffing is the process of adding one extra 0 whenever there are five consecutive 1s in the data so that the receiver does not mistake the data for a flag.
11.24 Bit stuffing and removal
8
11.25 Bit stuffing in HDLC
Chapter 13
Multiple Access
9
Figure 13.1 Multiple-access protocols
13.1 Random Access MA CSMA CSMA/CD CSMA/CA
10
Figure 13.2
Evolution of random-access methods
Figure 13.3
ALOHA network
11
Figure 13.4 Procedure for ALOHA protocol
Figure 13.5
Collision in CSMA
12
Figure 13.6 Persistence strategies
13.7
CSMA/CD procedure
13
Figure 13.8
CSMA/CA procedure
13.2 Control Access Reservation
Polling Token Passing
14
Figure 13.9
Reservation access method
Figure 13.10 Select
15
Figure 13.11
Poll
Figure 13.12
Token-passing network
16
Figure 13.13
Token-passing procedure
13.3 Channelization FDMA
TDMA
CDMA
17
Note: In FDMA, the bandwidth is divided into channels.
Note: In TDMA, the bandwidth is just one channel that is timeshared.
18
Note: In CDMA, one channel carries all transmissions simultaneously.
Figure 13.14
Chip sequences
19
Figure 13.15
Encoding rules
Figure 13.16
CDMA multiplexer
2
0
Figure 13.17
CDMA demultiplexer
Figure 13.18
W1 and W2N
2
1
Figure 13.19 Sequence generation
Example 1 Check to see if the second property about orthogonal codes holds for our CDMA example.
Solution The inner product of each code by itself is N. This is shown for code C; you can prove for yourself that it holds true for the other codes. C . C = [+1, +1, −1, −1] . [+1, +1, −1, −1] = 1 + 1 + 1 + 1 = 4 If two sequences are different, the inner product is 0. B . C = [+1, −1, +1, −1] . [+1, +1, −1, −1] = 1 − 1 − 1 + 1 = 0
2
2
Example 2 Check to see if the third property about orthogonal codes holds for our CDMA example.
Solution The inner product of each code by its complement is −N. This is shown for code C; you can prove for yourself that it holds true for the other codes. C . (− −C ) = [+1, +1, −1, −1] . [− [−1, −1, +1, +1] = − 1 − 1 − 1 − 1 = −4 The inner product of a code with the complement of another code is 0. B . (− −C ) = [+1, −1, +1, −1] . [[− −1, −1, +1, +1] = −1 + 1 + 1 − 1 = 0
2
3