Lwip Ppp Over Serial Link

Lwip Ppp Over Serial Link Rating: 8,0/10 8473 reviews
  1. Lwip Documentation
  2. Lwip Ppp Over Serial Link 1

LwIP - lightweight TCP/IP lwIP is a light-weight implementation of the TCP/IP protocol suite that was originally written by Adam Dunkels at the Computer and Networks Architectures (CNA) lab of the Swedish Institute of Computer Science but now is being actively developed by a team of developers.

PPP (Point-to-Point Protocol) is the most widely used method for transporting IP packets over a serial link between the user and the Internet Service Provider (ISP). Although PPP is primarily used over dialup lines, variants such as PPoE (PPP over Ethernet) and PPoA (PPP over ATM) extend PPP to new data-link layer protocols.

PPP was designed to enable the transmission of different protocols over one point-to-point link by utilizing encapsulation. Encapsulation is the process of storing packets from the foreign protocol inside PPP frames. PPP also established a standard for the assignment and management of IP address, synchronous (start/stop) and bit-oriented synchronous encapsulation, network protocol multiplexing, link configuration, link quality testing, error detection, and option negotiation for such capabilities as network layer address negotiation and data compression negotiation. PPP supports these functions by providing an extensible Link Control Program (LCP) and a family of Network Control Program (NCP) to negotiate optional configuration parameters and facilities. In addition to IP, PPP supports other protocols, including Novell’s Internetwork Packet Exchange (IPX) and DECnet.

PPP Components

PPP provides a method for transmitting datagram over serial point-to-point links. PPP contains three main functions:

  • A method for encapsulating datagram over serial links. PPP uses the High Level Data Link Control (HDLC) protocol as a basis for encapsulating datagram over point-to-point links.
  • A Link Control Protocol (LCP) for establishing, configuring, and testing the data-link connection.
  • A suite of Network Control Protocols (NCPs) for establishing and configuring different network-layer protocols. PPP is designed to permit the simultaneous utilize of numerous network layer protocols.

PPP Operation

To establish communications over a point-to-point link, the originating PPP first sends LCP frames to configure and test the data-link. After establishing link and negotiating optional facilities using LCP the original PPP will send NCP frames to choose and configure one or more network layer protocols. After configuring each network layer protocol packets of each network layer could be transferred and link will remain configured and packets could be sent over those links. Link will remain configured for communication till plain LCP or NCP frames closed and some external events occurred like inactivity timer expires or user intervenes.

Physical Layer Requirements

PPP is capable of operating across any DTE/DCE interface. Examples include EIA/TIA 232 C (formerly RS 232 C), EIA/TIA 422 (formerly RS 422), EIA/TIA 423 (formerly RS 423 (formerly RS 423) and International Telecommunication Union Telecommunication Standardization Sector (ITU-T) (formerly CCITT) V.35. PPC has absolute requirement is providing duplex circuit either dedicated or switched which could operate in either asynchronous or synchronous mode which is transparent to PPP link layer frames. However PPP does not impose any restrictions with respect to the transmission rate other than imposed for the specific DTE/DCE interface in use.

Lwip Documentation

PPP Link Layer

PPP uses the principles, terminology, and frame structure of the International Organization of Standardization (ISO) HDLC procedures (ISO 3309-1979), as modified by ISO 3309-948/PDADI “Addendum 1 Start/stop transmission. ISO 3309-1979 indicates HDLC frame structure to use in synchronous environments. ISO 3309:1984/PDADI specifies proposed modifications to ISO 3309-1979 to allow its use in asynchronous environments. PPP control procedures utilize the definitions and control field encodings identical in ISO 4335-1979/Addendum 1-1979.

The PPP frame format appears in six fields. The followings descriptions summarize the PPP frame fields:

  • Flag: A single byte that indicates the beginning or end of a frame. The flag field consists of the binary sequence 011111110.
  • Address: one single byte hold the binary series like 11111111, and standard broadcast address. PPP does not assign individual station addresses.
  • Control: one single byte which has the binary sequence 00000011, used for transmission of user data towards non sequence frame. A connectionless link service is parallel to that of Logical Link Control (LLC) Type 1 is provided.
  • Protocol: Two bytes that recognize the protocol summarized in the in order field of the frame. As a whole up to date principles of the protocol field are specified in the most current Assigned Numbers Request for Comments (RFC).
  • Data: Zero or more bytes that contains the datagram for the protocol specified in the protocol field is found by locating the closing flag sequence and allowing 2 bytes for the FCS field. Maximum Default length of the information playing field is 1,500 bytes. By preceding conformity, agreeable PPP implementations can utilize other values for the utmost information field extent.
  • Frame Check Sequence (FCS): Normally 16 bits (2 bytes). Following previous agreement, accepting PPP implementations would use a 32 bit (4 byte) FCS for better error detection.
Lwip Ppp Over Serial Link

PPP Link-Control Protocol

The PPP LCP provides a method of establishing, configuring, maintaining, and terminating the point-to-point protocol connection. LCP goes through four distinct phases:

  • First, link organization and configuration arbitration occurs. Before any network layer datagram (for example IP) can be exchanged, LCP first must open the connection and negotiate configuration parameters. This phase is complete when a configuration acknowledgement frame has been both sent and received.
  • This is followed by link quality determination. LCP allows elective link quality strength of mind phase following the link connection and arrangement arbitration phase. In this section, the link is experienced to decide whether the link value is enough to bring up network layer protocols. This phase is optional. LCP could setback transmission of network layer protocol information till this stage is completed.
  • Network layer protocol configuration could occur after LCP has finished that link quality determination phase and network layer protocols could be configured separately by good use of NCP and could be up and down at any time. While LCP select link it will tell network layer protocol to take necessary actions.
  • Finally, link termination occurs, LCP can terminate the link at any time. It frequently will be done at the request of a user but could occur since of a physical event, such as the loss of carrier or the ending of an idle era timer.

LCP Control Messages

LCP accomplishes these tasks through the use of simple control messages:

Lwip example

Link Configuration messages used to establish and configure a link:

  • Configure-Request
  • Configure-Ack
  • Configure-Nak
  • Configure-Reject

Link Termination messages used to terminate a link:

  • Terminate-Request
  • Terminate-Ack

Link Maintenance messages used to manage and debug a link:

  • Code-Reject
  • Protocol-Reject
  • Echo-Request
  • Echo-Reply
  • Discard-Request

PPP NCPs

A PPP Network Control Protocol must be defined for each type of network packet which is to be encapsulated and transmitted across the PPP link.

Some of the defined PPP NCP’s are:

  • Internet Protocol Control Protocol
  • OSI Network Layer Control Protocol
  • Xerox NS IDP Control Protocol
  • DECnet Phase IV Control Protocol
  • Appletalk Control Protocol
  • Novell IPX Control Protocol
  • Bridging NCP
  • Stream Protocol Control Protocol
  • Banyan Vines Control Protocol
  • Multi-Link Control Protocol
  • NETBIOS Framing Control Protocol
  • Cisco Systems Control Protocol
  • Ascom Timeplex
  • Fujitsu LBLB Control Protocol
  • DCA Remote Lan Network Control Protocol (RLNCP)
  • Serial Data Control Protocol (PPP-SDCP)
  • SNA over 802.2 Control Protocol
  • SNA Control Protocol
  • IP6 Header Compression Control Protocol
  • Stampede Bridging Control Protocol
  • Compression on single link in multilink group control
  • Compression Control Protocol

PPP Standards

PPP is officially defined in RFC 1661: The Point-to-Point-Protocol (PPP).