Prevent indirect communication - ns-3

I have such network topology:
A--B--C
\____/
(A connected to B and C, B connected to C)
I'm using PointToPointChannel to connect these nodes.
And I want that A node will not be able to communicate with C node via node B (only using direct link)
How can I prevent such communication?

You need routing to do this, perhaps static routing.
Here some manual to do this : http://www.nsnam.org/docs/release/3.18/models/html/routing-overview.html
and example of routing : ns-3-folder/examples/routing

Related

Do redis streams scale when creating a new stream per client

I am attempting to create a microservice where clients are connected to a certain service A over a TCP connection and a variety of actions are performed on other services within the microservice system (say B, C, D etc.) based on user interaction or other events, and I need to propagate results from these services B, C, D back to service A to be returned to the client.
Since many of these services perform long lived actions, is using redis streams as a buffer to store results from B, C, D to then be propagated to the client by A make sense? Considering a new different redis key is used for each client, will this scale well for thousands of connections? Is redis the right choice for event propagation on a 1:1 basis like this?
Kafka seems like a bad choice because all consumers are delivered every single message. Does it make sense to use something like ActiveMQ instead?

Signaling between WebRCT client and SFU

If a client A, wants to connect to 2 other end points B and C. How does A initiates call with B and C using SFU. I mean, how will A communicate to SFU that it needs to connect to B and C? How is ICE working working in this setup?
Clients typically interact with SFUs in a publish/subscribe manner, so the signaling doesn't happen directly between them.
The workflow is usually as follows: client A publishes a stream to the SFU, then other clients, like B and C, may subscribe to A's feed. In either case (publishing or subscribing), the signaling is happening between the client and the SFU WebRTC agent. And, of course, since the client signals with the SFU, ICE candidates are exchanged with the SFU, not between themselves.

Is it possible to hide certain corda nodes from others in the network?

I am trying to develop a corda network in which the use case requires nodes to only see a specific set of other nodes. Can a nodes 'list of peers' be defined when introducing it to the network so that it cannot make transactions with another nodes or even see the other entities in the network.
I.e. In a network of 4 nodes (A,B,C,D) can A's peers be set to be only C & D and B's peers be set to C & D, whereas C and D can see all the nodes as normal. The goal would be to hide A from B in this case (and vice versa).
Hiding peers on a Corda Network from one another is not possible at this time. All nodes are intended to be visible with established identities.
The existence of an identity on a Corda Network does not reveal any information beyond the operation of a Cordapp by that legal entity. Transactions between parties on a network are hidden from all other parties on the network.
You can establish Business Networks which define a subset of nodes who do business together. The members of a Business Network are only able to be communicated with by other members of the same network. More information can be found here: https://solutions.corda.net/business-networks/intro.html

No ICE Candidate with public IP, but WebRTC can still work sometimes

We are testing WebRTC at 3 places A, B and C.
A and C is ADSL, one at home one in office building. B is a company static IP direct line with company firewall and some port filter rules.
The result is: A can connect with both, but B and C can only connect with A.
So we checked their browser console output. A and C can get both internal and public IPv4 candidates (192.168.1.xxx and 123.34.xxx.xxx). B can find 4 ICE Candidate, 2 internal IPv4 candidate (10.0.xxx.xxx) and 2 IPv6 candidate (not sure if the IPv6 address is internal or public).
So the questions are:
What is stopping B from getting public IP candidate from STUN server? Is it some port that is blocked by company firewall?
B can never get public IP candidate, how did A connect with him? A and B can use WebRTC all the time.
Why is C cannot connect with B? Or what is different between A and C? Both of them is using ADSL, fiber modem to TPLINK router (PPPOE dial + default DHCP) to computers, exactly the same.
Thanks.
After further research, C is not using ADSL. It's actually an office building provided network with firewall. That's why C cannot connect with B but A can.
Sorry for the mistake, the client "thought" they know their network details.
And thanks to Taylor, you are correct. Only one open network is needed to make WebRTC work.
After hours of research, I figured out the only solution is TURN server. So I think this question can close now.

How bitcoin peer discovery works after connecting to hard coded nodes?

I am tinkering with the bitcoin source code and trying to understand the exact working of peer discovery mechanism in the testnet mode for which I have made the following changes:
Disabled the DNS seed discovery in order to force bitcoind to fallback to connect to hardcoded nodes.
Changed the default hardcoded nodes to my known 4 addresses, lets say A,B,C and D, which I ensure are always online.
Now, when I run the bitcoind client (call it E), it connects to one of A,B,C or D, running the same modified version of bitcoind. It gets the peer addresses from the hardcoded node that it first connects to by exchanging getaddr and addr messages but I am not sure how it proceeds after that. I have following queries:
a. If a node falls back to connect to hardcoded nodes, is it supposed to connect to only one of the hardcoded nodes like it happends in my case or can it connect to multiple hardcoded nodes ?
b. After getting peer address via the addr message, when will the node E start connecting to those peers ?
Please point me to the relevant code files/sections if possible. Thanks
A. There are no "Hardcoded nodes" there are only DNS seeds of nodes, when you run them through the DNS request you'll get new node every request.
B. If the node isn't connected to it's maximum capacity of nodes (it's 8 active nodes and 125 inactive nodes) it will try connecting to new nodes the second it'll get the addr message
you can find them here:
livenet: https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L102
testnet: https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L181