Can WebRTC be used to broadcast from one machine and view on another machine? - webrtc

I have been trying to work with WebRTC for live streaming it on one machine and view it on another machine. The thing is i am able to broadcast and view it on same machine, but with different machines it not working. Can anyone guide me through it to stream from one machine and view it on another?

One of possible issues: if your machines are not in the same network then you have to use STUN/TURN server so that the machines could find each other. You can try to use these:
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
Also this example of using STUN might be helpful: https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/

Related

How to connect to a sqlserver database without internet

I want to create a desktop application using vb.net and sql-server. I have two computers and I have my sql-server installed in one of the machines (server) in this case. I want to access the database from that (server) using another computer but the challenge is, I don't have any internet connection. All I have is a network cable to connect these two computers the one serving as a server and the client machine. Is this possible to access my database or can only be achieved over an internet connection? If possible how can I go about it?
Yes this is possible, if you only need to connect two computers, you'll not even need a switch or hub. You only need to assign both computers a private IP address in the same address space, such as 10.0.0.2 and 10.0.0.3 for computer A and B.
However, it might still be reasonable to use a switch for your purpose, as you might need to expand your network and/or connect to the internet in future cases, but in your particular case, it is not mandatory.

Pinging between two different vm's with different subnet on same host

I am running a windows machine and i am running virtualbox on it
I have two VM's for cent os.
I want the two VM's to ping each other but they should have different subnets.
I am not really sure how to do it thus posting this question. I am really not concerned if they can connect to the internet or not, i want them in different subnets.
I tried by using two different internal networks but was not able to ping.
Thanks for you help in advance, really appreciate it
First of all, internal network is an exclusive type of network so you can never reach another machine if they are on different network.
For machines in different subnet to be connected each other, you should have a router between them. So you will need 1 more virtual machine. Just use "Bridget Adapter" mode for the network type at all machine and assign the IP as you like. Just make sure that the router is located in the middle logically. Machine A - Router - Machine B. To create a router machine you can use ubuntu OS. You can see it here :
http://www.yourownlinux.com/2013/07/how-to-configure-ubuntu-as-router.html

Can NS3 EMU be applied on different machines in WAN?

we are currently considering whether ns3 satisfying our requirements, we're looking for a convenient tool to run in distributed devices in the real network (every kind of possible connections) and capture the network performance data (like a sniffer). I realize that the primary purpose of ns3 is to simulate network topology in a single machine, but its emu module sounds promising and the flow monitor can save our effort on data capture.
In the following link
http://www.nsnam.org/wiki/HOWTO_make_ns-3_interact_with_the_real_world
it is declared that NS-3 EMU can be applied to inject simulated nodes interacting with real live network, and 3 kinds of testbed are given. However the first solution, virtual machine vmware testbed is still woking within LAN -- in promiscuous mode the virtual machines network card are listening to all LAN broadcasts so that the emu-udp-echo server and client can find each other.
My question is, is it possible that the emu-udp-echo server/client running in different, physical systems from different positions in wide network?
e.g. in different cities or from different network providers, given ip address of the hardware where the other ns-3 node is running? if it is possible, how can i specify the "real" ip address and port for the node, instead of assign a virtual ipv4 address?
Thanks a lot.
Yes, while the documentation describes how to perform this using virtual machines, this can be done in general on real hardware. Since that HOWTO was written, there has been additional work on providing helpers for running this type of experiment, including running on PlanetLab testbed machines. This documentation describes the generalized file descriptor NetDevice, added to the ns-3.17 release: http://www.nsnam.org/docs/release/3.19/models/html/fd-net-device.html. A similar example to the one described in that HOWTO is found in the file fd-emu-udp-echo.cc.
When using emulation mode on real networks, configuration of the MAC addresses and IP addresses must be done carefully. First, the device must be able to be put into promiscuous mode. Second, the MAC address needs to be different than the hardware address of the NIC. If you intend to be riding on top of an active NIC with existing IP address (in use for other Internet traffic), you'll need to have another IP address for ns-3 that is within the right link subnet. If instead you want to dedicate the NIC to ns-3 use, then do not assign the IP address to the host NIC and just assign it to the ns-3 configuration.
The PlanetLab example also shows another configuration that uses Tap devices to send data to/from PlanetLab testbed nodes. Some of this configuration is specific to how PlanetLab works, but the use of Tap device bridged to an ns-3 device may also facilitate emulation.

How can you set up multiple web clients on one machine

Is there any way to do this? I am working on a webRTC application and of course I need to test it. For that I need a connection between at least 2 peers and those peers can't be the same. For the work I had i used an old laptop but I need to test also the functionality of multiple connections and for that I would need another machine. Is there any way around this? I tried using different browsers, windows or tabs but it all didn't work.
You can try VM : install two or more linux in virtual box for example

Choosing between network (Ethernet or WiFi) programmatically

On my mac I have two kinds of networks available - Ethernet, WiFi.
While making a server call, can I somehow control which network channel to use for making the server call? So, before making server call, I want to specify the network channel to be used for that call - Ethernet or WiFi.
How can this be achieved using objective C. I am working on a cocoa application.
I assume both NIC's are connected to Internet (so both have a IP):
I don't think you can solve it within code (not 100% sure). But what you could do is setup some local routes, configuring which traffic goes over what NIC.
Look at the route command ('man route').
This might help you:
https://serverfault.com/questions/100613/public-traffic-to-go-over-1-nic-and-private-traffic-to-use-another-nic
You can modify the routes available with the System Configuration framework. In scutil(8) you can see the routes that are presently installed in the State:/Network/Service/* dictionaries, and in order to manipulate these programmatically you have to us the SCDynamicStore framework, which is C.
However, if you were trying to just do some ad-hoc service on WLAN only, you could use the CoreWLAN framework, which is in Objective-C.