Click here to Skip to main content
15,914,111 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Network communication in the raw Pin
Mark_Wallace24-Dec-18 17:56
Mark_Wallace24-Dec-18 17:56 
AnswerRe: Network communication in the raw Pin
abmv24-Dec-18 4:22
professionalabmv24-Dec-18 4:22 
GeneralRe: Network communication in the raw Pin
kalberts27-Dec-18 13:36
kalberts27-Dec-18 13:36 
AnswerRe: Network communication in the raw Pin
Mark_Wallace24-Dec-18 17:48
Mark_Wallace24-Dec-18 17:48 
AnswerRe: Network communication in the raw Pin
User 49097425-Dec-18 0:46
User 49097425-Dec-18 0:46 
GeneralRe: Network communication in the raw Pin
kalberts27-Dec-18 10:27
kalberts27-Dec-18 10:27 
AnswerRe: Network communication in the raw Pin
thewazz27-Dec-18 12:55
professionalthewazz27-Dec-18 12:55 
AnswerRe: Network communication in the raw Pin
kalberts27-Dec-18 13:29
kalberts27-Dec-18 13:29 
I was teaching such stuff (and even wrote parts of the text forthe course, but in Norwegian), in an age when we still were hoping for networks to be orderly and well designed. (That is, in the 1990s.) I see other commenters mentioning the OSI model, which was an essential part of the orderlyness. Well, those were the days...

Today, networking is more or less a total mess. Lots of stuff isn't what it appears to be: Maybe the name is the same, but under the hood there is a hodge-podge of different, and largely incompatible, technologies that must be explicitly bridged between. Take "Ethernet" as an example: A multitude of cable types, a dozen different physical connectors, different topologies, different allocation strategies, ... But to the user, it is presented as the eternal, single Ethernet-techology (just with a more convenient RJ45 plug).

ooo oo00oo ooo

Along another axis: One ting you ask explicitly about is "discontinous communication" (often called "asynchronous" communication). First: In a protocol stack, it may vary from one layer to another. The cable may carry a continous stream of bits at well defined steady rate. The user of this cable may insert some packets now, some then, in a varying rate. If these packets carry some real time data, such as streaming sound or video, the packets may be receied "now and then" at irregular speed, but are buffered so that they can be forwarded to the sound/video units as a contstant speed, continuous bit stream.

Second: On the fly, I can list a whole series of alternatives for handling asynchronous traffic in the physical layer alone. It much depends on whether you have the line to yourself or share it with other:

POTS, i.e. analog modem. When you have nothing to say, the line is quiet. When you want to send a byte, you sound a buzzer ("start bits") to wake up the receiver, followed by your eight data bits, and a final buzz ("stop bit") to call it off. In later modem protocols, more than eight bits were sent at a time, to reduce the percentage-wise red tape in start and stop bits. Bits were encoded as a beeping tone that in the oldest versions switched between two frequencies ("FSK"), one for binary 0, the other for binary 1. Later, fairly complex schemes were introduced: Each wave peak could vary both in its amplitude and delay (i.e. phase), peak hitting (or being close to) one of, say, 32 defined points, conveying 5 bits per full wave (i.e. per Hz analog channel bandwidth).

HDLC is somewhat similar (binary, on/off, no analog), but the line is always "busy", sending bits at a specific speed. With nothing to send, a stream of "flags", binary 01111110, is transmitted. Once this pattern is broken, data follows: An arbitrary length bit stream up until the 01111110 pattern reappears. (If the data contains 01111110, it is broken up by inserting a 0 after the fifth 1; the receiver will remove it before forwarding the data.)

Multiple user complicates matters. A classical Ethernet bus cable (or any other CSMA/CD medium) is quiet until one station wants to send something. The sender listens to the cable until it is quiet, then starts transmitting - but listens at the same time: If some other station also started transmitting, they both hear a garbled signal, different from what they tried to send themselves. Both stop transmission, and waits a while before making a new attempt.

