I want to find a formula with it I can find the number of the communication that can occur at the same time (different combination) in f port router for network on chip.
In network on chip's router there are 5 port and each port has input and output.
5 is the maximum number of communication that can happen at the same time. Here an example:
input 1 -> output 2
input 2 -> output 3
input 3 -> output 4
input 4 -> output 5
input 5 -> output 1
I want to calculate how many combinaison I can have.
I could only figure out that the question is based on mathematics and has nothing to do with the networking and probability tags!
As you mentioned
In each port the input cannot communicate with other inputs and cannot communicate with the output in the same ports.
So, assuming one port communicating via input,
the port can communicate with only 4 output of other ports and not with the 4 input of the other ports and also not with the output of the same port.
So,net communication in this case while considering 5 inputs = 5*4 = 20.
Similarly,for the output case, the overall communications = 5*4 = 20.
Therefore,net communication done= 20 + 20 = 40.
If duplication while communicating is not considered(taken into account), then the total communication for input & output for all ports= 2 * 5 Combination 2 = 2 * 10 = 20.
Related
I currently learn about TCP protocol and about 3 way-handshake. I cannot figure out how I can calculate the number of bytes transmited in this TCP session. I understand that in the first 3 and in the last 4 it's connection establishment and closing connection but between 4-11 I don't know to count the bytes
TCP session
Looking at frames 4 to 6 of your attachment:
172.20.1.21.1303 > 172.20.0.81.23: P 1:22(21) ack 1 win 65535
172.20.0.81.23 > 172.20.1.21.1303: P 1:13(12) ack 22 win 61299
172.20.1.21.1303 > 172.20.0.81.23: P 22:25(3) ack 13 win 65523
Frame 4 is from host A to B. The first number (1) after the 'P' flag is the (relative) sequence number of the first data byte of this segment, and the number in brackets (21) is the length of that segment in bytes.
Frame 5 is response from host B to A. The value after 'ack' (22) is host B telling host A that B has received bytes 1 to 21, and that it expects sequence number 22 next.
Frame 6 is the next segment from A to B. Sure enough, the sequence number is 22, which matches what B is expecting, and this time the length is 3 bytes.
If you then look at the final frames of the sequence, we can see in frame 12 that Host B has a sequence number of 1052, meaning it has sent 1052 bytes over the course of the connection (and the ack in frame 13 confirms this). Similarly, frame 14 shows that Host A sent 107 bytes (and the ack in frame 15 confirms this).
Given the following table, where the network is using 8-bit host addresses, I am asked to compute the associated range of destination host addresses for every interface. Then I am also asked about the number of addresses in every range.
Table:
prefix match Interface
00 0
010 1
011 2
10 2
11 3
I determined that I am given the prefixes of the 8-bit binary IP's and the concluded that:
00000000 to 00111111 (0-63 in decimal) uses interface 0
addresses in the range = 2 to the power of (8 - the number of bits in the prefix, so 2) = 64
01000000 to 01011111 (64-95 in decimal) uses interface 1
addresses in range = 2^(8-3) = 32
01100000 to 10111111 (96-191 in decimal) uses interface 2
addresses in range = 2^5 = 32
11000000 and higer (192+ in decimal) uses interface 3
addresses in range = 2^5 = 32
Is my reasoning correct?
The number of addresses in each range is 2(8 - prefixlen). So if the prefix has 2 bits, the number of addresses is 26 = 64.
I have this 3-axis dongle serial accelerometer connected using RS-232 cable. I am putting the baud rate as 9600 and im getting 80 XXXX-YYYY-ZZZZ readout per second. I am trying to justify why does it shows 80 readings in a second, and here is my calculation,
2 Bytes of data x (1 Start bit + 1 Stop bit + 8 bits) = 20 bits
20 bits x 3 axis x 80 readouts = 4800 bits
While im getting 4800 bits instead of 9600 bits, so i am wondering did i miss out anything in justifying the 80 readouts?
Thanks guys :)
You indicate that you're getting 80 XXXX-YYYY-ZZZZ readouts per second. I'm assuming this is ASCII, so each digit is one byte.
So each "message" is len('XXXX-YYYY-ZZZZ')*8 = 112 bits long. Add a start and stop bit and you have 114. Multiply that times 80 messages per second, and you're transmitting 9120 bits per second, which is much close to the theoretical limit.
I am trying to understand how to calculate the throughput for a sliding window data transmission, by solving some numerical examples. Below is the example followed by my analysis.
Example
Host A is sending data to Host B over a full duplex link. A and B are using sliding window protocol, with send and receive window sizes of 5 each. Data packets sent only from A to B, are 1000 bytes each in size, and transmission time for one such packet is 50 us. Propagation delay is 200 us. Assume Ack packets need negligible transmission time. What is the maximum achievable throughput in Mbps?
A. 7.69 B. 11.11 C. 12.33 D. 15.00
Analysis
Round trip-time is 2 * 200 us = 400 us. ... A
Time required to fill the sending window = window size (5) * transmission time of 1 packet (50 us) = 250 us. ... B
Since B < A, sender has to wait for ack to 1st packet before sending the 6th packet. This ack appears at 450 us. (round-trip time is 400 us.)
Between 250 us and 450 us, the sender is idle, that is no new data is being sent over the line.
Assuming sender has an unlimited supply of data frames, the above cycle would repeat.
Thus, in every 450 us, sender sends 5 packets = 5 * 1000 * 8 = 40000 bits of data.
Hence, throughput = 40000 bits / 450 us = 84.7710 megabits per second. (84.7710 Mbps)
However, this is not one of the given options, not even close! Is there any mistake in my analysis above?
As I stated in my comment, your analysis and calculation method is correct. However, I'd check my calculator if I were you because 40000 bits / 450 us = 88.88...Mbps, not 84.7710 Mbps.
I do not think it is mere coincidence that 88.88 is just 11.11*8, so it's a fair assumption that the question was actually asking to get megabytes per second instead of megabits per second.
Throughput = Window /RTT
Here Window size = 5*1000 bytes = 5000 bytes.
RTT = 50us + 2*200 us=> 450us.
Therefore Throughput= 5000 bytes/450 us = 11.11Mpbs
Does anyone know how many host bits are needed to guarantee that a subnet could have 9 usable hosts?
I was thinking about around 4, but I'm not sure. Can some shed some light on this?
Two subnet addresses (all-ones and all-zeros) can't be used to indicate a host, so with N bits you get up to (2**N - 2) usable hosts. So, for 9 hosts, 4 bits is correct: it would do up to 14, but 3 bits would do only 6 hosts.
Here are networks that meet the requirement 192.168.1.0 /28
Mask:255.255.255.240 Host/Net - 14
Network Broadcast
192.168.1.0 192.168.1.15
192.168.1.16 192.168.1.31
192.168.1.32 192.168.1.47
192.168.1.48 192.168.1.63
192.168.1.64 192.168.1.79
192.168.1.80 192.168.1.95
192.168.1.96 192.168.1.111
192.168.1.112 192.168.1.127
192.168.1.128 192.168.1.143
192.168.1.144 192.168.1.159
192.168.1.160 192.168.1.175
192.168.1.176 192.168.1.191
192.168.1.192 192.168.1.207
192.168.1.208 192.168.1.223
192.168.1.224 192.168.1.239
192.168.1.240 192.168.1.255
We can calculate number of host bit by 2 methods:
We require 9 usable hosts
So converting 9 into binary we have 00001001.
Now,
128 64 32 16 8 4 2 1
0 0 0 0 1 0 0 1
count from right to left now, till the last on bit
so into 00001001 we have last on bit at 1
get the borrow bit till last on bit, that is 4
now for if we are calculating for class c , than the default subnet mask is
255.255.255.00000000
Now for calculation we off the bits where as for network we on the bit
so for host off 4 bits from right to left and on the rest left bits.
here 4 is the borrow bit that was calculated earlier
255.255.255.11110000
now taking only the last bit of subnet mask,
128 64 32 16 8 4 2 1
1 1 1 1 0 0 0 0
the increment value is 16
Note: increment value is calculated as last on bit from left to right.
so we will have a network of 128+64+32+16= 240
for class 'C' we have 192.168.1.0/28 or 192.168.1.0 255.255.255.240
number of host: 192.168.1.0
192.168.1.16
this is the first network, here we have 192.168.1.0 as network IP and 192.168.1.15 as broadcast IP
so from 192.168.1.1 to 192.168.1.14 are the usable IP or host that claculates to 14 usable host.
2nd method
we have the formula of claculating the host as 2^(n)-2
here n are off bits
from the 1st method we have number of off bit is 4
so 2^4 - 2= 16-2 = 14
hence we will get a slot of 14 usable host from which we can use 9
NOTE: The network class taken above is just an example which does not have any effect on increment bit calculation.Similarly we can calculate for class A and B