Why RIP(Routing Information Protocol ) uses hopcount of 15 hops? [closed] - networking

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm reading one of the Distance vector protocol RIP and come to know maximum hop count it uses is 15 hops but My doubt is why 15 is used as maximum Hop count why not some other number 10,12 or may be 8 ?

My guess is that 15 is 16 - 1, that is 2^4 - 1 or put it otherwise: the biggest unsigned value that holds in 4 bits of information.
However, the metric field is 4 bytes long. And the value 16 denotes infinity.
I can only guess, but I would say that it allows fast checks with a simple bit mask operation to determine whether the metric is infinity or not.
Now the real question might be: "Why is the metric field 4 bytes long when apparently, only five bits are used ?" and for that, I have no answer.

Protocols often make arbitrary decision. RIP is a very basic (and rather old protocol). You should keep that in mind when reading about it. As said above, the max hop count will be a 4 byte field, where 16 is equivalent to infinity. 10 is not a power of 2 number. 8 was probably deemed too small to reach all the routers.
The rationale behind keeping the maximum hop count low is the count to infinity problems. Higher max hop counts would lead to a higher convergence time. (I'll leave you to wikipedia count to infinity problem). Certain versions of RIP use split horizon, which addresses this issue).

Related

BTLE characteristic value has too many bytes [duplicate]

This question already has an answer here:
Decode bluetooth data from the Indoor Bike Data characteristic
(1 answer)
Closed 2 years ago.
I'm trying to read data from the BTLE fitness machine service, specifically the Indoor Bike Data characteristic.
A typical reading I'm getting has the bytes 44-02-9c-09-5c-00-4f-00-50. The first two are flags which indicate that the rest of the bytes represent, in order:
Instantaneous cadence (uint16)
Instantaneous power (sint16)
Heart rate (uint8)
The trouble is, that only accounts for 5 more bytes, but there are 7 more bytes in the value. It looks like 5c-00 is cadence, 00-4f is power, and 50 is heart rate, but
I don't know what the 9c-09 represents, but more importantly,
I don't know how to reliably read this characteristic if it's going to send me data that the flags field says is not present.
What do I need to do to parse these bytes correctly? In this specific case I could maybe skip those two bytes, but that won't be reliable over different device manufacturers.
Update: FWIW I don't think it was correct to mark this as a duplicate. I was able to parse the bytes, the problem was that the result appeared to contradict the fitness machine spec. The accepted answer clarified that.
The 9c-09 value is instantaneous speed, which is present (counterintuitively) if the first flag bit is 0. See Fitness Machine Service spec, section 4.9.1.1.

how to bypass TCP max file size sent? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
According to TCP, sequence number is used to refer to bytes instead of being a counter. The sequence number is 32-bit integer (~4.2 GB).
If I am sending file directly using TCP, I can't exceed this number.
This was okay with old file-systems but now we have files exceeding this size.
I believe Application layer protocols has been modified to bypass this limit, can any provide an example for this or at least list the used techniques?
For reference, the question was based on the following problem
Textbook : Computer Networking: A Top-Down Approach by James F. Kurose , Keith W. Ross.
P26. Consider transferring an enormous file of L bytes from Host A to Host B.
Assume an MSS of 536 bytes.
a. What is the maximum value of L such that TCP sequence numbers are not
exhausted? Recall that the TCP sequence number field has 4 bytes.
If I am sending file directly using TCP, I can't exceed this number.
Yes you can. You are mistaken. It wraps around.
P26. Consider transferring an enormous file of L bytes from Host A to Host B. Assume an MSS of 536 bytes. a. What is the maximum value of L such that TCP sequence numbers are not exhausted? Recall that the TCP sequence number field has 4 bytes.
'Sequence numbers are not exhausted' is a constraint for the purposes of this question, but the authors aren't necessarily thereby claiming that such a limit applies to any TCP transmission. If they are, they're manifestly wrong. Consider that the initial sequence number is chosen randomly, and therefore can be 2^32-1. Does that imply a limit on that connection of one byte? Of course it doesn't.
I also note that the MSS of 536 bytes is entirely irrelevant to the question. Possibly this is just a substandard text.
EDIT I've now located this source. You didn't misunderstand it. There is nothing in the book about TCP sequence number exhaustion except for this stupid question. Nothing about it wrapping around either, which is a curious omission. The MSS is used in the second part of the book problem, not quoted here.

Speed vs Bandwith, ISP's, misconception? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
A lot of ISP's sell their products saying: 100Mbit/s Speed.
However, compare the internet to a packet service, UPS for example.
The ammount of packages you can send every second(bandwith) is something different then the time it takes to arrive(speed).
I know there are multiple meanings of the term 'bandwith' so is it wrong to advertise with speed?
Wikipedia( http://en.wikipedia.org/wiki/Bandwidth_(computing) )
In computer networking and computer science, bandwidth,[1] network
bandwidth,[2] data bandwidth,[3] or digital bandwidth[4][5] is a
measurement of bit-rate of available or consumed data communication
resources expressed in bits per second or multiples of it (bit/s,
kbit/s, Mbit/s, Gbit/s, etc.).> In computer networking and computer
science, bandwidth,[1] network
bandwidth,[2] data bandwidth,[3] or digital bandwidth[4][5] is a
measurement of bit-rate
This part tells me that bandwith is measured in Mbit/s, Gbit/s.
So does this mean the majority of ISP's are advertising wrongly while they should advertise with 'bandwith' instead of speed?
Short answer: Yes.
Long answer: There are several aspects on data transfer that can be measured on an amount-per-time basis; Amount of data per second is one of them, but perhaps misleading if not properly explained.
From the network performance point of view, these are the important factors (quoting Wikipedia here):
Bandwidth - maximum rate that information can be transferred
Throughput - the actual rate that information is transferred
Latency - the delay between the sender and the receiver decoding it
Jitter - variation in the time of arrival at the receiver of the information
Error rate - corrupted data expressed as a percentage or fraction of the total sent
So you may have a 10Mb connection, but if 50% of the sent packages are corrupted, your final throughput is actually just 5Mb. (Even less, if you consider that a substantial part of the data may be control structures instead of data payload.
Latency may be affected by mechanisms such as Nagle's algorythm and ISP-side buffering:
As specified in RFC 1149, An ISP could sell you a IPoAC package with 9G bits/s, and still be true to its words, if they sent to you 16 pigeons with 32GB SD cards attached to them, average air time around 1 hour - or ~3,600,000 ms latency.

linear combination of RTT and bandwidth [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
Maybe it's a stupid question!
Assume a P2P network in which peers independently try to find and connect to good nodes.
good nodes are those that are closer(in term of RTT) and has higher bandwidth.
in this scenario RTT is more important (for example RTT has 90% weight).
I want to obtain the liner combination of RTT and bandwidth in a meaningful way.
but it's obvious that the nature of these two metric is inconsistent.
How can I combine these two metrics ?
One of the key unicast routing protocols (it is a point to point and not P2P), EIGRP, uses several metrics to come up with a single metric. EIGRP is a very popular routing protocol. Delay (aka RTT) and bandwidth are typically the two key params for EIGRP. So, your questions is a relevant one!
This should help:
http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6554/ps6599/ps6630/whitepaper_C11-720525.html
Given the nature of bandwidth and delay, you could have multiple peers scoring the same final metric. For example, you could have one peer, P1, with values B and D. and another peer, P2, with values 2B and 2D. Assuming the bandwidth represents the capacity of the pipe, you would be able to transport a given amount of data with both of these peers in the same time!
You should certainly use a default value of weights, let us say, 0.50/0.5, for these two params. But, you might find that for a given goal (faster routing convergence, say), a different value of weights might be better.

Calculating subnet mask [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I have problem calculating a subnet mask.
Suppose xyz college is planning to setup a small private network with network address 192.168.20.0. The number of departments in the college are 7 and the max no. of host in each department is 25. How to calculate subnet mask?
When I tried to google to find a tutorial for calculating such kind of problems, got nothing.
A mask of /27 will give you 5 bits for the host ip addresses and 5 bits will be enough to represent 25 hosts. Each department can go on a different network, eg: Dept A can be 192.168.20.0/27 and Dept B can be 192.168.21.0/27 etc...
I realize this question is 2 years old but thought I'd add to it if others come here with a homework problem similar to this one. Assuming that each network never needs more than 30 hosts, (it states that 25 will be the most) then you could use 5 host bits and 27 subnet identifier bits for each network.
5 bits can represent 30 hosts because:
2^5 = 32
So 32 numbers can be represented with 5 binary bits.
Subtract 2 because the lowest address in each subnet is the network address while the highest address is the broadcast
32-2=30 assignable addresses
4 bits would not have been enough as (2^4)-2=14.
If you go with more bits, you'll have larger gaps between subnets and potentially wasted addresses.
Generally, these are assigned as the lowest available addresses (at least they will be for the sake of your homework).
192.168.20.0 in binary = 11000000.10101000.00010100.00000000
While sashang's answer works, if this is homework, your professor will be looking for you to update the right most subnet identifier (or network identifier) bits first. We know there are 27 bits in the subnet identifier from the "/27" in CIDR notation. They are the first 27 bits in bold below.
11000000.10101000.00010100.00000000
If you increment from the far right and make 7 subnets, here's the subnet addresses you would get. I'll just bold the binary digits that will change and not the rest of the network address to the left.
11000000.10101000.00010100.00000000 = 192.168.20.0/27
11000000.10101000.00010100.00100000 = 192.168.20.32/27
11000000.10101000.00010100.01000000 = 192.168.20.64/27
11000000.10101000.00010100.01100000 = 192.168.20.96/27
11000000.10101000.00010100.10000000 = 192.168.20.128/27
11000000.10101000.00010100.10100000 = 192.168.20.160/27
11000000.10101000.00010100.11000000 = 192.168.20.192/27

Resources