In newer descendents of CSMA/CD, such as LAP-D for the ISDN D channel, differs in one respect: All senders are synchronized, so that bits overlap exactly. The electronics makes a 1 trump a 0, so the station transmitting a 1 won't notice any collision. One transmitting a 0, and hearing a 1, must cease transmitting before the next bit and try again later. The one with the 1 bit succeeds and need not retransmit. So, there is less waste of capacity.

Other schemes do not rely on senders listening and retracting in case of collision. E.g. in Bluetooth Smart (old name: BT Low Energy), a central master allocates time slots to each slave: If you have more to say, come back in 84 ms! Usually, a slave gets a time slot at regular intervals, every x milliseconds, depending on need. (The "low energy" is much due to this: The slave can turn off its radio up until its next time slot, to save power.) Several other protocols have masters doing central allocation of capacity, in various ways.

Then there are reservation schemes: DQDB (which really deserved more success than it got - today it is dead) operated two bus lines, one each way, carrying a continous stream of fairly small "cells", with a header flag indicating "busy" or "free". If you have something to send, you wait for a "free" cell, set the flag to "busy" and fill in your data bits as the cell flies by. But this requires that you have requested the cell by setting a request flag in one of the cells running in the opposite direction. This ensures that all stations have equal right to reserve capacity.

Various reservation schemes are used by other protocols, often using a circulating "token" that a sender must hold to be allowed to transmit.

Now, which other schemes for allocating capacity to varying-bitrate users deserve to be mentioned? I'd like to mention one ATM facility, even if I don't know if anyone ever made serious use of it:

Many sound/video coding schemes have a "layered" design: You can drop parts of the data, reducing quality somewhat. GSM is a prime example: Certain elements, such as phoneme codes, have very good error correction, and will "always" get through. The "sound energy", volume, goes without wasting capacity on error bits. So if that protocol element is unrecoverably garbled, the volume is simply kept steady. At low S/N, speech may sound flat, but phonemes get through, giving a comprehensible speech.

An ATM switch may have, say, eight incoming lines all wanting to send cells to the same outgoing line, exceeding its capacity. The switch inspects incoming cells for header flags indicating "discardable", and drop those cells, while letting non-discardable ones through. Presumably, discardable cells carry information similar to "sound energy"; it could be improved image details, high-frequency sound content etc.

You request ATM connection (yes, ATM recognizes connections at the bottom layer, just like analog POTS!) of a guaranteed bit rate - say, 64 kbps for a phone. Every switch along the route must agree to this guarantee. If you don't use all your 64 kbps, the switches may take what you don't use for discardable cells. As soon as you open your mouth, those discardable ones must yield. You can send non-discardable cells only up to 64 kbps (or whatever you reserved), but you may send lots of discardable ones to improve sound quality when traffic is low and network capacity is available.

This facility provides an "overbooking" facility where noone is rejected (until the network is saturated with non-discardable cells), yet running without "empty seats" when the load is lower: All available capacity can be used to provide improved capacity.

... Maybe that is enough to illustrate the number of alternatives and options. Yet, lots of people would yell: Why didn't you include this method? and that method? ... which strengthens my point! All what I have written here covers one tiny little speck of what you want to learn, and I have just mentioned a few alternatives, not provided a tutorial! Covering all the issues, with thorough explanations, will fill volumes.

ooo oo00oo ooo

The bad thing about the mess we have today is that you cannot pick one solution to a problem (say, how to multiplex serveral users on the same medium) and combine with a freely chosen solution to another problem (say, how to identify the other end): If you want TCP services, you are more or less bound to use IP addresses. If you use SMTP email, you are more or less forced to use TCP connections. In some cases, you can in principle make unusual combinations: Say, if you replaced TCP/IP with TCP/ATM, mapping a TCP connection directly onto an ATM connection, that TCP would be relieved of a whole lot of work; ATM would do it far more efficiently. But everyone that you want to talk to would say: TCP/ATM? That is TCP/IP, mate! We know nothing of this "ATM". ... Other protocol suites are largely the same. They expect one given technology (or maybe one of two or three selected ones, such as IPv4 and IPv6) at lower layers.

