2

I have always been curious about how do, say two computers, connect over the Internet.

For example, using the IP address from whatismyip service, I can only see the config page of my router, but pure p2p services like Bitcoin connect two computers directly, if they use IP address. the would have connected to my router/wireless AP. Do they really use IP or other methods? I do not need to do even port-forwarding in order to get p2p software working.

Keltari
  • 71,875
  • 26
  • 179
  • 229
Alexander Ho
  • 133
  • 1
  • 4
  • The reason why you can see your router page is because you're accessing it from your own network. Other computers treat your IP as an address to your computer. – Doktoro Reichard Dec 18 '13 at 15:21
  • https://en.bitcoin.it/wiki/Protocol_specification for a bit of info regarding how the bitcoin protocol works at the network level. At the bottom of the page it looks like there is a bitcoin dissector being written for WireShark (packet capture tool for Win/Linux/Mac) – Richie086 Dec 18 '13 at 22:31
  • 1
    Hello @DoktoroReichard I mean that when I use whatismyip service to get my external ip, I get the ip of my router. So I read about that when I get this, I will need to forward a port to the internal ip of my computer. But what I encounter is that when I use peer-to-peer client, I don't need to do that. What I understand about p2p is that nodes are connected directly to each other, so how is that done when I can't even connect to my computer from external network? – Alexander Ho Dec 19 '13 at 14:46

2 Answers2

1

I know what exactly you are struggling with. Yes, the P2P network does use some kind of technology like "automatically port forwarding " called Hole punching (networking) or NAT traversal. VoIP products, online gaming applications, and P2P networking software all use hole punching.

Jack
  • 11
  • 1
0

If you are interested in how P2P applications communicate over the internet, it really depends on which P2P application you are talking about. All of the P2P applications I am aware of transmit over TCP/IP considering it is the foundation that the Internet works on top of.

Each application communicates over a network protocol which is usually specifically tailored by whomever developed the application in question. For example, BitTorrent usually transmits over a range of ports (6881-6889) and the functionality of BitTorrent in regard to how it communicates over the internet is best summed up by the following (taken from WikiPedia)

A BitTorrent client is any program that implements the BitTorrent protocol. Each client is capable of preparing, requesting, and transmitting any type of computer file over a network, using the protocol. A peer is any computer running an instance of a client.

The same can be said for any application, be it server-client based or P2P or whatever other type of topology it uses. All communication happens via network protocols that both computers understand.

Richie086
  • 5,152
  • 12
  • 42
  • 65
  • But the question was about how this happens. The question clearly states that he expects a connect to require the IP of his computer, but when we install a BitTorrent client our internal IP of our computer is not exposed publicly, and even then everything works fine. The question he (and I) wanted answered is: How does this works? – VinGarcia Jul 24 '23 at 18:34