Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Ans Tutorial#5

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

1

Exercises (From the text book -Data communication and networking- Chapter 8)
16- Transmission of information in any network involves end-to-end addressing and
sometimes local addressing (such as VCI). Table 8.2 shows the types of networks and the
addressing mechanism used in each of them.
Table 8.2
Network Setup Data Transfer Teardown
Circuit-switched End-to-end End-to-end
Datagram End-to-end
Virtual-circuit End-to-end Local End-to-end

Why does a datagram network need only end-to-end addressing during the data transfer
phase, but no addressing during the setup and teardown phases?

In a datagram network, each packet is independent. The routing of a packet is done for each
individual packet. Each packet, therefore, needs to carry an end-to-end address. There are no
setup and teardown phases in a datagram network (connectionless transmission). The entries
in the routing table are somehow permanent and made by other processes such as routing
protocols.

20- An entry in the switching table of a virtual-circuit network is normally created during the
setup phase and deleted during the teardown phase. In other words, the entries in this type
of network reflect the current connections, the activity in the network. In contrast, the entries
in a routing table of a datagram network do not depend on the current connections; they
show the configuration of the network and how any packet should be routed to a final
destination. The entries may remain the same even if there is no activity in the network. The
routing tables, however, are updated if there are changes in the network. Can you explain
the reason for these two different characteristics? Can we say that a virtual-circuit is a
connection oriented network and a datagram network is a connectionless network because of
the above characteristics?

In circuit-switched and virtual-circuit networks, we are dealing with connections. A connection
needs to be made before the data transfer can take place. In the case of a circuit-switched
network, a physical connection is established during the setup phase and is broken during the
teardown phase. In the case of a virtual-circuit network, a virtual connection is made during
setup and is broken during the teardown phase; the connection is virtual, because it is an
entry in the table. These two types of networks are considered connection-oriented. In the
case of a datagram network no connection is made. Any time a switch in this type of network
receives a packet, it consults its table for routing information. This type of network is
considered a connectionless network.

22- Answer the following questions:
a. Can a routing table in a datagram network have two entries with the same destination
address? Explain.
b. Can a switching table in a virtual-circuit network have two entries with the same input port
number? With the same output port number? With the same incoming VCls? With the same
outgoing VCls? With the same incoming values (port, VCI)? With the same outgoing values
(port, VCI)?

a- In a datagram network, the destination addresses are unique. They cannot be duplicated
in the routing table.

b- In a virtual-circuit network, the VCIs are local. A VCI is unique only in relationship to a
port. In other words, the (port, VCI) combination is unique. This means that we can have two
Tutorial
5

NET 331
TA. Muneerah Al-Eidi Office 2010 - Building 9


2


entries with the same input or output ports. We can have two entries with the same VCIs.
However, we cannot have two entries with the same (port, VCI) pair.


23- Five equal-size datagrams belonging to the same message leave for the destination one
after another. However, they travel through different paths as shown in Table 8.1.
Table 8.1
Datagram Path Length Visited Switches
1 3200 Km 1,3,5
2 11,700 Km 1,2,5
3 12,200 Km 1,2,3,5
4 10,200 Km 1,4,5
5 10,700 Km 1,4,3,5
We assume that the delay for each switch (including waiting and processing) is 3, 10, 20, 7,
and 20 ms respectively. Assuming that the propagation speed is 2 x 10^8 m, find the order
the datagrams arrive at the destination and the delay for each. Ignore any other delays in
transmission.

We assume that the transmission time is negligible in this case. This means that we suppose
all datagrams start at time 0. The arrivals timed are calculated as:

First: (3200 Km) / (2 108 m/s) + (3 + 20 + 20) = 59.0 ms
Second: (11700 Km) / (2 108 m/s) + (3 + 10 + 20) = 91.5 ms
Third: (12200 Km) / (2 108 m/s) + (3 + 10+ 20 + 20) = 114.0 ms
Fourth: (10200 Km) / (2 108 m/s) + (3 + 7 + 20) = 81.0 ms
Fifth: (10700 Km) / (2 108 m/s) + (3 + 7 + 20 + 20) = 103.5 ms

The order of arrival is: 3 5 2 4 1


24- A path in a virtual-circuit network has a data rate of I Mbps. The exchange of 1000 bits is
required for the setup and teardown phases. The distance between two parties is 5000 km.
answer the following questions if the propagation speed is
2 X 10^8 m:
a. What is the total delay if 1000 bits of data are exchanged during the data transfer phase?
b. What is the total delay if 100,000 bits of data are exchanged during the data transfer
phase?
c. What is the total delay if 1,000,000 bits of data are exchanged during the data transfer
phase?
d. Find the delay per 1000 bits of data for each of the above cases and compare them. What
can you infer?

We assume that the setup phase is a two-way communication and the teardown phase is a
one-way communication. These two phases are common for all three cases. The delay for
these two phases can be calculated as three propagation delays and three transmission
delays or
3 [(5000 km)/ (2 10^8 m/s)]+ 3 [(1000 bits/1 Mbps)] = 75 ms + 3 ms = 78 ms

We assume that the data transfer is in one direction; the total delay is then delay for setup
and teardown + propagation delay + transmission delay

a. 78 + 25 + 1 = 104 ms
b. 78 + 25 + 100 = 203 ms
c. 78 + 25 + 1000 = 1103 ms

3


d. In case a, we have 104 ms. In case b we have 203/100 = 2.03 ms. In case c, we have
1103/1000 = 1.101 ms. The ratio for case c is the smallest because we use one setup and
teardown phase to send more data.

Exercises (From the text book -Data communication and networking- Chapter 20)
15- A host is sending 100 datagrams to another host. If the identification number of the first
datagram is 1024, what is the identification number of the last (in IPv4)?

The identification field is incremented for each non-fragmented datagram. If the first is 1024,
then the last is 1024 + 99 = 1123

18- Calculate the HLEN (in IPv4) value if the total length is 1200 bytes, 1176 of which is data
from the upper layer.

Header Length = Total Length - Data Length = 1200 1176 = 24
HLEN = 24/4 = 6 (in decimal) 0110 (in binary)

19- An IPv4 datagram is carrying 1024 bytes of data. If there is no option information, what
is the value of the header length field? What is the value of the total length field?

Since there is no option information, the header length is 20, which means that the value of
HLEN field is 5 or 0101 in binary. The value of total length is 1024 + 20 or 1044 (00000100
00010100 in binary).

23- The value of HLEN in an IPv4 datagram is 7. How many option bytes are present?

If the value of the HLEN field is 7, there are 28 (since 7 4 = 28) bytes included in the
header. There are 20 bytes in the base header, so the total number of option bytes must be
8.

You might also like