OSI was an attempt to define common interfaces to different groups of network functionality, i.e. layers. You could have different ways of, say, multiplexing several connections over one channel, but the implementation would be local to that layer, all of the alternative implementations available to any higher layer. All the multiplexing implementations would use the common interface to the lower layer, so that every kind of physical transport could carry multiplexed traffic. Similar for all other kinds of network functions: OSI defined abstract functionalities, allowing different implementations. At each layer, isolated from the otheres, the communicating "layer entities" would open a communication with something like: "I can do multiplexing accoring to standards X, Y and Z - do you know any of those?" "I know X and Z" "Fine, we'll use X, then" - but noone outside that layer would care (or even know).

That didn't occur. The network wars of the 1980s-90s were won by the mess. Too bad.

Now, I certainly will not argue in favor of every specific OSI protocol, and especially not in the way the functions were grouped into the seven layers. If OSI had succeeded, I think we today would have had an "OSI II" with a similar layering, but quite different allocation of functions to layers (and not the TCP/IP way!). It the years of war, there was no room for such discussions. And after the mess won the war, it was essential to the victors to make as explicit as possible that any concept drawn from the defeated enemy would be bluntly rejected. And so it was. Nothing was learned from the OSI discipline.
AnswerRe: Network communication in the raw Pin
Gary Wheeler2-Jan-19 2:04
Gary Wheeler2-Jan-19 2:04 
AnswerRe: Network communication in the raw Pin
pmauriks2-Jan-19 19:45
pmauriks2-Jan-19 19:45 
AnswerRe: Network communication in the raw Pin
André Pereira18-Jan-19 5:11
André Pereira18-Jan-19 5:11 
GeneralKiller quote by James Franco Pin
Super Lloyd23-Dec-18 10:35
Super Lloyd23-Dec-18 10:35 
GeneralRe: Killer quote by James Franco Pin
PIEBALDconsult23-Dec-18 11:42
mvePIEBALDconsult23-Dec-18 11:42 
GeneralRe: Killer quote by James Franco Pin
Super Lloyd23-Dec-18 11:57
Super Lloyd23-Dec-18 11:57 
GeneralRe: Killer quote by James Franco Pin
PIEBALDconsult23-Dec-18 12:15
mvePIEBALDconsult23-Dec-18 12:15 
GeneralRe: Killer quote by James Franco Pin
Gary Wheeler2-Jan-19 2:06
Gary Wheeler2-Jan-19 2:06 
GeneralLinux Weekend Pin
#realJSOP23-Dec-18 7:14
professional#realJSOP23-Dec-18 7:14 
GeneralRe: Linux Weekend Pin
RickZeeland23-Dec-18 8:51
mveRickZeeland23-Dec-18 8:51 
GeneralRe: Linux Weekend Pin
the goat in your machine23-Dec-18 14:46
the goat in your machine23-Dec-18 14:46 
GeneralThe fight against interfacitis must go on! Pin
Super Lloyd23-Dec-18 6:50
Super Lloyd23-Dec-18 6:50 
GeneralRe: The fight against over interfacing must go on! Pin
jschell23-Dec-18 8:17
jschell23-Dec-18 8:17 
PraiseRe: The fight against over interfacing must go on! Pin
RickZeeland23-Dec-18 9:02
mveRickZeeland23-Dec-18 9:02 
GeneralRe: The fight against over interfacing must go on! Pin
Jörgen Andersson23-Dec-18 10:36
professionalJörgen Andersson23-Dec-18 10:36 
GeneralRe: The fight against over interfacing must go on! Pin
RickZeeland23-Dec-18 20:03
mveRickZeeland23-Dec-18 20:03 
GeneralRe: The fight against interfacitis must go on! Pin
ZurdoDev23-Dec-18 15:57
professionalZurdoDev23-Dec-18 15:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.