Final Exam
A main router is assigned a class B network address. If the subnet mask of the router is 255.255.252.0. Determine the maximum number of subnets that the router can support?
1022
For the given IP address 10.193.68.118/19 answer the following questions: 1. Subnet mask 2. Number of subnets 3. Block-size for the subnet mask 4. Valid subnets 5. Total hosts per subnet 6. Valid hosts per subnet
1. 2585.255.224.0 2. 2048 3. 8192 4. 2046 5. Subnet Number of hosts /19 8192 /20 4096 /21 2048 /22 1024 /23 512 /24 256 /25 128 /26 64 /27 32 /28 16 /29 8 /30 4 6. Valid hosts per subnet /19 8190 /20 4094 /21 2046 /22 1022 /23 510 /24 254 /25 126 /26 62 /27 30 /28 14 /29 6 /30 2
What is the IP address 129.17.129.97 in binary?
10000001.00010001.100000001.01100001
Using the CSMA/CD back-off algorithm, compute the conditional probabilities of two nodes A and B having collision numbers as 1 and 3 respectively. Illustrate the probability of A's and B's chance for winning the collision and the chance for a no collision.
A B State 0 0 Collision 0 1 A wins 0 2 A wins 0 3 A wins 0 4 A wins 0 5 A wins 0 6 A wins 0 7 A wins 1 0 B wins 1 1 Collision 1 2 A wins 1 3 A wins 1 4 A wins 1 5 A wins 1 6 A wins 1 7 A wins Probability of having a collision = 2 / 16 = 1 / 8 Probability for A's chance for winning the collision = 13 / 16 Probability for B's chance for winning the collision = 1 / 16 Probability of having no collision = 1 - Probability of having a collision = 1 - ( 1/8 ) = 7 / 8 .
See image for question.
Answer: Part-1 To send a datagram from Host C to Host D, Host C will not ask the router to forward a datagram because Host C and D are on the same network. If the source and destination host are on the same network then source encapsulate data in the frame, binds the destination IP address to MAC address and send the frame directly to the destination. Source IP Address: 128.119.121.231 Source MAC Address: 05-C9-5A-5E-BF-B9 Destination IP Address: 128.119.121.112 Destination MAC Address: 88-14-BA-B7-05-64
See image for question.
Answer: Yes C needs to perform ARP query to get MAC address of A because final delivery that means Host to Host is done by the Data link layer. Data link layer required the MAC address to send the datagram to A. In this scenario when Host C sends datagram then router forward the datagram to the network of Host A. In the network of Host A there will be many hosts. So to send a datagram to A, we require the MAC address of Host A. Source IP Address: 128.119.121.231 Source MAC Address: 05-C9-5A-5E-BF-B9 Destination IP Address: 128.119.181.138 Destination MAC Address: 59-2A-33-B1-91-2B
Using the CSMA/CD back-off algorithm, compute the conditional probabilities of two nodes A and B having collision numbers as 2 and 2 respectively. Illustrate the probability of A's and B's chance for winning the collision and the chance for a no collision.
B and A winning = 3/8 no collisions = 3/4
What is CSMA/CA?
Carrier sense multiple access/collision avoidance. It's a standard in which the wireless node listens to see if another node is broadcasting data. If so, it waits a random time and retries. Sender first transmits small request-to-send (RTS) packets to BS using CSMA. BS broadcasts clear-to-send CTS in response to RTS. CTS heard by all nodes: Sender transmits data frame Other stations defer transmissions
This problem builds on the answer to the previous problem; you'll need to use the answer to the previous problem to do this problem. Assume now that there are two receivers. Receiver 1 wants to obtain the two data bits sent from sender 1 and knows sender 1's CDMA code; similarly, receiver 2 wants to receive the two data bits sent from sender 2 and knows sender 2's CDMA code. Both receivers receive the 16 mini slotted bits in the combined channel, that is, the sum of the mini-slotted bits sent by sender 1 and sender 2. These 16 bits are shown in the three leftmost grey-shaded boxes in the figure below (all three boxes contain this same 16- bit sequence). Perform the CDMA decoding operation for each receiver, that is, calculate the values of and shown in the figure below. This will show you that a receiver can indeed calculate the original bits sent by the sender in which it is interested.
Channel content: Z1: 2, 2, -2, -2 Z2: -2, -2, 2, 2 Receiver 1: {2, 2, -2, -2}, {-2, -2, 2, 2} d1/1 = -1 d1/0 = 1 Receiver 2: {2, 2, -2, -2}, {-2, -2, 2, 2} d2/1 = 1 d2/0 = -1
Consider a subnet with prefix 128.119.40.128/26. Give an example of one IP address (of form xxx.xxx.xxx.xxx) that can be assigned to this network. Suppose an ISP owns a block of addresses in the form 128.199.40.64/26. Suppose it wants to create four subnets from this block, with each block having the same number of IP addresses. What are the prefixes (of form a.b.c.d./x) for the four subnets?
IP range: 128.119.40.128 to 128.119.40.191 Four subnets: 128.119.40.64/28 128.119.40.80/28 128.119.40.96/28 128.119.40.112/28
See image for question.
Number of fragments = 4 Fragment ID: 422 for each Last fragment size: 700 bytes Last datagram: 360 Offset: 0, 85, 170, 255 First 3 fragment will have flag = 1 Last fragment will have flag = 0
Consider the single-sender CDMA example in the following figure: What would be the sender's output (for the 2 data bits shown) if the sender's CDMA code were (1, -1, 1, -1, 1, -1, 1, -1)?
Output related to bit d1 = [-1,1,-1,1,-1,1,-1,1] Output related to bit d0 = [1,-1,1,-1,1,-1,1,-1]
See image for question.
Prefixes: 00000000, 01010101, 0101011 Link interfaces: 0, 1, 2 Ranges: 00000000 00000000 00000000 00000000 - 00000001 11111111 11111111 11111111 01010101 00000000 00000000 00000000 - 01010101 11111111 11111111 11111111 01010110 00000000 00000000 00000000 - 01010111 11111111 11111111 11111111 IP: 33554432, 16777216, 33554432
In this example, we consider a CDMA scenario with two senders and two receivers. The chipping rate is 8 mini-slots for each data bit, that is, M = 8, as shown in Figure 6.4 in the textbook. The 8-bit CDMA code for sender 1 is 1, -1, 1, -1, 1, -1, 1, and 1. The 8-bit CDMA code for sender 2 is 1, 1, 1, -1, 1, 1, -1, and -1, as shown in the figure below. Sender 1 has two data bits to send: a 1 followed by a -1; sender 2 also has two data bits to send: a -1 followed by a 1. Compute the sequence of mini slot bits sent into the channel by sender 1 and by sender 2. Also compute the combined bit values on the channel. The figure below shows the first two mini-slot bits sent by each sender, and the first two mini-slot combined bits values in the channel. You should compute the values for the remaining 14 mini-slots, that is, for the gray-shaded regions in the figure to the right.
Sender 1: Slot 1 output: -1, 1, -1, 1, -1, 1, -1, -1 Slot 0 output: 1, -1, 1, -1, 1, -1, 1, 1 Sender 2: Slot 1 output: 1, 1, 1, -1, 1, 1, -1, -1 Slot 0 output: -1, -1, -1, 1, -1, -1, 1, 1 Channel content: Z1: 2, 2, -2, -2 Z2: -2, -2, 2, 2
For the given IP address 128.168.0.1/20, calculate the Subnet mask, Network address, total number of host addresses possible in the network and possible range of host addresses?
Subnet mask: 255.255.240.0 Network address: 128.168.0.0 Total number of address per subnet: 4096 Range: 128.168.0.1 to 128.168.15.254
For the given IP address 196.62.146.174/25, answer the following questions: a.Subnet Mask b.Number of Subnets c.Block-size for the subnet mask d.Valid Subnets e.Total Hosts f.Valid Hosts per subnet g.Broadcast address of each subnet h.Network address of each subnet
a. 255.255.255.0 b. 2 c. 128 d. 2 e. 126 f. 126 g. 196.62.146.127 and 196.62.146.255 h. 196.62.146.0 and 196.62.146.128
See image to answer question.
a. As given in the question that host 10.0.0.2 initiates a connection at port 5500 to reach to a web server listening at port 80 at 128.119.40.186, so the NAT table for this scenario will be as follows: Private Ip Address &port Public Ip Address & port 10.0.0.2, 5500 138.76.29.7, 5001 10.0.0.1, 5501 138.76.29.7, 5002 10.0.0.3, 5502 138.76.29.7, 5003 b. b. The source Ip addresses arriving at WAN side of the router with interface address 138.76.29.7 will be same as 138.76.29.7 but the port numbers will change when reaching the destination. And while coming back from destination web server, the source IP address will be that of the web server that is, 128.119.40.186, 80 and the destination Ip address will be of the WAN side router i.e., 138.76.29.7, 5001 for host 10.0.0.2, 5500 and 138.76.29.7, 5002 for host 10.0.0.1, 5501 and 138.76.29.7, 5003 for host 10.0.0.3, 5502.
Look at image for question. Answer letter C.
x.y.z/24