Networks Introduction
Networks Introduction
EXIT Let the server know that there is a card in the ATM machine & ATM card transmits user ID to server User enters PIN, PIN is then sent to the server User requests a balance User asks to withdraw amount of money User is done
Messages from Server to ATM machine: PASSWD OK ERROR AMOUNT <amount> EXIT Correct Operation: client server Asks users for PIN (password) Okay last requested operation Error in last requested operation Response to BALANCE request User is done, return to default screen display on ATM
HELLO <userid> -----------(check if valid userid) ---------- PASSWD PASSWD <passwd>---------(check password) ---------- OK BALANCE ----------- ---------- AMOUNT <amount> WITHDRAWAL <amount>check if there is enough money to cover the withdrawal ---------- OK ATM dispenses money EXIT -----------
HELLO <userid> -----------(check if valid userid) ---------- PASSWD PASSWD <passwd>---------(check password) ---------- OK BALANCE ----------- ---------- AMOUNT <amount> WITHDRAWAL <amount>check if there is enough money to cover the withdrawal ---------- ERROR Error message displayed, no money dispensed EXIT ----------- ---------- EXIT P3) a) A circuit-switched network would be better suited for the application because it involves long sessions with predictable and smooth bandwidth requirements. Because the transmission rate is known and consistent, bandwidth can be reserved for each application session with minimal waste. Additionally, the overhead cost of setting up and tearing down connections is minimized due to the long session times. b) In a worst case scenario, all of the applications simultaneously transmit over one or more network links. But, because each link has sufficient bandwidth to handle the sum of all the data rates, very little queuing (and thus minimal to no congestion) will occur. Therefore, the network does not need congestion control mechanisms. P4) a) 16 connections. Four connections per switch, with four switches. 4x4=16 b) 8 connections. Four connections through the switch in upper-right corner, another four connections through switch in lower-left corner. 4+4=8. c) Yes. For A to C, route two connections through B and two connections through D. For B to D, route two connections through A and two connections through C. At most there are four connections passing through any link, which is allowed.
P6) a) dprop = m / s seconds b) dtrans = L / R seconds c) dend-to-end = (dprop / dtrans) seconds d) The bit is just leaving Host A. e) The first bit is in the link and has not reached Host B. f) The first bit has reached Host B. g) m = L/R * s = 120/(56e3) * (2.5e8) = 536 km. P12) The arriving packet must wait for the link to transmit 6750 bytes (4.5 * 1500 bytes) or 54000 bits. At 2 Mbps, the queuing delay is 27 msec. In general, the queuing delay is (nL / (L-x))/R. P18) a) The average of the round-trip delays at each of the three hours is 20.21 ms, 15.92 ms, and 19.31 ms, respectively. Standard deviations are 0.12 ms, 0.32 ms, and 0.09 ms, respectively. b) The traceroutes had various router counts in their path, and took different paths. c) Traceroute packets passed through roughly four ISP networks from source to destination. The largest delays occurred at peering interfaces between adjacent ISPs. d) The average round-trip delays were 54.22 ms, 51.89 ms, and 52.46 ms, respectively. The standard deviations are 0.49 ms, 0.32 ms, and 0.20 ms, respectively. There were 12 routers in the path at each of the three hours, with no change in the path taken. The traceroute packets passed through about three (or maybe four) ISP networks from source to destination. The large delays occurred at peering interfaces between adjacent ISPs. P20) Throughput = min{ Rs, Rc, R/M } P31) a) The time to send a message from the source host to the first packet switch is 4 seconds (8e6/2e6 sec). With store-and-forward switching, the time needed to move messages from source host to destination is 12 seconds (4sec x 3 hops). b) The time to send the first packet from source host to first packet switch is 5 msec. The time at which the second packet is received at the first switch is 10 msec (time at which the first packet is received at the second switch, 2 x 5 msec).
c) The time at which the first packet is received at the destination host is 15 msec (5 msec x 3 hops). After this, every 5 msec one packet will be received, therefore the time at which the 800th packet is received is 4.01 sec (15 msec / 799 packets * 5 msec). The delay in using message segmentation is roughly 1/3rd less. d) Without message segmentation, if bit errors are not tolerated, then as soon as a single bit error occurs the whole message has to be retransmitted (vs. a single packet). Huge packets are sent into the network and routers have to accommodate them. Smaller packets have to queue behind enormous packets and suffer delays. e) Packets have to be put in sequence at the destination. Message segmentation causes smaller packets. Header size is (usually) the same for all packets, regardless of size. Therefore, with message segmentation the total amount of header bytes is more, as there are more packets with equal sized headers.