Professional Documents
Culture Documents
Sheet 5 Answer PDF
Sheet 5 Answer PDF
El-Shorouk City
Answer:
m
A message can be packed in one or multiple frames.
er as
Frame size is kept such that flow and error control become efficient
co
Framing divides a message into smaller entities to make flow and error control more
eH w
manageable
o.
2. Explain why flags are needed when we use variable-size frame.
rs e
ou urc
Answer:
Flags are needed to separate a frame from the previous frame and the next frame.
o
Answer:
Character-oriented protocols use byte-stuffing to be able to carry an 8-bit pattern that is the
same as the flag. Byte-stuffing adds an extra character to the data section of the frame to escape
ed d
the flag-like pattern. Bit-oriented protocols use bit-stuffing to be able to carry patterns similar to
the flag. Bit-stuffing adds an extra bit to the data section of the frame whenever a sequence of
ar stu
4. In a byte-oriented protocol, should we first unstuff the extra bytes and then remove
the flags or reverse the process
sh is
Answer:
Th
Byte stuffing involves the addition of a special byte to the data section of the frame when
there is a character with the same pattern as the flag. An extra byte is stuffed in the data
section called the escape character which has a pre-defined bit pattern. Whenever the receiver
encounters the ESC character, it removes it from the data section and treats the next character
as data, not a delimiting flag.
5. In a bit-oriented protocol, should we first unstuff the extra bits and then remove the
flags or reverse the process.
Answer:
1
https://www.coursehero.com/file/36566361/sheet-5-answerpdf/
The flags are the delimiters of the original frames. We need first to unstuff the frame to
remove extra bits. The flags are removed later when we want to deliver data to the upper
layer.
6. Byte stuff the following frame payload in which E is the escape byte, F is the flag
byte, and D is a data byte other than an escape or a flag character.
DEDDFDDEEDFD
Answer:
Each escape or flag byte must be pre-stuffed with an escape byte. The following shows the
result. The red bytes show the added ones.
m
er as
7. stuff the following frame payload in which E is the escape byte, F is the flag byte,
co
and D is a data byte other than an escape or a flag character.
eH w
o.
EEDEFDDEFEEDDD
Answer: rs e
ou urc
o
aC s
0001111111001111101000111111111110000111
Answer:
ed d
The following shows the result. We inserted extra 0 after each group of five consecutive 1’s.
ar stu
00011111011001111100100011111011111010000111
00011111000001111101110100111011111000001111
Th
Answer:
00011111000000111110011101001110111110000001111
10. Use drawing to explain where the data link layer is implemented.
Answer:
2
https://www.coursehero.com/file/36566361/sheet-5-answerpdf/
m
Figure 1
er as
Figure 1 shows typical host architecture. For the most part, the link layer is implemented in a
co
eH w
network adapter, aka a network interface card (NIC). At the heart of the network adapter is
the link-layer controller, usually a single, special-purpose chip that implements many of the
o.
link-layer services (framing, link access, error detection, and so on). Thus, much of a link-
rs e
layer controller’s functionality is implemented in hardware. Network adapters are being
ou urc
integrated onto the host’s motherboard—a so-called LAN-on-motherboard configuration.
Figure1 shows a network adapter attaching to a host’s bus (e.g., a PCI or PCI-X bus), where it
looks much like any other I/O device to the other host components. It also shows that while
o
most of the link layer is implemented in hardware, part of the link layer is implemented in
aC s
software that runs on the host’s CPU. The software components of the link layer implement
vi y re
higher-level link layer functionality such as assembling link-layer addressing information and
activating the controller hardware. On the receiving side, link-layer software responds to
controller interrupts (e.g., due to the receipt of one or more frames), handling error conditions
and passing a datagram up to the network layer. Thus, the link layer is a combination of
ed d
hardware and software—the place in the protocol stack where software meets hardware.
ar stu
sh is
Th
3
https://www.coursehero.com/file/36566361/sheet-5-answerpdf/