AinShams University Faculty of Engineering CSE 351s: Computer Networks Section 1 Eng. Noha Wahdan Class textbook: ANDREW S. TANENBAUM, DAVID J. WETHERALL, “Computer Networks”, 5th edition, PRENTICE HALL, 2011. Sheet 1: Question 2 An alternative to a LAN is simply a big timesharing system with terminals for all users. Give two advantages of a client-server system using a LAN. Sheet 1: Question 2 An alternative to a LAN is simply a big timesharing system with terminals for all users. Give two advantages of a client-server system using a LAN. Advantages: ➢ The LAN model can be grown incrementally. ➢ No single point of failure (if servers are replicated). Internet structure: a “network of networks” ▪ hosts connect to Internet via access Internet Service Providers (ISPs) ▪ access ISPs in turn must be interconnected mobile network national or global ISP • so that any two hosts (anywhere!) can send packets to each other ▪ resulting network of networks is very complex • evolution driven by economics, national policies local or regional ISP home network content provider network datacenter network enterprise network Let’s take a stepwise approach to describe current Internet structure Internet structure: a “network of networks” Question: given millions of access ISPs, how to connect them together? access net access net access net access net access net access net access net access net access net access net access net access net access net access net access net access net Introduction: 1-5 Internet structure: a “network of networks” Question: given millions of access ISPs, how to connect them together? access net access net access net access net access net access net access net connecting each access ISP to each other directly doesn’t scale: O(N2) connections. access net access net access net access net access net access net access net access net access net Introduction: 1-6 Internet structure: a “network of networks” Option: connect each access ISP to one global transit ISP? Customer and provider ISPs have economic agreement. access net access net access net access net access net access net access net global ISP access net access net access net access net access net access net access net access net access net Introduction: 1-7 Internet structure: a “network of networks” But if one global ISP is viable business, there will be competitors …. access net access net access net access net access net access net access net ISP A ISP B access net access net access net ISP C access net access net access net access net access net access net Introduction: 1-8 Internet structure: a “network of networks” But if one global ISP is viable business, there will be competitors …. who will want to be connected Internet exchange point access net access net access net access net access net IXP access net ISP A access net ISP B IXP access net access net access net ISP C access net peering link access net access net access net access net access net Introduction: 1-9 Internet structure: a “network of networks” … and regional networks may arise to connect access nets to ISPs access net access net access net access net access net IXP access net ISP A access net ISP B IXP access net access net access net ISP C access net access net regional ISP access net access net access net access net Introduction: 1-10 Internet structure: a “network of networks” … and content provider networks (e.g., Google, Microsoft, Akamai) may run their own network, to bring services, content close to end users access net access net access net access net access net IXP access net ISP A Content provider network IXP ISP B access net access net access net access net ISP C access net access net regional ISP access net access net access net access net Introduction: 1-11 What’s a protocol? mobile network Protocols define the format, order of messages sent and received among network entities, and actions taken on message transmission, receipt 4G national or global ISP Streaming video IP Skype local or regional ISP ▪ protocols are everywhere • control sending, receiving of messages • e.g., HTTP (Web), streaming video, Skype, TCP, IP, WiFi, 4G, Ethernet home network content provider network HTTP datacenter network Ethernet TCP enterprise network WiFi What’s a protocol? A human protocol and a computer network protocol: Hi TCP connection request Hi TCP connection response Got the time? GET http://gaia.cs.umass.edu/kurose_ross 2:00 <file> time Q: other human protocols? Introduction: 1-13 Layered Internet protocol stack ▪ application: supporting network applications • HTTP, IMAP, SMTP, DNS ▪ transport: process-process data transfer • TCP, UDP ▪ network: routing of datagrams from source to destination • IP, routing protocols ▪ link: data transfer between neighboring network elements • Ethernet, 802.11 (WiFi), PPP application application transport transport network link physical ▪ physical: bits “on the wire” Introduction: 1-14 Sheet 1: Question 17 What is the main difference between TCP and UDP? TCP is connection oriented with reliable transport between sending and receiving process, whereas UDP is a connectionless service that does not provide reliability or flow control. Sheet 1: Question 12 Two networks each provide reliable connection-oriented service. One of them offers a reliable byte stream and the other offers a reliable message stream. Are these identical? If so, why is the distinction made? If not, give an example of how they differ. Message and byte streams are different. In a message stream, the network keeps track of message boundaries. In a byte stream, it does not. For example, suppose a process writes 1024 bytes to a connection and then a little later writes another 1024 bytes. The receiver then does a read for 2048 bytes. With a message stream, the receiver will get two messages of 1024 bytes each. With a byte stream, the message boundaries do not count, and the receiver will get the full 2048 bytes as a single unit. The fact that there were originally two distinct messages is lost. Encapsulation: an end-end view source message segment M Ht M datagram Hn Ht M frame M Hl Hn Ht application transport network link physical link physical switch M Ht M Hn Ht M Hl Hn Ht M destination Hn Ht M application transport network link physical Hl Hn Ht M network link physical Hn Ht M router Introduction: 1-17 Sheet 1: Question 10 What are two reasons for using layered protocols? What is one possible disadvantage of using layered protocols? Advantages: ➢ Layering makes it easier to design and manage each module (structured way to discuss system components). ➢ Layering eases maintenance and updating of system. Sheet 1: Question 10 What are two reasons for using layered protocols? What is one possible disadvantage of using layered protocols? Disadvantages: ➢ The performance of a layered system is likely to be worse than the performance of a monolithic system, as one layer may duplicate lower-layer functionality. For example, many protocol stacks provide error recovery on both a per-link basis (data-link layer) and an end-to-end basis (Transport layer). ➢ Another drawback is that functionality at one layer may need information (for example, a timestamp value) that is present only in another layer. Sheet 1: Question 16 A system has an n-layer protocol hierarchy. Applications generate messages of length M bytes. At each of the layers, an h-byte header is added. What fraction of the network bandwidth is filled with headers? Sheet 1: Question 16 A system has an n-layer protocol hierarchy. Applications generate messages of length M bytes. At each of the layers, an h-byte header is added. What fraction of the network bandwidth is filled with headers? ➢ Total header size = n × h = nh ➢ Total size of message with headers = M + nh ➢ Fraction of wasted bandwidth with headers = nh/(nh+M) Sheet 1: Question 27 Suppose the algorithms used to implement the operations at layer k is changed. How does this impact operations at layers k − 1 and k + 1? It has no impact on the operations at layers k-1 or k+1. Packet delay: four sources A ____________ B dproc Processing delay dqueue queueing delay ▪ check bit errors ▪ determine o/p link ▪ typically < microsecs ▪ time waiting at output link for transmission ▪ depends on congestion level of router dtrans transmission delay dprop propagation delay ▪ d: length of physical link ▪ L: packet length (bits) ▪ R: link transmission rate ▪ s: propagation speed (~2x108 m/sec) (bps) ▪ dprop = d/s ▪ dtrans = L/R dtotal = dproc + dqueue + dtrans + dprop Sheet 1: Question 23 An image is 1600 × 1200 pixels with 3 bytes/pixel. Assume the image is uncompressed. How long does it take to transmit it over a 56-kbps modem channel? Over a 1-Mbps cable modem? Over a 10-Mbps Ethernet? Over 100-Mbps Ethernet? Over gigabit Ethernet? Image size L = 1600 × 1200 × 3 = 5.76 × 106 bytes = 46.08 × 106 bits Transmission delay = L / R If R = 56× 103 bit/sec: delay = (46.08 × 106 ) / (56× 103) = 822.857 sec If R = 1× 106 bit/sec: delay = (46.08 × 106 ) / (1× 106) = 46.08 sec If R = 10× 106 bit/sec: delay = (46.08 × 106 ) / (10× 106) = 4.608 sec If R = 100× 106 bit/sec: delay = (46.08 × 106 ) / (100× 106) = 0.4608 sec If R = 1× 109 bit/sec: delay = (46.08 × 106 ) / (1× 109) = 0.04608 sec = 46.08 msec Sheet 1: Question 25 List two advantages and two disadvantages of having international standards for network protocols. Advantages: ➢ Makes communication easier. ➢ The widespread use of any standard will give it economies of scale, as with VLSI chips. Sheet 1: Question 25 List two advantages and two disadvantages of having international standards for network protocols. Disadvantages: ➢ Once a standard has been widely adopted, it is difficult to change even if new and better techniques or methods are discovered. ➢ By the time a standard has been accepted, it may be obsolete. ➢ The political compromises necessary to achieve standardization may lead to poor standards. Sheet 1: Question 20 When a file is transferred between two computers, two acknowledgement strategies are possible. In the first one, the file is chopped up into packets, which are individually acknowledged by the receiver, but the file transfer as a whole is not acknowledged. In the second one, the packets are not acknowledged individually, but the entire file is acknowledged when it arrives. Discuss these two approaches. Acknowledgement per packet Acknowledgement per file Higher number of acknowledgment messages. Saves network bandwidth by using a smaller number of acknowledgment messages. An efficient approach for unreliable transmission lines as only the lost packet would have to be re-transmitted. An efficient approach for reliable transmission lines, and inefficient for high-loss transmission lines as it requires the entire file to be retransmitted if even a single packet is lost. Sheet 1: Question 21 Mobile phone network operators need to know where their subscribers’ mobile phones (hence their users) are located. Explain why this is bad for users. Now give reasons why this is good for users. Having mobile phone operators know the location of users lets the operators learn much personal information about users, such as where they sleep, work, travel, and shop. This information might be sold to others or stolen. It could also let the government monitor citizens. On the other hand, knowing the location of the user lets the operator send help to the right place in an emergency. Introduction: 1-29 AND OR Introduc tion: 130 Sheet 1: Question 9 A disadvantage of a broadcast subnet is the capacity wasted when multiple hosts attempt to access the channel at the same time. As a simplistic example, suppose that time is divided into discrete slots, with each of the n hosts attempting to use the channel with probability p during each slot. What fraction of the slots will be wasted due to collisions? Probability of collision in a given slot Node 1 1 1 Node 2 2 2 Node 3 3 C 1 1 2 3 E C S E C 3 E S S C: collision S: success E: empty Sheet 1: Question 9 A disadvantage of a broadcast subnet is the capacity wasted when multiple hosts attempt to access the channel at the same time. As a simplistic example, suppose that time is divided into discrete slots, with each of the n hosts attempting to use the channel with probability p during each slot. What fraction of the slots will be wasted due to collisions? For each time slot: σ 𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑖𝑒𝑠 𝑜𝑓 𝑎𝑙𝑙 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑒𝑣𝑒𝑛𝑡𝑠 = 1 Probability of a collision = 1 – (Probability of successful transmission + Probability of idle slot) Probability of idle slot = Probability (Node_1 not transmitting and Node_2 not transmitting …. and Node_n not transmitting) Probability of idle slot = (1 – p) (1 – p ) …. (1 – p) for n nodes = (1 – p )n Sheet 1: Question 9 (Continued) • Probability of successful transmission for node_1 = Probability that node_1 will transmit and all other nodes not transmitting = Probability (Node_1 transmitting and Node_2 not transmitting and Node_3 not transmitting …. and Node_n not transmitting) = p(1 – p)n-1 • Probability of successful transmission from any node = Probability (successful transmission from Node_1 OR successful transmission from Node_2 OR ….. OR successful transmission from Node_N) = p(1 – p)n-1 + p(1 – p)n-1+ ………… + p(1 – p)n-1 = n×p (1-p)n-1 = np(1 – p)n-1 Sheet 1: Question 9 (Continued) • Wasted fraction of slots = Probability of a collision = 1 – (Probability of successful transmission + Probability of idle slot) = 1 – np(1 – p)n-1 – (1 – p )n Notes if we have N users, and each of them can transmit at any time with probability p: • The probability that all users transmit at the same time = Probability (User_1 transmitting and User_2 transmitting and User_3 transmitting …. and User_N transmitting) = pN • The probability that all users will not transmit at a given time = Probability (User_1 not transmitting and User_2 not transmitting and User_3 not transmitting …. and User_N not transmitting) = (1-p)N • The probability that a specific user (e.g. 1st user) is transmitting while others are not = Probability (User_1 transmitting and User_2 not transmitting and User_3 not transmitting …. and User_N not transmitting) = p(1 – p)N-1 • The probability that any user is transmitting while others not = Probability (User_1 only transmits OR User_2 only transmits OR ….. OR User_N only transmits) = Probability (User_1 transmitting and all other users not transmitting) + Probability (User_2 transmitting and all other users not transmitting) + …. + Probability (User_N transmitting and all other users not transmitting) = N×p (1-p)N-1 Sheet 1: Question 9 A disadvantage of a broadcast subnet is the capacity wasted when multiple hosts attempt to access the channel at the same time. As a simplistic example, suppose that time is divided into discrete slots, with each of the n hosts attempting to use the channel with probability p during each slot. What fraction of the slots will be wasted due to collisions? Probability of collision in a given slot Node 1 1 1 Node 2 2 2 Node 3 3 C 1 1 2 3 E C S E C 3 E Another Solution??? S S C: collision S: success E: empty Sheet 1: Question 9 (Alternative solution) A disadvantage of a broadcast subnet is the capacity wasted when multiple hosts attempt to access the channel at the same time. As a simplistic example, suppose that time is divided into discrete slots, with each of the n hosts attempting to use the channel with probability p during each slot. What fraction of the slots will be wasted due to collisions? Probability Collision = P Any 2 nodes transmitting + P Any 3 nodes transmitting + P Any 4 nodes transmitting + ⋯ + P(N nodes transmitting) 𝑛 n = × 𝑝𝑖 × (1 − 𝑝)n−i 𝑖 𝑖=2 Thanks
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )