0% found this document useful (0 votes)
43 views15 pages

CN Probles of All Modules

The document discusses computer network concepts including: 1. ARP request and response messages that allow a host to determine the physical address of another host on the same network when only the IP address is known. 2. Factors that allow a pure ALOHA network to be collision-free including limiting the generation of frames to less than one per vulnerable period. 3. Examples of calculating throughput for different load levels in pure ALOHA and slotted ALOHA networks.

Uploaded by

darshangondkar15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views15 pages

CN Probles of All Modules

The document discusses computer network concepts including: 1. ARP request and response messages that allow a host to determine the physical address of another host on the same network when only the IP address is known. 2. Factors that allow a pure ALOHA network to be collision-free including limiting the generation of frames to less than one per vulnerable period. 3. Examples of calculating throughput for different load levels in pure ALOHA and slotted ALOHA networks.

Uploaded by

darshangondkar15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

Subject Code:18EC71 Subject Name: Computer Networks Course handling Faculty:


Semester:7th Mrs.Chaitra S N

Module 2
A host with IP address N1 and MAC address L1 has a packet to send to another host with IP address N2
and physical address L2 (which is unknown to the first host). The two hosts are on the same network.
Figure 9.9 shows the ARP request and response messages.

Example problem 2
A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is therequirement
to make this frame collision-free?
Solution
Average frame transmission time Tfr is 200 bits/200 kbps or 1 ms. The vulnerable time is 2 × 1 ms = 2 ms.
This means no station should send later than 1 ms before this station starts transmission and no station
should start sending during the period (1 ms) that this station is sending.

