Sie sind auf Seite 1von 6

Distributed Networks 303

Assignment 1

Muhammad Nasir Masood


7E2A9729/ 16313008

Distributed Networks 303 .. Assignment 1 2013

Question 1:

Consider sending voice from host A to host B over a packetswitched network. Host A converts analog voice to a digital 64 Kbps bit stream on the fly. Host A then groups the bits into 48-byte packets. There is one link between hosts A and B; its transmission rate is 1Mbps and its propagation delay is 1msec. As soon as host A gathers a packet, it sends it to host B. As soon as host B receives an entire packet, it converts the packets bits to an analog signal. How much time elapses from the time a bit is created (from the original analog signal at host A) unit the bit is decoded (as part of the analog signal at host B)?
Answer:

Other bits belonging to the same packet need to be generated before first bit of a packet. So = 6ms = 0.384 ms

The time to transmit this required is The propagation is 1 ms

Therefore, the delay until decoding is: 6ms + 0.384 +1ms = 7.384 ms

Question 2: Suppose users share a 1Mbps link. Also suppose each user requires 100Kbps when transmitting, but each user transmits only 20% of the time. a) When circuit switching is used, how many users can be supported? (5 marks) b) For the remainder of the problem, suppose packet switching is used. Find the probability that a given user is transmitting. (5 marks) c) Suppose there are 20 users. Find the probability that at any given time, exactly n users are transmitting simultaneously. (10 marks) d) Find the probability that there are 11 or more users transmitting simultaneously. (10 marks)

Distributed Networks 303 .. Assignment 1 2013

Answers: a) Total transmission rate = 1 Mbps Minimum transmission rate required by each user = 100 kbps Therefore = 10.24

So, around 10 users can support the link. b) Each user transmit only 20% of the time So the probability that a user is transmitting is c) Total number of users = 20 Number of users transmitting = n Since each user transmit 20 % of the time Hence probability p = = 0.2 and q= (1-p) = 0.8 Probability of n users transmitting simultaneously by using binominal distribution is (0.2) n (0.8) 20 - n

= 0.2

d) No. of users = 20 No. of user transmitting R= 11 Probability of each user P = 20 percent q = (1-p) = 0.8 1- ( ) (less than 11 user)

Distributed Networks 303 .. Assignment 1 2013

Question 3: Please explain briefly how multiple users behind a NAT router can share one IP address. Answer: NAT (Network Address Translation) is a method which connects multiple devices to internet using just one public IP address which means only one single unique public IP address is enough to connect home users and small businesses to Internet easily, cheaply and efficiently.

For example PC-A wants to access Google.com, the source IP address is 192.168.32.10 but when packet reaches to NAT router, the router change PC-A IP address to public IP address 215.37.32.203 which is assigned to router by ISP. When router receives response from Google to router, router knows the source of request and forwards it to PC. NAT dont do all this alone, PAT (Port Address Translation) also help along with it. Both together do many-to-one translation which means is source IP addresses and their port numbers. In PC there are about 65,536 ports which actually uses by different applications to let the network and system know the specific request of a specific application over network.

Distributed Networks 303 .. Assignment 1 2013

This table is called Address Translation Table set and stored in router. What here router is doing is actually saves the users IP address and their ports to this table and replacing it with public IP address assign it by ISP. And router also replacing port numbers by generating its own numbers so that when response will come back, router forward the packets in home network according to entries is address translation table. Like in first entry PC-A has IP address 192.168.32.10 and request came from port 400, now source IP address is replaced by 215.37.32.203 with port 1. Now anyone from world wants to communicate with PC will believe that PC-A has 215.37.32.203 with port 1. The number of simultaneous translation of IP addresses that a router support depends upon DRAM (Dynamic Random Access Memory) it has. But its actually just typical table only takes 160 bytes, so the router with 4 MB of DRAM could process 26214 translations.

Question 4: a) A network on the Internet has a subnet mask of 255.255.240.0. What is the maximum number of hosts it can handle? Answer: Subnet Mask 255.255.255.240.0 In binary notation 11111111 11111111 11110000 00000000 Therefore 212 2 = 4094 hosts

b) A router has the following (CIDR) entries in its routing table: Address/mask 135.46.56.0/22 135.46.60.0/22 135.46.48.0/20 192.53.40.0/23 Next hop Interface 0 Interface 1 Interface 2 Router 1

Distributed Networks 303 .. Assignment 1 2013


default Router 2

For each of the following IP addresses, what does the router do if a packet with that address arrives? 1) 2) 3) 4) 5) 135.46.63.10 135.46.121.14 135.46.52.2 192.53.41.7 192.53.57.7

Answer: Address / Mask 135.46.56.0/22 135.46.60.0/22 135.46.48.0/20 192.53.40.0/23 Binary Address 10000111 00101110 10000111 00101110 10000111 00101110 11000000 00110101

00111000 00111100 00110000 00101000

00000000 00000000 00000000 00000000

1) 135.46.63.10 = 10000111 00101110 00111111 00001010 This matches the 2nd network mask so the packet will forward to Interface 1. 2) 135.46.121.14 = 10000111 00101110 01111001 00001110 This doesnt match with any network masks so router sends this packet to the default, Router 2. 3) 135.46.52.2 = 10000111 00101110 00110100 00000010 This matches with 3rd network address so the packet will forward to Interface 2. 4) 192.53.41.7 = 11000000 00110101 00101001 00000111 This matches with 4th network address so the packet will forward to Router 1. 5) 192.53.57.7 = 11000000 00110101 00111001 00000111 This doesnt match with any network masks so router sends this packet to the default, Router 2.

Das könnte Ihnen auch gefallen