Upload
dinhtuong
View
221
Download
4
Embed Size (px)
Citation preview
1
El-Shorouk Academy Acad. Year : 2011/ 2012
Higher Institute for Computer & Term : Second
Information Technology Year : 3rd
Department of Information System No. Questions : 5
3201 Computer Networks (Final Exam) (Model Answer)
Question #1:
a) A client-server system uses a Satellite network, with the satellite at height of 40,000 Km.
Calculate the best-case delay in response to a Request? (Note: Light speed C=300,000
km/sec.)
Answer:
Satellite delay: Time =
The request has to go up and come down, and the response has to go up and come down. The
total path length traversed is thus (40,000 *4 = 160,000 km). The speed of light in air and
vacuum is 300,000 km/sec, so the propagation delay alone is
160,000/300,000 sec or about 533 msec.
b) Which of the OSI layers handles each of the following
Dividing the transmitted bit stream into frames.
Determining which route through the subnet to use.
Answer:
Data Link Layer
Network Layer
c) List two ways in which the OSI reference model and TCP/IP reference model are the same.
Now list two ways in which they differ.
Answer:
2
Similarities between TCP/IP and OSI reference Model:
· Both models are based on layered protocols
· Both have a network, transport and application layer
· In both models, the transport service can provide a reliable end-to-end byte stream
On the other hand, they differ in several ways:
· The numbers of layers are different
· TCP/IP does not have session or presentation layers
· OSI does not support internetworking and OSI has both connection oriented and
connectionless service in the network layer
d) What is the essential difference between message switching and packet switching?
Answer:
Packet Switching:
packets are stored and forwarded from primary storage (RAM)
has a maximum packet size. Any message longer than that is split up into multiple
packets.
Message switching:
message are stored and relayed from secondary storage (disk).
a node receives a message stores it until the appropriate route is free, then sends it along.
sends data units that can be of any length
3
Question #2:
In the IT environments you might have a network engineer role so what is the best solution for
the following company requirements:
20 employees should have workstations to work on.
You should provide the network users with a printing network device.
2 manager should have an internet connection
Company work nature is heavy printing environment.
Workers should work at the same time on some kind of projects so that is better to
being a server based network.
a) Draw a conceptual design for that small size network environment.
b) Write in details the recommended specification of the network server and show its type.
c) Write down the network architecture and briefly describe the medium used to connect clients
together.
d) If they need to secure the network against external threats which kind of network security
devices should be added to that network and why?
Answer:
a)
. . . Internet Client1 Client2 Client3 Client20
router switch
Manager1 Manager2 Printer Server
4
b) Server type File and Print Server
Server specification :
CPU any
RAM 4 GB
HD 200 GB
Network 1/10 Gbit Ethernet
c) Network architecture 1 Gigabit Ethernet or 10BaseTX
Medium Twisted Pair (UTP)
d) Firewall or Intrusion Detection system (IDS)
Because they provide higher level of security
5
Question #3:
a) The following Character encoding is used in a data link protocol:
A: 01000111; B: 11100011; FLAG: 01111110; ESC: 11100000
Show the bit sequence transmitted (In Binary) for the four –character frame: A B ESC FLAG
when each of the following framing methods are used:
1. Character Count
2. Flag bytes with byte stuffing.
3. Starting and ending flag bytes, with bit stuffing.
Answer:
o Character count
00000100 01000111 11100011 11100000 01111110
o Flag bytes with byte stuffing
01111110 01000111 11100011 11100000 11100000 11100000 01111110 01111110
Flag A B Esc (byte
stuffed) Esc
Esc (byte
stuffed) flag Flag
o Starting and ending flag bytes, with bit stuffing
01111110 01000111 110100011 111000000 011111010 01111110
flag A B Esc flag Flag
b) Write a pseudo code for the piggybacking protocol.
Answer:
S1 : send seq =0
Rec seq = 0
S2 : From host (Buffer)
S3 : generate Frame to be sent having
S.Info= Buffer
S.seq=sendseq
S.ack=1- recseq
S4 : F(S)
S5 : start timer (S.seq)
6
S6 : wait ( event ={ Frame arrival| ChkSumErr|Timeout})
S7 : event <> frame Arrival S12 | S4
S8 : get F( r )
S9 : if r.seq= rec.seq then ( toHost ( r.Info); rec.seq=rec.seq )
S10 : if r.ack=send.seq then ( fromHost ( Buffer); sendseq=sendseq )
S11 : S.info = buffer
S.seq=send.seq
S13 : startTimer ( s.seq )
S14 : goto S6
c) Write a part of a normal scenario where you have two terminals A and B interchange
packets between them and A starts first, stop when a gets 4 successful packets.
A sends (0, 1, A0)
B gets(0 ,1, A0)*
B sends (0, 0, Bo)
A gets(0, 0, B0)*
A sends(1, 0, A1)
B gets(1, 0, A1)*
B sends(1, 1, B1)
A gets(1, 1, B1)*
A sends(0, 1, A2)
B gets(0, 1, A2)*
B sends (0, 0, B2)
A gets(0, 0, B2)*
A sends(1, 0, A3)
B gets(1, 0, A3)*
B sends (1, 1, B3)
A gets(1, 1, B3)*
7
d) Write the abnormal scenario where both sides A & B simultaneously send an initial
packet. Stop after each side gets three successful packets.
A gets(0,1,B2)
A sends(0,1,A2) B sends(1,0,B3)
B gets(0,1,A2)
8
Question #4
write down the law to determine the Maximum bit rate to transmit binary data for noiseless
and noise channels.
Answer:
For noiseless channel
Maximum data rate = ⁄
For noisy channel
Maximum number of bits/sec = ⁄ )
a) Calculate the maximum bit rate for a noiseless 6-KHz channel and a noise 3-KHz
channel with a signal to noise ratio of 30 dB.
Maximum bit rate for a noiseless 6-KHz channel:
for 6KHz then for noiseless channel using Shannon theorem ⁄ , sampling rate will be 6K samples/sec. So with 2 bit encoding, 2 bits are
sent per sample. So the data rates is 12000 samples / sec = (2 * 6000 ) = 12000bps.
Maximum bit rate for a noisy 3-KHz channel:
for 3KHz then for noisy channel using Shannon theorem ⁄ , sampling rate will be 3K samples/sec.
SNR (dB) = 10 log10(S/N)
30 dB = 10 log10(S/N)
3 = log10(S/N)
10 3 = (S/N) = 1000
Maximum bit rate= 3 KHz log2(1 + 1000)
= 3 * log2(1001)
= 3000 (ln (1001)/ln(2))= 29,901 bps 30,000 bps
9
a) Explain the design issues taken into consideration during the design of physical and data
link layers.
Answer:
Physical layer:
The design issues must take in consideration:
Sending “1” bit must be received “1” not “0”.
How many volts to represent one & zero “5” volt represent “1” for positive logic.
How many microseconds or nanoseconds a bit lasts.
How many pins the network connector has and what each pin is used for.
Data link layer:
The design issues must take in consideration:
How bits of physical layer are grouped into frames
Attaching special bit patterns to the beginning & the end of the frame “01111110” when
creating and recognizing frames boundaries.
Problem of flooding slow receivers from fast senders must be taken into consideration.
Problem of transmission on both directions must be solved.
Dealing with transmission errors
b) Modulation is used to let signals travel far away, explain this statement. Explain the
different modulation techniques.
Answer:
Modulation is the addition of information (or the signal) to an electronic or optical signal
carrier. Modulation can be applied to direct current (mainly by turning it on and off), to
alternating current, and to optical signals.
A continuous tone in the 1000 to 2000-Hz range, called a sine wave carrier, is introduced. Its
amplitude, frequency, or phase can be modulated to transmit information
Amplitude modulation:
two different amplitudes are used to represent 0 and 1, respectively.
Frequency modulation:
also known as frequency shift keying, two (or more) different tones are used.
Phase modulation:
the carrier wave is systematically shifted 0 or 180 degrees at uniformly spaced intervals.
10
c) What is meant by TDMA and FDMA? Explain each of them and write their delay
equations.
Answer:
TDMA: Time Division with Multiple Access
Time is divisible into slots of time. Each user is assigned a fixed number of predefined
channel time slots. The user has access to entire channel bandwidth but only during its
allocated slots.
FDMA: Frequency Division with Multiple Access
Bandwidth is divided by the number of users. Each user is assigned fraction
where by
the assigned buffer it can be seen that the system can be modeled as sub channel, each
of them viewed as an queuing system with a constant service time for the packet
transmission time for each sub channel.
⁄
11
Question #5:
a) Define the term , a, S, G, and T and write the equation to calculate and a.
Answer:
end to end propagation delay the amount of time it takes for the head of the signal to
travel from the sender to the receiver.
a: normalized propagation delay
S: throughput the amount of data moved successfully from one place to another in a given
time period.
Or
the average rate of successful message delivery over a communication channel.
G: input rate the amount of data transmitted in a given time period
T: time of packet transmission the time the packet takes to be transmitted from
source to destination
: end to end propagation delay , =
(
)
a : normalized end to end propagation delay , a=
T: time of packet transmission , T =
(
)
b) Define the term Channel capacity. Draw the channel capacity for PURE ALOHA,
SLOTTED ALOHA, and CSMA/CD.
Answer:
Channel capacity: the maximum data rate that can be attained over a given channel. (maximum
Throughput)
12
c) Explain the protocol CSMA/CD and draw its S versus G, also draw its delay versus
input rate G.
Answer:
CSMA / CD Protocol:
if two stations sense the channel to be idle and begin transmitting simultaneously, they
will both detect the collision almost immediately. Rather than finish transmitting their
frames, which are irretrievably garbled anyway, they should abruptly stop transmitting
as soon as the collision is detected. Quickly terminating damaged frames saves time and
bandwidth.
At the point marked t0, a station has finished transmitting its frame. Any other station
having a frame to send may now attempt to do so. If two or more stations decide to
transmit simultaneously, there will be a collision. Collisions can be detected by looking at
the power or pulse width of the received signal and comparing it to the transmitted
signal.
After a station detects a collision, it aborts its transmission, waits a random period of
time, and then tries again, assuming that no other station has started transmitting in the
meantime.
13
d) Calculate the vulnerable period in each of the following protocols PURE ALOHA,
SLOTTED ALOHA, CSMA, and CSMA/CD (write this value in terms of T and a).
Answer:
Vulnerable period of:
Pure ALOHA = 2T
Slotted ALOHA = T
CSMA = T+2
CSMA/CD = 2
D
elay