Assignment 3 Final
Assignment 3 Final
Assignment 3 Final
Your protocol should allow a user's card and password to be verified, the account balance (which is maintained at the centralized computer) to be queried, and an account withdrawal (i.e., when money is given to the user) to be made. Your protocol entities should be able to handle the all-too-common case in which there is not enough money in the account to cover the withdrawal. Specify your protocol by listing the messages exchanged, and the action taken by the Automatic Teller Machine or the bank's centralized computer on transmission and receipt of messages. Sketch the operation of your protocol for the case of a simple withdrawal with no errors, using a diagram similar to that in Figure given below. Explicitly state the assumptions made by your protocol about the underlying end-to-end transport service.
There can be many approaches to this for example one protocol can be as follows in which we can have several pre-defined messages that can be used for the required communication.
Ans.
BYE
server (check if valid userid) PASSWD (check password) OK (password is OK) AMOUNT <amt> check if enough $ to cover withdrawl OK
BYE
Q2. Consider an application which transmits data at a steady rate (e.g., the sender generates a N bit unit of
data every k time units, where k is small and fixed). Also, when such an application starts, it will stay on for relatively long period of time. Answer the following questions, briefly justifying your answer: a. Would a packet-switched network or a circuit-switched network be more appropriate for this application? Why? b. Suppose that a packet-switching network is used and the only traffic in this network comes from such applications as described above. Furthermore, assume that the sum of the application data rates is less that the capacities of each and every link. Is some form of congestion control needed? Why? Ans. a) A circuit-switched network would be well suited to the application described, because the application involves long sessions with predictable smooth bandwidth requirements. Since the transmission rate is known and not bursty , bandwidth can be reserved for each application session circuit with no significant waste. In addition, we dont have to worry greatly about the overhead costs of setting up and tearing down a circuit connection, which are amortized over the lengthy duration of a typical application session.
b) Given such generous link capacities, the network needs no congestion control mechanism. In the worst (most potentially congested) case, all the applications simultaneously transmit over one or more particular network links. However, since each link offers sufficient bandwidth to handle the sum of all of the applications' data rates, no congestion (very little queueing) will occur.
Ans. Guests arrive at home. The host decides to serve with pizza. He orders through telephone. Order clerk takes the order and asks the concerned staff to cook pizza. Now this was the transmission side of signal. Now towards receiving side : the pizza is cooked , order clerk hands over to delivery department who take it for delivery through van and deliver it to the host who ordered it. The host serves it to the guests. Q4. The French and Chinese prime ministers need to come to an agreement by telephone, but neither speaks the others language. Further, neither has on hand a translator that can translate to the language of the other. However, both prime ministers have English translators on their staffs. Draw a diagram similar to diagram given in Q3, above to depict the situation, and describe the interaction at each level. Ans.
French PM
French to English Translator and vice versa
Chinese PM
English to Chinese Translator and vice versa
French PM speaks in French. The translator in his team translates it to English. The message is heard by the English to Chinese translator in other team. He translates it in Chinese which is understood by the Chinese PM. Same process is repeated vice versa. Q5. In continuation to the question given above, now suppose that the Chinese prime ministers translator can translate only into Japanese and that the French prime minister has a German translator available. A translator between German and Japanese is available in Germany. Draw a new diagram that reflects this arrangement and describe the hypothetical phone conversation.
French PM
German to French
Chinese PM
Chinese to Japanese Translator and vice versa. Japanase to Gertman Translator and vice versa.