Best tutorial for application multicasting? [closed] - ip

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've recently become aware that there's a distinction between IP multicasting (which apparently doesn't work that well on the public internet) and application multicasting (which is apparently used in IRC and PSYC, per http://en.wikipedia.org/wiki/Multicast).
Is there a good tutorial on implementing application-level multicasting?
I thought the whole point of multicast was to reduce bandwidth for common network segments, so it's hard for me to understand what application-level multicast does.

The purpose of IP level multicasting is to reduce bandwidth for common network segments where many users wish to receive the same traffic. It's usually limited to one particular subnet and an IP router won't propagate the multicast beyond the subnet. This is done for scalability reasons - it wouldn't be a good idea to allow one host to originate multicast packets which are propagated to every IP address on the internet.
There are different ways to think of "application level" multicasting. One approach is to build a multicast tree using the host computers participating in the multicast. Dijkstra's algorithm could be used to do this (Wikipedia has a reasonable description of this). However, maintaining the list of participating computers - and keeping the tree up to date - can be a fair amount of work if hosts are joining and leaving the network at a substantial rate. And you probably don't have a good estimate of hop cost available at the application level.
Another approach you should review is the flooding algorithm used in the Gnutella network's query routing protocol. (Wikipedia also has a good description of this.) This approach alleviates the need to build a multicast tree, but it has the downside of generating more network traffic. In fact, a LOT more network traffic, as the traffic grows with the square of the number of nodes, i.e. O(n**2).

Another example of application multicasting is using JGroups in Amazon EC2 or Google App Engine as they do not support IP multicast but developers want to use multicasting functionality.

Related

best peer to peer technique for mobile network [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last year.
Improve this question
I deal with design of peer to peer communication between mobile unit and user phone. Mobile unit is targeted into cars, so it is possible that it could be connected to many various ISPs. It can be also expected that the clients will be often disconnects. I need to find best solution in NAT traversal techniques, which is applicable in conditions of mobile network, which are little different than the usual networks as WiFi. I search for often used techniques and found a many different practices, such as TCP or UDP Hole Punching, NUTSS, NATBLASTER, NatTrav or official protocols such as STUN or ICE.
Could anyone advise me tried and proven technique under similar conditions?
Thank you very much
To achieve peer to peer(P2P) or relay connectivity you need to implement a protocol called ICE. This protocol allows you the ability of 100% NAT traversal. This is the best solution currently exist. You need to have STUN/TURN server as well.
With even the best solution ICE, you will not get 100% P2P connectivity between peers. Some connection will be established through a relay server called TURN. This depends on the type of NATs the peers are behind.
TCP or UDP Hole Punching is a special technique to allow some connection which normally would have been relay to be P2P. There are other techniques like that but those come after you implement ICE and have STUN/TURN server.
There are lots of open source STUN/TURN server and some companies provides solution for ICE. Some companies provide the whole NAT traversal solution providing ICE implementation and STUN/TURN server support.
Other than TURN, you can also try UDP multi-hole punching, although it may be "too unreliable to be worth the hassle"
https://drive.google.com/file/d/0B1IimJ20gG0SY2NvaE4wRVVMbG8/view?usp=sharing

Protocols and standards that take advantage of the huge IPv6 address space [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
Unsure if this is the correct place for this kind of question (Server Fault is for administrators) but I'm looking for examples of (networking) protocols and standards that leverage the huge IPv6 address space towards some specific benefits.
Reason is I'm writing a paper about something that does this and I'm searching for stuff to compare it to, but I'm coming up empty even though I'm sure some have to do so.
Probably not completely on topic here, but I'm going to answer it anyway because it might help software developers to learn what possibilities there are when developing for IPv6.
Because most protocols and applications still want to be compatible with IPv4 there aren't that many protocols that use this wonderful feature of IPv6. Most of the ones that do are IPv6-only by nature.
The first one is of course IPv6 Stateless Address Autoconfiguration often abbreviated to SLAAC. Having so many addresses available makes self-assignment of addresses so much easier.
Building on that is SEcure Neighbor Discovery (SEND) with Cryptographically Generated Addresses (CGA) which uses public key cryptography and derives the last 64 bits of the IPv6 address from the fingerprint of that public key. Because the node can create a signature with the private key that matches the public key it can prove that it is the legitimate holder of that IPv6 address. Unfortunately there are no implementations for the most common operating systems so this feature is largely unused.
And another one is the IPv6 Battleships game. It uses IPv6 addresses to encode the coordinates in the game and by sending a ping the opponent can determine of there is a ship at a certain location (address) or not. The game was written in a competition on World IPv6 Day at the IPv6 event in The Netherlands.
It has significant advantages for large Cloud deployments. For instance, Faceebook has reported 90% of its internal traffic is IPv6 (https://t.co/PPHBkUPTdt) because this way is similar to private IPv4 but serves better to v6 native customers (in the same report they claim v6 mobiles surf 30%-40% quicker than v4 ones). Also Openstack has finally added almost-full v6 support for Juno version.
Additionally, the IoT field (when it is really IoT, I mean IP devices) is an excellent field of application. Normally, devices will use either IPv6 (when powerful enough) or 6LowPAN (an reduced IPv6 for sensor networks and supported well in OS like TinyOS, ContikiOS, mbedOS, etc).
It might be also useful for WebRTC-like applications as long as IPv6 peers would normally connect better (firewalls vs NATs seem to behave or be more easily configured).
However, with the massive deployment that has started in 2015 (in USA 17% of all traffic to Google is v6, Germany traffic to Google is 14%, all Internet traffic to Google is 7% IPv6 today) any Internet product of service has to migrate or will lose competitiveness soon.

Why do some switches have uplink ports? [closed]

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 9 years ago.
Improve this question
So, this appears, on the surface, to be a network admin (serverfault) question, but I'm looking for a lower level answer from a network hacker type.
I was pretty much oblivious to how networks actually work in real life until I started my summer internship. Then, by way of having no other option (internship is at a pretty networking-centric place and I have to put together testbeds for testing [among other things] networks), I became familiar with them. For one thing, the fact that there's no "This goes out to the internet!" port on commercial switches was kind of surprising, until you reasoned about how it works (starts out like a hub til it 'learns' where ips are in terms of the physical port, i guess?).
And after this home-crafted self-discovery (or possibly, error in thinking), I'm back at the extended stay hotel and looking at my cheap little home switch, and it has an uplink port.
Now my question to you, Network hackers (in the good way), is why?
The "uplink" port on your SOHO switch is internally crossed over. It relieves you of having to use a crossover cable to connect two switches. That is the only difference.
BTW: There isn't a "this goes out to the internet" port on SOHO switches either. You're confusing switches and routers/gateways. This confusion may be encouraged by manufacturers putting the two logically separate devices in one piece of hardware, e.g., a router with a 4-port switch. While we're at it, a wireless router w/ 4 port switch is actually logically three separate devices (router, switch, and access point).
BTW #2: A switch (well, except for layer 3 switches, which arguably are only switches to the marketing department) actually learns where MAC addresses are. It neither knows about nor cares about IP.
Uplink ports can be thought of special ports for inter-switch connections. Sometimes they may have a higher speed (1G instead of 100M for example). Or they are interchangeable (laid out as modules).
Some have multiple uplink ports (I had one with two), so you may have redundancy or multiple switched connected this way with the same logic (where is the mac address (on wthich other switch)?).

Wireless mesh network based on cheap consumer routers [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 2 years ago.
Improve this question
I wanted to know if any such system already exists for the average open-source user. With all of the net neutrality arguments around and with the cost of broadband likely to go up in the future. It seems like a good idea for an open-source protocol that allows standard consumer routers to operate together and form a mesh network with other consumer routers close by.
Likely possible that with enough nodes in close enough proximity and a good abstraction we could get something good going.
You could always use WDS nodes (like a repeater, kinda).
I use it in my Buffalo AirStation with DD-WRT installed (any router that can load DD-WRT would work).
www.dd-wrt.com
Not sure on the scalability of it though. And the APs would have to be in reach of each other. They could run on separate SSIDs though.
Edit: here's the DD-WRT Wiki page about WDS: http://www.dd-wrt.com/wiki/index.php/WDS
WDS is not meant for and will not scale to more than a few nodes.
There has been extensive work on mesh routing protocols such as BATMAN-ADV, OLSR, BMX and 802.11s. These are all supported on OpenWRT which supports a very large number of consumer wireless routers
There are also many large scale deployments such as freifunk and deployments by The Village Telco
Just to add more info, batmand (layer 3) or batman-adv(layer 2) can run on almost anything with a resemblance of linux, I have managed to get it working on android devices (running cyanogenmod mostly), raspberry's, laptops, foneras, .... basically anything that has or allows a wireless card with ad-hoc mode and a linux-based operating system.
Freifunk Luebeck uses D-Link 300 with batman-adv

Two Computers Finding Each Other over Internet [closed]

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 11 years ago.
Improve this question
Given two computers attached to the Internet that know nothing about each other before hand, is it possible for one computer to be able to broadcast a message so that the second computer could receive it and respond?
I know UDP broadcast exsits, but I believe that those are generally filtered by the ISP before it reaches the true Internet. Is this true?
The current best way to achieve a multinode network without centralized coordination is through the use of Distributed Hash Tables. That link explains a bit and links to various implementations you can leverage.
That said, you still need each machine to coordinate with at least some peers. It's just that you don't need it to coordinate with a central server. A solution using a central server that know both (all) participating machines will also work, but imposes further restrictions on anonymity and scalability, just remember what happened to Napster.
You need an intermediate third party that they both know, that could distribute messages directed towards it in a broadcast-like fashion.
A solution for this problem (where none of your peers know the final address of the other) could be relying on IM protocols.
In particular, the XMPP protocol is extensible, open and used by many providers such as Google Talk. Libraries exist for most languages and it has the plus of being able to work (slowly and going through a 3rd party server) even if both hosts are behind a NAT-box.
If communication must use another channel, you can use XMPP to exchange IP address and then proceed with the standard socket route (but if you encrypt your messages, there should be no problem even going through a 3rd party server - to be true all packets go through untrusted 3rd party routers so you should encrypt anyway if you have sensitive data..).
Hope this helps.
No, you can't broadcast like that over the internet. You need to know which address you want your packets to go to.
A possible solution for you is to use a dynamic DNS service.
Your application would need to know in advance which hostname the other host will be using, but this service would at least get around the fact that you don't know exactly which IP address the other computer is on.
Note that this won't solve the potential issue of firewalls between the two hosts blocking your packets. The only practical way around that is for both hosts to open an outbound connection to a central host which can then relay data between them.
Look at the chord or pastry algorithm. It is an overlay network (DHT based) which has a discovery mechanism involved. It's a P2P (Peer 2 Peer) routing algorithm.
UDP is a dead end - its just a protocol where the order the packets are received is less important and there are issues routing over WANS. You said that you want to connect two computer on the "internet" presumably with the end points moving around etc. The only way is to use a central server as a register/directory. If each end point allso a web service or something and registeres its current IP address and name periodically then the other end point can look up the IP address of the other using this service. (could host your own DNS server and code your end point to register on this DNS?)
One of the problems is that even if you have the IP address what is one or more nodes are behind a firewall or NAT router ? You will need to host a server to proxy traffic. The best example is SKYPE - look into how it works it is documented, very interesting.
The simplist answer might be to jump on the back on an existing service such as messanger, skype, bit torrent, etc.
Simon
If the computers are running Windows, I'd look at using PNRP.
Multicasting is also a possible solution. It's certainly feasible in a corporate network

Resources