UDP and Flooding
$30-100 USD
Оплачується при отриманні
first construct a simulation of the network with
flooding. ? Consider the physical view of the network below. ? A file of size 1 Mbyte is to
be sent from node 1 to node 7. ? The file is segmented into PDU, where each PDU has a
1000 byte payload. ? The PDU are sent from node 1 to node 7 over the network using an
end-to-end stop-and-wait ARQ protocol, as shown in the logical layer diagram given
below. When the ARQ entity at node 7 receives an in-sequence PDU, it passes the PDU
to the application and sends back an ACK PDU that contains the received sequence
number. When the ARQ entity at node 7 receives an out-of-sequence PDU, it discards the
out-of-sequence PDU. The PDU received at node 7 are reassembled at node 7 to form the
original data file. There is a single ARQ timer at node 1. The timeout value is set to T
seconds. The sequence number space is assumed to be {1,2,3,4, …}. ? That is, each data
PDU sent out by the ARQ entity is assumed to have its own distinct sequence number.
This sequence number is put in the header of the data PDU.
When a node sends out a particular PDU (data PDU or ACK PDU), it sends out a copy of
the PDU to all adjacent nodes (i.e., flooding). ? When a node receives a particular PDU, it
sends out a copy of the received PDU to all adjacent nodes (this also applies at node 7
and node 1). ? Each PDU contains a hop count field. ? The hop count field is originally set
to 8 when a PDU data PDU is first created at node 1 or an ACK PDU is first created at
node 7. Whenever a copy of a PDU is made, the hop count field is decremented by 1. ? If
the hop count field in a PDU becomes equal to 0, then the PDU is simply discarded. Note
that, whenever a copy of a PDU is made, the sequence number or ACK number in the
PDU remains unchanged.
## Deliverables
first construct a simulation of the network with
flooding. ? Consider the physical view of the network below. ? A file of size 1 Mbyte is to
be sent from node 1 to node 7. ? The file is segmented into PDU, where each PDU has a
1000 byte payload. ? The PDU are sent from node 1 to node 7 over the network using an
end-to-end stop-and-wait ARQ protocol, as shown in the logical layer diagram given
below. When the ARQ entity at node 7 receives an in-sequence PDU, it passes the PDU
to the application and sends back an ACK PDU that contains the received sequence
number. When the ARQ entity at node 7 receives an out-of-sequence PDU, it discards the
out-of-sequence PDU. The PDU received at node 7 are reassembled at node 7 to form the
original data file. There is a single ARQ timer at node 1. The timeout value is set to T
seconds. The sequence number space is assumed to be {1,2,3,4, …}. ? That is, each data
PDU sent out by the ARQ entity is assumed to have its own distinct sequence number.
This sequence number is put in the header of the data PDU.
When a node sends out a particular PDU (data PDU or ACK PDU), it sends out a copy of
the PDU to all adjacent nodes (i.e., flooding). ? When a node receives a particular PDU, it
sends out a copy of the received PDU to all adjacent nodes (this also applies at node 7
and node 1). ? Each PDU contains a hop count field. ? The hop count field is originally set
to 8 when a PDU data PDU is first created at node 1 or an ACK PDU is first created at
node 7. Whenever a copy of a PDU is made, the hop count field is decremented by 1. ? If
the hop count field in a PDU becomes equal to 0, then the PDU is simply discarded. Note
that, whenever a copy of a PDU is made, the sequence number or ACK number in the
PDU remains unchanged.
To model the transmission link between a pair of adjacent nodes, you will use UDP
connections. ? More precisely, you will model each transmission link using a pair of UDP
connections and one relay entity, as shown in the physical and logical layer diagrams
given below. ? The relay entity is included to model propagation delay and PDU [url removed, login to view] © 2009 by Adrian E. Conway 2
When a PDU arrives at a relay entity, it is discarded with probability P. ? This models
packet loss on a link. ? All links are assumed to have the same discard probability P. ? Use
a random number generator to determine if a PDU is discarded or not. ? If the PDU is not
discarded, then a time delay of D seconds is applied subsequently to the packet to model
the propagation delay in the link. The modeling of propagation delay may be done simply
using a timer. Invoke a separate timer at the relay entity for each PDU that may be at the
relay entity. ? When a timer expires, the associated PDU is passed immediately to the
outgoing UDP connection. The time delay D is the same at all relay entities.
All links are assumed to be bidirectional. ? Hence, each UDP connection is used in a
bidirectional manner.
Implement each relay entity as a separate process. ? Implement each node as a separate
process. Note that all the relay entities operate in exactly the same way. ? Note that nodes
2, 3, 4, and 5, all operate in exactly the same way.
Since the number of hops from node 1 to node 7 is three or four hops, the timeout value T
in the stop-and-wait ARQ should be at least T = 6D. ? A good value to use may be about
10D. ? You will need to experiment to see what is a good value to use. ? (It will depend on
the processing times for your programs themselves.)
To initially set up the UDP connections between the nodes and relays, you will need to
first create UDP welcoming sockets.
ID Проекту: #3774111