Serial LinksSerial links take many forms, from 2400 bps dial-up modems (and their faster cousins), to dedicated T3 leased lines. All share two common traits - they interconnect two computers and transmit a single bit at a time in each direction. The stream of bits is assembled into bytes and then packets. The speed of a serial line is rated in bits per second (bps). They can be broken into two broad categories - synchronous and asynchronous.
Synchronous Serial LinksSynchronous links use some form of clocking, by which a clock signal is transmitted along with the data. This can take many forms. A seperate signal may carry the clock:
In this example, the sender transmits each bit on the rising edge of the clock. The receiver latches the data signal on the trailing edge of the clock. In this manner, race conditions between the two are avoided. Every clock cycle, a single bit is transferred.It is also possible to combine the clock and data signals together into one:
In any event, such serial links are termed synchronous because the data signal is synchronized with a clock signal. Most serial links are synchronous; low speed modems and printers form the exception.Typically, one side of the link provides clocking (gives clock) for data traveling in both directions. The other side of the link takes clock. If a telephone company (telco) leased line is involved, the telco will give clock, since the data must be carefully synchronized as it moves through the telco's network.
Asynchronous Serial Links
Asynchronous links lack any form of clock signal. Rather, a start bit is used to signal the beginning of a transmission. Once the receiver has seen the start bit, it begins counting bit times according to the pre-configured line speed:
Without an explicit clock signal, the receiver risks gradually losing synchronization with the sender. For this reason, almost all asynchronous links transmit only a single byte at a time. The next byte requires a new start bit to re-synchronize the sender and receiver.Asynchronous links, since they lack clocking, require the sender and receiver to agree on the bit speed of the link. If they do not agree, for example if the sender transmits at 14.4 kbps but the receiver is configured for 9.6 kbps, gibberish will result, as almost anyone with an external modem has experienced from time to time.
FramingNo matter what kind of serial lines are in use, the bits and bytes transferred over them must be grouped together into packets. The beginning and end of each packet must be clearly delineated, usually a checksum will be included to ensure the packet is undamaged, and often a type field is required to differentiate between, say, an IP packet and one for IPX.
Most serial links use HDLC or some varient of it.
Dialup modem lines first used SLIP, but PPP is now preferred.
Both are HDLC-based, but PPP is more elaborate, supporting dynamic
address assignment, on-the-fly data compression, and multiple
In addition to data compression, header compression is also supported.