Networking – Can Someone Implement a Custom Network Protocol

networking

So in networking class they taught us the OSI model, TCP, CDMA, congestion, frames, etc.

What I would like to know if standards that have been around for 20-30 years like TCP, are burnt into today's hardware, or can someone come up with say TCPX, write the code, deploy it to two machines on the network and use that protocol for communication? Since this doesn't affect how to find someone on the network, I assume it's not an issue on generic hardware.

But say a custom IP protocol was developed. Would incompatible network hardware drop those packets since it can't understand where it needs to be sent?

What I'm trying to figure out is how low (or high? never understood the model orientation) can someone go on the stack with custom implementations before the network between them can no longer transmit data.

Best Answer

That's exactly the problem – intermediary routers may not understand new protocols and only forward IP packets if they look like UDP or TCP that they understand.

There are actually many extensions to the TCP protocol to make it more performant, but takeup by routers has been slow.

If a new protocol is created, it will need to sit on top of an existing protocol. Because many of TCP's convenience features are undesirable for a new protocol (in particular, the particular congestion control mechanisms, head-of-line blocking, and the three-way handshake), this means that new protocols will typically extend UDP. However, UDP has its own share of problems with regards to NAT traversal, because it is a connectionless protocol.

As an example of a new protocol that sits on top of UDP, consider the QUIC protocol. It is intended as a more performant TCP, and is used widely in the Google ecosystem. For more details consider reading QUIC as a solution to protocol ossification on LWN.

New protocols on top of IP can only be used reliably if you control the network in which they are used. However, you can still use tunnelling to use these protocols over the public internet (i.e., through a VPN).

Related Topic