Beruflich Dokumente
Kultur Dokumente
gghgjghjghj
gjggjhgg
khgjgjgh
hfjhfjhgkkhnProtocol for RDT using UDP Connection
For a given application we have to design a reliable data tranfer protocol. The
steps includes to implement are:
1.Declare the rdt packet header
2.Connection establishment and termination, sequence numbers, acknowledgements,
flow control, timestamp.
During designing, we need to take care of:
1.packet loss
2.duplicate packet detection
1) Kinds of messages used in this protocol:
There are two kinds of messages that will be used in this protocol:
i) Message used to establish a connection
ii) Message used to send data
2) Syntax of the Packets:
Syntax tells the rules of writing a message, that is, which message should b
e sent in which way.
i)General messages contain a header and a payload
ii)Special messages contain just a header
iii)A field in the header is seperated by '\n'(line feed)
iv)End of a packet is marked by '\n\n\n'
v)End of header is marked by '\n\n'
3) Semantics- Meaning of each field:
Protocol maintained for the header is:
conn_flags: They maintain the connection's status. There are 4 types of connecti
on flags- SYN, FIN, ACK and RST.
i)SYN Flag is set to 1 when a successful connection is established between the s
ender and the receiver. It is used to synchronize the handshaking mechanism.
ii)FIN Flag determines connection termination. It is set to 1 when a request is
made to close the connection.
iii)ACK Flag is used for acknowledgement. When the receiver receives a packet se
nt by the
sender, it sends back an acknowledgement. The receiver migh
t also send a negative
acknowledgement. This means that the receiver ha
s received the packets but with some errors.
iv)RST is set to 1 when a connection is reset. All the flags and variables are s
et to 0.
seq_nos.: All packets are denoted by a sequence number. seq_nos. maintains a ran
ge of valid sequence numbers.
ack_nos.: Sends a set of sequence nos. That the receiver would be expecting to r
eceive.