by hyperman1 · 4y ago · 0 comments
Some day, someone explained this allows for a client(with low bandwith) to setup a transfer between 2 servers(high bandwith) with the data not moving through the client. I've never seen this usage and don't know any ftp package supporting this, but it's pretty neat nevertheless.
> The original specification for the File Transfer Protocol was written by Abhay Bhushan and published as RFC 114 on 16 April 1971. Until 1980, FTP ran on NCP, the predecessor of TCP/IP.[2] The protocol was later replaced by a TCP/IP version, RFC 765 (June 1980) and RFC 959 (October 1985), the current specification.
* https://en.wikipedia.org/wiki/File_Transfer_Protocol
Unlike TCP or UDP, NCP was not duplex:
> NCP preceded the Transmission Control Protocol (TCP) as a transport layer protocol used during the early ARPANET. NCP was a simplex protocol that utilized two port addresses, establishing two connections, for two-way communications. An odd and an even port were reserved for each application layer application or protocol. The standardization of TCP and UDP reduced the need for the use of two simplex ports for each application down to one duplex port.[1]
* https://en.wikipedia.org/wiki/Network_Control_Program
So the original transport layer that FTP relied on necessitated two ports, and when the move to a newer transport layer occurred the use of two ports was carried over for simplicity's sake. And several decades later that design still exists.
> FTP needs two ports (one for sending and one for receiving) because it was originally designed to operate on Network Control Program (NCP), which was a simplex protocol that utilized two port addresses, establishing two connections, for two-way communications. An odd and an even port were reserved for each application layer application or protocol.
* https://en.wikipedia.org/wiki/File_Transfer_Protocol
Per RFC 114, responses from the server are considered a data type: when a user sends a command to the server, sometimes the response is a status update ('MKDIR successful'†) and sometimes the response is the requested file.
The data structure of the response has fields to say what's coming back on the data channel for the requested transaction.
† MKDIR was not a command, just using it as an modern example.
Unfortunately, this assumption has failed the test of time, as the "peer to peer" nature of computer networks has been fundamentally degraded due to widespread adoption of a more strict client-server model. Today, it is mostly not true that any two internet hosts can intiate connections with each other, and while seldom phrased this way the reality is so deeply embedded in our understanding of the internet that protocols designed under this assumption, while common, seem absurd. There are numerous reasons for this that range from security concerns to IPv4 exhaustion to the simple practicalities of the way that computer networks entered widespread usage.
We should all wonder: is it a good thing that we have abandoned the peer to peer nature of networks?
I can't agree that it has failed the test of time. Peer to peer is still the superior solution to nearly every problem.
What happened is that the Internet became commercialized and now profit runs everything. Centralized solutions are better at: injecting advertising, tracking users, requiring subcriptions, ensuring lock-in and preventing interoperability. None of these are good qualities for anyone involved, except the company making the profit. But these companies now rule the internet, so they hate peer to peer.
Yes, this is basically all an accident of history, but so is everything else about computing. There's no real sense in which the original "network of peers" IP concept has been successful since IP spread beyond the realm of the National Science Foundation. It is possible to build systems which are far more resistant to these problems but it's difficult to begin with, and on top of that adoption would require turning the battleship that is the internet around. We're sort of stuck with the situation we found ourselves in, which is that we build peer-to-peer system by piling a few hacks on top of IP to enable peer-to-peer application layer usage.
Just to point out, it was realized. In the early days everyone ran their services (SMTP, NNTP, later HTTP, finger, telnet, etc, etc) locally in a 100% distributed fashion.
It's just that then the commercial interests showed up and ruined everything with centralization, ads, spam, tracking.
Getting acces to the internet (AKA, getting an IP block and routes to connect to others) has always been sort of centralized, mainly because ip blocks need to be handed out from a single source of truth to prevent ip address collisions.
Still, the peer to peer nature of interconnecting still exists, there is no hierachical information source which defines routes across the internet. This is all decentralized and done by doing peering between parties with BGP (And other routing protocols).
Doing this yourself is possible, although rather hard and niche for a consumer. But getting an AS number is doable, and getting an IPV6 block is even easier. IPv4 is hard to come by though..
NAT’s might go away under IPv6 but firewall policies with “default deny inbound connections” will almost certainly not.
This possibly surprising fact, that at the core of the P2P distributed system there is a centralized client-server service that provides the initial discovery information to begin participating, is pretty much universal to P2P systems because of the limitations the internet imposes. Removing this requirement would require a significantly more P2P-architected internet that allowed, for example, participation in arbitrary multicast groups from residential ISPs. There are both theoretical and practical (but mostly practical) challenges to doing this.
In other words, the way the internet works, the only real way to begin to participate in a P2P internet protocol is to connect to a centralized service to provide initial peer hints. This is commonly referred to as an "introducer" or "bootstrap node" or "peer helper" or other terms depending on the P2P system. Hypercore and the Hyperswarm P2P network it relies on are actually unusually advanced in how much they minimize the need for an introducer, to the extent that a Hyperswarm node can completely forget about the introducer (it could go down) after initial setup and it will probably continue to work okay although there is a probabilistically small risk of a split-brain scenario. Older P2P protocols like Bittorrent and Tor have a greater dependency on centralized introducers and cannot operate without them even after initial startup (with caveats such as Bittorrent's support for Kademlia DHT, the same underlying DHT protocol used by Hyperswarm, which is in use by some Bittorrent nodes but not all for various reasons).
For hypercore specifically the introducers are bootstrap1.hyperdht.org through bootstrap3.hyperdht.org. These are basically hardcoded into your client.
Is there a “centralised” server under Bitcoin? Or is it you can bootstrapping even manually then the peer to peer network can go ahead to find more peer …
The problem of “centralisation” is not due to the need of finding peer. It is in the edge. You control the isp you control all. See China.
How to break this edge issue … very hard.
There were specific people whose main role was that they had access to one source server and one or more target servers. Without spending more than a few kB of their own bandwidth they could transfer files between big servers easily.
I also remember talking to some people back in the day who regularly did that supposedly. Members of some minor warez group who uploaded new releases to one server and then used FTP to directly transfer files from one server to another to create mirrors. Then retransfer from the two servers that now had it to even more servers for some exponential growth.
When Microsoft made Windows Firewall opt-out with Windows XP SP2, it caused SOOOOOOO many headaches. On one hand, no more rogue porn pop-ups during work! On the other hand, nobody knew what a firewall was and why trying to use Skype or whatever was such a PITA.
It’s a bit of a shame that one simply cannot use the Internet without a firewall of some kind (unless you really like getting cryptoransomed in, like, 30 seconds)
Sendmail ran locally and I'd send/receive email to/from the world directly on my workstation. Same for FTP, HTTP, etc. That's how the Internet was originally intended to operate.
Simpler answer: because Firewalls didn't exist at the time!
* https://en.wikipedia.org/wiki/Lftp
* http://lftp.yar.ru/features.html
See also:
* https://en.wikipedia.org/wiki/Comparison_of_FTP_client_softw...
What's a firewall? By that I mean, firewall wasn't a thing when FTP was designed.