Robert Tracy
Robert Tracy

Reputation: 75

How are network protocols implemented?

I know that a protocol is a set of rules that governs communication between two computers on a network, but how are thoses rules implemented for the computer? Is a protocol basically a piece of code or, in other words, software?

Upvotes: 4

Views: 12308

Answers (8)

pokstad
pokstad

Reputation: 3461

Networking protocols are not pieces of code or software, they are only a set of rules. When software uses a specific networking protocol, then the software is known as an implementation. There can be many different software implementations of the same protocol (i.e. Windows and UNIX have different TCP/IP implementations). It is possible to understand networking protocols without any knowledge of programming.


EDIT: How are they implemented? Here's a paper on taking an abstract specification of a protocol and implementing it into C. You'll see that less-strict protocols leave out certain details that programmers have to guess on, which makes some implementations incompatible with others.

Upvotes: 7

hicham djidel
hicham djidel

Reputation: 1

The main networking problem is to share data between computers. All the networking protocols try to solve is a little part of that major problem. Some of them (the protocols) are implemented as software, some others as hardware. In short, protocols like algorithms, can be implemented it in many programming languages.

Back to the TCP, it is implemented by the operating system.

Upvotes: 0

Farshid Ashouri
Farshid Ashouri

Reputation: 17719

Your answer is a very short one:

BY READING THE RFC.

Upvotes: 0

MARK
MARK

Reputation: 2362

Protocols are basically set of rules. The way to implement them is to first of all make a state machine diagram as it completely tells that what is going to be the current state and how the state is going to change on the basis of input and what output actions are going to be performed.

Upvotes: 0

Adam Robinson
Adam Robinson

Reputation: 185693

Protocols are generally built upon each other. At the risk of sounding pedantic, here's an example of a protocol and where/how it's implemented:

  • Application Protocol - the way a particular application talks to another instance of itself or a corresponding server; this is implemented in the application code or a shared library
  • TCP (or UDP, or another layer) - the way that information is sent at the binary level and split up into usable chunks, then reassembled at the destination; this is usually implemented as part of the operating system, but it is still software code
  • IP - the way that information (having already been split or truncated by something like TCP or UDP) makes its way from one place to another by routing over one or more "hops"; this is always software code, but is sometimes implemented in the OS and sometimes implemented in the network device (your LAN card, for example)
  • base-T (ethernet), token ring, etc - Here we are physically getting into how the hardware talks to one another; ie, which wire corresponds to a particular type of signal; this is always implemented in hardware
  • electricity /photons - the laws that govern (or at least define) how electrons (or photons) flow over a conductive material or over the air; this is usually implemented in hardware ;)

In a sense, these are all "protocols" (a set of rules or expected behaviors that allow communication to take place), and they're built on one another.

Bear in mind that (aside from electricity) this is not an exhaustive list of the sort of protocols that exist at any of these layers!

Edit Thanks to dmckee for pointing out that electricity isn't the only physical process used in networking ;)

Upvotes: 12

BastiBen
BastiBen

Reputation: 19880

A network protocol is basically like a spoken language. It is implemented by code that sends and receives specially prepared messages over the network/internet, much like the vocal chords you need to speak (the network and hardware) and a brain to actually understand what someone said (the protocol stack/software).

Sometimes protocols are implemented directly on the hardware [for speed reasons] (like the Ethernet protocol for LANs) - but it is always software/code required to do something useful with a protocol.

This might be interesting for you:

Upvotes: 2

just somebody
just somebody

Reputation: 19257

a protocol is a set of rules governing the communication between two entities.

in the computer/programming context, a protocol is a set of rules governing the communication between two programs.

in the computer network context, a protocol is a set of rules governing the communication between two programs, well, over network.

in computers, in the end everything is embodied in code...

Upvotes: 0

zpon
zpon

Reputation: 1530

Software implements the rules defined in the protocol, some protocols are formal defined and some informal.

Upvotes: 0

Related Questions