Get Hop-count between 2 peers - networking

I know I should be asking this question on Network Engineering section of Stack Exchange but it feels like it's a desert there.
I'm trying to build an application that requires the distance between 2 hosts (represented by IP).
I used many methods: one of them is to get the distance at the internet layer of the TCP/IP model; i.e: the hop count between the 2 networks or better to get the bandwidths of the path but I think this information can't be measured because it's a real time info.
I figured out that there should be a graph representing the internet graph which its nodes are the routers (or autonumus systems or sub-networks (I really don't know exactly what type of nodes it should be) and the edges of the graph should be the cables between the nodes which have the bandwidth to be the wieght of the edge.
My Question:
Where can I find this information; whether the full graph or parts of it or something like an API to get 2 IPs and return the shortest path between the 2 IPs.

There is a tool named "Tracert"
You could have it try.
It will represent the routines of peer to peer in internet.
Hope that it make

Related

Optimizing routing table size and a number of hops

I have a bidirectional ring network topology with 9 routers. What would you suggest to reduce the size (number of rows) in a routing table, and a number of hops?
I suggest using a dynamic routing protol such as OSPF or RIP / EIGRP .
using HSRP for switches : https://en.wikipedia.org/wiki/Hot_Standby_Router_Protocol
I think what confusing you is that if every two of the nodes build a connection, the network may become comlpex.
Firstly, since the topology is small, a controller may be a good choice for you. If you don't want it, then you can use some algorithm like dijkstra, OSPF, RIP, or something others like ants colony algorithm, genetic algorithm which can work well in large network.

How to define topology in Castalia-3.2 for WBAN

How can defined topology in Castalia-3.2 for WBAN ?
How can import topology in omnet++ to casalia ?
where the topology defined in default WBAN scenario in Castalia?
with regard
thanks
Topology of a network is an abstraction that shows the structure of the communication links in the network. It's an abstraction because the notion of a link is an abstraction itself. There are no "real" links in a wireless network. The communication is happening in a broadcast medium and there are many parameters that dictate if a packet is received or not, such as the power of transmission, the path loss between transmitter and receiver, noise and interference, and also just luck. Still, the notion of a link could be useful in some circumstances, and some simulators are using it to define simulation scenarios. You might be used to simulators that you can draw nodes and then simply draw lines between them to define their links. This is not how Castalia models a network.
Castalia does not model links between the nodes, it models the channel and radios to get a more realistic communication behaviour.
Topology is often confused with deployment (I confuse them myself sometimes). Deployment is just the placement of nodes on the field. There are multiple ways to define deployment in Castalia, if you wish, but it is not needed in all scenarios (more on this later). People can confuse deployment with topology, because under very simplistic assumptions certain deployments lead to certain topologies. Castalia does not make these assumptions. Study the manual (especially chapter 4) to get a better understanding of Castalia's modeling.
After you have understood the modeling in Castalia, and you still want a specific/custom topology for some reason then you could play with some parameters to achieve your topology at least in a statistical sense. Assuming all nodes use the same radios and the same transmission power, then the path loss between nodes becomes a defining factor of the "quality" of the link between the nodes. In Castalia, you can define the path losses for each and every pair of nodes, using a pathloss map file.
SN.wirelessChannel.pathLossMapFile = "../Parameters/WirelessChannel/BANmodels/pathLossMap.txt"
This tells Castalia to use the specific path losses found in the file instead of computing path losses based on a wireless channel model. The deployment does not matter in this case. At least it does not matter for communication purposes (it might matter for other aspects of the simulation, for example if we are sampling a physical process that depends on location).
In our own simulations with BAN, we have defined a pathloss map based on experimental data, because other available models are not very accurate for BAN. For example the, lognormal shadowing model, which is Castalia's default, is not a good fit for BAN simulations. We did not want to enforce a specific topology, we just wanted a realistic channel model, and defining a pathloss map based on experimental data was the best way.
I have the impression though that when you say topology, you are not only referring to which nodes could communicate with which nodes, but which nodes do communicate with which nodes. This is also a matter of the layers above the radio (MAC and routing). For example it's the MAC and Routing that allow for relay nodes or not.
Note that in Castalia's current implementations of 802.15.6MAC and 802.15.4MAC, relay nodes are not allowed. So you can not create a mesh topology with these default implementations. Only a star topology is supported. If you want something more you'll have to implemented yourself.

What does the term ‘fully-converged’ mean?

What does the term ‘fully-converged’ mean in networking? and again what does it mean "Prone to looping due to convergence".
Im reading about different protocols like R.I.P, OSPF, BGP, and I didn't really understand those terms.
Im looking around but I can't find any specific answers about it.
Any ideas?
When a network contains layer 2 and layer 3 devices, then this devices takes some time to 'understand' the topology of the network.
This is done when the layer 3 devices builds up a table ( routing table) based on the various routes, may be static, dynamic or directly connected routes. This table develops until the complete topology of the network is mapped out in the routing table. Then we can say the network is fully-converged.
Routing-management protocols like RIP, OSPF, and BGP are all about the distribution of information about network paths between and among network nodes. All such protocols tend to have a model where each node has its own view of what some or all of the network-path topology looks like. The nodes exchange information to drive all nodes to a common, "converged", view of the network. A "fully converged" network is one in which all the nodes fully understand the paths through it.

Distance between two wireless mobile nodes

I am currently trying to find the method or mechanism for calculating the distance between two wireless mobile nodes.
Let's say, there are 2 nodes (node B and C) coming in communication with node A. How can node A knows whether node B or node C is nearer than the other?
Is it possible to find it out by using RSSI? or are there any other mechanisms to calculate the distance?
I would appreciate any of your answers or comments.
Thank you in advance.
How about using GPS? Most mobile devices have internal GPS support these days.
The RSSI will give you some indication of distance, but signal may have bounced around and penetrated several walls, so a stronger signal doesn't necessarily mean they are closer.
Another option is to use WiFi geolocation, which works pretty good assuming there are several other WiFi access points in the area. I use SkyHook and it works great:
http://www.skyhookwireless.com/location-technology/sdk.php

Calculating the latency of nodes in a WiFi network

I do already have an answer but am wondering if there's a any better way. The problem is: I have a set of clients on a relatively slow WiFi network. Each client has a distance to the access point (AP), which determines how fast that client-to-AP link will run. Shorter links run faster than longer links.
My goal is to have each node calculate the length of its own link (and that of all nodes in the network). Nodes can talk to each other, but always via the AP, of course. Knowing the distances between nodes and the AP lets us optimize the network simply by moving the worst nodes closer to the access point.
Use round trip time as http://www.tkn.tu-berlin.de/fileadmin/fg112/Papers/hoene_paper2.pdf suggest.
Read Wi-Fi signal strength and use formulas to calculate it as How to calculate distance from Wifi router using Signal Strength? suggest.

Resources