Throughput
Let us call G the average number of frames generated by the system during one frame transmission time.
Then it can be proven that the average number of successfully transmitted frames for pure ALOHA is S =
G × e-2G The maximum throughput Smax is 0.184, for G = 1/2. (We can find it by setting the derivative of S
with respect to G to 0;
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

In other words, if one-half a frame is generated during one frame transmission time (one frame during two
frame transmission times), then 18.4 percent of these frames reach their destination successfully. We
expect G = 1/2 to produce the maximum throughput because the vulnerable time is 2 times the frame
transmission time. Therefore, if a station generates only one frame in this vulnerable time (and no other
stations generate a frame during this time), the frame will reach its destination successfully.

Example 12.3
A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is the
throughput if the system (all stations together) produces
a. 1000 frames per second?
b. 500 frames per second?
c. 250 frames per second?
Solution
The frame transmission time is 200/200 kbps or 1 ms.
a. If the system creates 1000 frames per second, or 1 frame per millisecond, then G = 1. In this case S = G
× e-2G = 0.135 (13.5 percent). This means that the throughput is 1000 × 0.135 = 135 frames. Only 135
frames out of 1000 will probably survive.
b. If the system creates 500 frames per second, or 1/2 frames per millisecond, then G = 1/2. In this case S =
G × e-2G = 0.184 (18.4 percent). This means that the throughput is 500 × 0.184 = 92 and that only 92 frames
out of 500 will probably survive. Note that this is the maximum throughput case, percentagewise. If the
system creates 250 frames per second, or 1/4 frames per millisecond, then G = 1/4. In this case S = G × e-2G
= 0.152 (15.2 percent). This means that the throughput is 250 × 0.152 = 38. Only 38 frames out of 250 will
probably survive.

Example 12.4
A slotted ALOHA network transmits 200-bit frames using a shared channel with a 200-kbps bandwidth.
Find the throughput if the system (all stations together) produces
a. 1000 frames per second.
b. 500 frames per second.
c. 250 frames per second.
Solution
This situation is similar to the previous exercise except that the network is using slotted ALOHA instead of
pure ALOHA. The frame transmission time is 200/200 kbps or 1 ms.
a. In this case G is 1. So S = G × e−G = 0.368 (36.8 percent). This means that the throughput is 1000 ×
0.0368 = 368 frames. Only 368 out of 1000 frames will probably survive. Note that this is the maximum
throughput case, percentagewise.
b. Here G is 1/2. In this case S = G × e−G = 0.303 (30.3 percent). This means that the throughput is 500 ×
0.0303 = 151. Only 151 frames out of 500 will probably survive.
c. Now G is 1/4. In this case S = G × e−G = 0.195 (19.5 percent). This means that the throughput is 250 ×
0.195 = 49. Only 49 frames out of 250 will probably survive.

Example 12.5

A network using CSMA/CD has a bandwidth of 10 Mbps. If the maximum propagation time (including the
delays in the devices and ignoring the time needed to send a jamming signal, as we see later) is 25.6 μs,
what is the minimum size of the frame?
Solution
The minimum frame transmission time is Tfr = 2 × Tp = 51.2 μs. This means, in the worst case, a station
needs to transmit for a period of 51.2 μs to detect the collision. The minimum size of the frame is 10 Mbps
× 51.2 μs = 512 bits or 64 bytes. This is actually the minimum size of the frame for Standard Ethernet
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

Example 13.1

Show how the address 47:20:1B:2E:08:EE is sent out online.


Solution
The address is sent left to right, byte by byte; for each byte, it is sent right to left, bit by bit, as shown
below:

Example 13.2
Define the type of the following destination addresses:
a. 4A:30:10:21:10:1A
b. 47:20:1B:2E:08:EE
c. FF:FF:FF:FF:FF:FF
Solution
To find the type of the address, we need to look at the second hexadecimal digit from the left. If it is even,
the address is unicast. If it is odd, the address is multicast. If all digits are Fs, the address is broadcast.
Therefore, we have the following:
a. This is a unicast address because A in binary is 1010 (even).
b. This is a multicast address because 7 in binary is 0111 (odd).
c. This is a broadcast address because all digits are Fs in hexadecimal.

Example 13.3
In the Standard Ethernet with the transmission rate of 10 Mbps, we assume that the length of the medium is
2500 m and the size of the frame is 512 bits. The propagation speed of a signal in a cable is normally 2 ×
108 m/s.

The example shows that a = 0.24, which means only 0.24 of a frame occupies the whole medium in this
case. The efficiency is 39 percent, which is considered moderate; it means that only 61 percent of the time
the medium is occupied but not used by a station

MODULE 3
EXAMPLE 18.1
A classless address is given as 167.199.170.82/27. We can find the above three pieces of information
as follows. The number of addresses in the network is 232 − n = 25 = 32 addresses.
The first address can be found by keeping the first 27 bits and changing the rest of the bits to 0s.
Address: 167.199.170.82/27 10100111 11000111 10101010 01010010
First address: 167.199.170.64/27 10100111 11000111 10101010 01000000
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

The last address can be found by keeping the first 27 bits and changing the rest of the bits to 1s.
Address: 167.199.170.82/27 10100111 11000111 10101010 01011111
Last address: 167.199.170.95/27 10100111 11000111 10101010 01011111

EXAMPLE 18.2
Repeat Example 18.1 using the mask. The mask in dotted-decimal notation is 256.256.256.224. The AND,
OR, and NOT operations can be applied to individual bytes using calculators and applets at the book
website.

Address: 167.199.170.82/27
10100111 11000111 10101010 01010010

First address: 167.199.170.64/27


10100111 11000111 10101010 01000000

Address: 167.199.170.82/27
10100111 11000111 10101010 01011111

Last address: 167.199.170.95/27


10100111 11000111 10101010 01011111

Number of addresses in the block: N = NOT (mask) + 1= 0.0.0.31 + 1 = 32 addresses


First address: First = (address) AND (mask) = 167.199.170.82
Last address: Last = (address) OR (NOT mask) = 167.199.170.255\

EXAMPLE 18.3
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

EXAMPLE 18.4
An organization is granted a block of addresses with the beginning address 14.24.74.0/24. The organization
needs to have 3 subblocks of addresses to use in its three subnets: one subblock of 10 addresses, one
subblock of 60 addresses, and one subblock of 120 addresses. Design the subblocks.

Solution
There are 232 – 24 = 256 addresses in this block. The first address is 14.24.74.0/24; the last address is
14.24.74.255/24. To satisfy the third requirement, we assign addresses to subblocks, starting with the
largest and ending with the smallest one.
a. The number of addresses in the largest subblock, which requires 120 addresses, is not a power of 2. We
allocate 128 addresses. The subnet mask for this subnet can be found as n1 = 32 – log2128 = 25. The first
address in this block is 14.24.74.0/25; the last address is 14.24.74.127/25.
b. The number of addresses in the second largest subblock, which requires 60 addresses, is not a power of 2
either. We allocate 64 addresses. The subnet mask for this subnet can be found as n2 = 32 – log264 = 26.
The first address in this block is 14.24.74.128/26; the last address is 14.24.74.191/26.
c. The number of addresses in the smallest subblock, which requires 10 addresses, is not a power of 2
either. We allocate 16 addresses. The subnet mask for this subnet can be found as n3 = 32 − log216 = 28.

The first address in this block is 14.24.74.192/28; the last address is 14.24.74.207/28. If we add all
addresses in the previous subblocks, the result is 208 addresses, which means 48 addresses are left in
reserve. The first address in this range is 14.24.74.208. The last address is 14.24.74.255. We don’t know
about the prefix length yet. Figure 18.23 shows the configuration of blocks. We have shown the first
address in each block.
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

Example 18.9
Show the forwarding process if a packet arrives at R1 in Figure 18.33 with the destination address
180.70.65.140.
Solution
The router performs the following steps:
1. The first mask (/26) is applied to the destination address. The result is 180.70.65.128, which does not
match the corresponding network address.
2. The second mask (/25) is applied to the destination address. The result is 180.70.65.128, which matches
the corresponding network address. The next-hop address and the interface number m0 are extracted for
forwarding the packet.
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

Example 19.1
An IPv4 packet has arrived with the first 8 bits as (01000010) 2. The receiver discards the packet Why?
Solution
There is an error in this packet. The 4 leftmost bits (0100)2 show the version, which is correct. The next 4
bits (0010)2 show an invalid header length (2 × 4 = 8). The minimum number of bytes in the header must
be 20. The packet has been corrupted in transmission.

Example 19.2
In an IPv4 packet, the value of HLEN is (1000)2. How many bytes of options are being carried by this
packet?
Solution
The HLEN value is 8, which means the total number of bytes in the header is 8 × 4, or 32 bytes. The first
20 bytes are the base header, the next 12 bytes are the options.

Example 19.3
In an IPv4 packet, the value of HLEN is 5, and the value of the total length field is (0028)16. How many
bytes of data are being carried by this packet?
Solution
The HLEN value is 5, which means the total number of bytes in the header is 5 × 4, or 20 bytes (no
options). The total length is (0028)16 or 40 bytes, which means the packet is carrying 20 bytes of data (40
− 20).

Example 19.4
An IPv4 packet has arrived with the first few hexadecimal digits as shown.

How many hops can this packet travel before being dropped? The data belong to what upper-layer
protocol?
Solution
To find the time-to-live field, we skip 8 bytes (16 hexadecimal digits). The time-to-live field is the ninth
byte, which is (01)16. This means the packet can travel only one hop. The protocol field is the next byte
(02)16, which means that the upper-layer protocol is IGMP.

Example 19.6
A packet has arrived with an M bit value of 0. Is this the first fragment, the last fragment, or a middle
fragment? Do we know if the packet was fragmented?
Solution
If the M bit is 0, it means that there are no more fragments; the fragment is the last one. However, we
cannot say if the original packet was fragmented or not. A non fragmented packet is considered the last
fragment.

Example 19.7
A packet has arrived with an M bit value of 1. Is this the first fragment, the last fragment, or a middle
fragment? Do we know if the packet was fragmented?
Solution
If the M bit is 1, it means that there is at least one more fragment. This fragment can be the first one or a
middle one, but not the last one. We don’t know if it is the first one or a middle one; we need more
information (the value of the fragmentation offset).
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

Example 19.8
A packet has arrived with an M bit value of 1 and a fragmentation offset value of 0. Is this the first
fragment, the last fragment, or a middle fragment?
Solution
Because the M bit is 1, it is either the first fragment or a middle one. Because the offset value is 0, it is the
first fragment.

Example 19.9
A packet has arrived in which the offset value is 100. What is the number of the first byte? Do we know the
number of the last byte?
Solution
To find the number of the first byte, we multiply the offset value by 8. This means that the first byte
number is 800. We cannot determine the number of the last byte unless we know the length of the data.

Example 19.10
A packet has arrived in which the offset value is 100, the value of HLEN is 5, and the value of the total
length field is 100. What are the numbers of the first byte and the last byte?
Solution
The first byte number is 100 × 8 = 800. The total length is 100 bytes, and the header length is 20 bytes (5
×4), which means that there are 80 bytes in this datagram. If the first byte number is 800, the last byte
number must be 879.

Example 23.5
Assume that, in a Stop-and-Wait system, the bandwidth of the line is 1 Mbps, and 1 bit takes 20
milliseconds to make a round trip. What is the bandwidth-delay product? If the system data packets are
1,000 bits in length, what is the utilization percentage of the link?
Solution
The bandwidth-delay product is (1 × 106) × (20 × 10−3) = 20,000 bits. The system can send 20,000 bits
during the time it takes for the data to go from the sender to the receiver and the acknowledgment to come
back. However, the system sends only 1,000 bits. We can say that the link utilization is only 1,000/20,000,
or 5 percent. For this reason, in a link with a high bandwidth or long delay, the use of Stop-and-Wait
wastes the capacity of the link.

Example 23.6
What is the utilization percentage of the link in Example 23.5 if we have a protocol that can send up to 15
packets before stopping and worrying about the acknowledgments?
Solution
The bandwidth-delay product is still 20,000 bits. The system can send up to 15 packets or 15,000 bits
during a round trip. This means the utilization is 15,000/20,000, or 75 percent. Of course, if there are
damaged packets, the utilization percentage is much less because packets have to be resent.

Example 23.9
Assume a sender sends 6 packets: packets 0, 1, 2, 3, 4, and 5. The sender receives an ACK with ackNo = 3.
What is the interpretation if the system is using GBN or SR?
Solution
If the system is using GBN, it means that packets 0, 1, and 2 have been received uncorrupted and the
receiver is expecting packet 3. If the system is using SR, it means that packet 3 has been received
uncorrupted; the ACK does not say anything about other packets.
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

Module 5
Figure 26.8 shows a scenario in which an electronic store can benefit from the use of cookies. Assume a
shopper wants to buy a toy from an electronic store named BestToys. The shopper browser (client) sends a
request to the BestToys server. The server creates an empty shopping cart (a list) for the client and assigns
an ID to the cart (for example, 12343). The server then sends a response message, which contains the
images of all toys available, with a link under each toy that selects the toy if it is being clicked. This
response message also includes the Set-Cookie header line whose value is 12343. The client displays the
images and stores the cookie value in a file named BestToys. The cookie is not revealed to the shopper.
Now the shopper selects one of the toys and clicks on it. The client sends a request, but includes the ID
12343 in the Cookie header line. Although the server may have been busy and forgotten about this shopper,
when it receives the request and checks the header, it finds the value 12343 as the cookie. The server
knows that the customer is not new; it searches for a shopping cart with ID 12343. The shopping cart (list)
is opened and the selected toy is inserted in the list. The server now sends another response to the shopper
to tell her the total price and ask her to provide payment. The shopper provides information about her credit
card and sends a new request with the ID 12343 as the cookie value. When the request arrives at the server,
it again sees the ID 12343, and accepts the order and the payment and sends a confirmation in a response.
Other information about the client is stored in
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

Content-Transfer-Encoding This header defines the method used to encode the messages
into 0s and 1s for transport. The five types of encoding methods are listed in
Table 26.9.
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

Signature of the Mentor Signature of the H.O.D


Mrs.Chaitra S N Dr. Praveen J

You might also like