Let's look at other physical layer protocols.

                host -- modem -------------------------- modem -- host 

A popular protocol for serial lines: SLIP (Serial Line Internet Protocol)

The protocol:

Example:

Original packet:
     -----------------------------------------------
     |       | c0 |             |db |              |
     -----------------------------------------------

Packet sent by slip:

     -------------------------------------------------------
     |     | db | dc |        |db | dd |              | c0 |
     -------------------------------------------------------

Disadvantages:

Advantage:

Quick and easy!



Another serial line protocol:

CSLIP (Compressed SLIP)



Another serial line protocol:

PPP (the Point-to-point protocol)

PPP has three components:

PPP frame:

Bytes:      1     1       1          2      0-1500   2      1
        ___________________________________________________________
        | flag | addr | control | protocol | data | crc | flag     |
        | 7E   |  FF  |   03    |          |      |     | 7E       |
        ------------------------------------------------------------
 

Note: there is no length field. So, if 7E (i.e., the end byte) appears in the data, it will be misinterpreted.

So....

0x01 is sent as 0x7D21
0x02 is sent as 0x7D22
0x03 is sent as 0x7D23
...
0x10 is sent as 0x7D30
...
0x1F is sent as 0x7D3F
Reason: some modems interpret 00 to 20 specially.

The link control protocol of PPP:

The network control protocol of PPP: