1 / 21

PPP API

PPP API. PPP Overview. Three types of Protocols Link Connect Protocols Authentication Protocols Network Protocols. Link Protocols. To be portable to a wide variety of environments, PPP provides a Link Control Protocol (LCP). The LCP is used to

bernad
Télécharger la présentation

PPP API

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PPP API 1-1

  2. PPP Overview Three types of Protocols • Link Connect Protocols • Authentication Protocols • Network Protocols 1-2

  3. Link Protocols • To be portable to a wide variety of environments, PPP provides a Link Control Protocol (LCP). • The LCP is used to • automatically agree upon the encapsulation format options, • handle varying limits on sizes of packets, • detect a looped-back link and other common misconfiguration errors, and • terminate the link. 1-3

  4. Link Phase Diagram Dead Establish Authenticate Up Opened Success/None Fail Fail Terminate Network Down Closing 1-4

  5. Authentication Protocols • CHAP - Challenge Handshake Authentication Protocol • Used to periodically verify the identity of the peer using a 3-way handshake • Done upon initial link establishment, and MAY be repeated anytime afterward • Process: • After the Link Establishment phase is complete, the authenticator sends a "challenge" message to the peer. • The peer responds with a value calculated using a "one-way hash" function. • The authenticator checks the response against its own calculation of the expected hash value. If the values match, the authentication is acknowledged; otherwise the connection SHOULD be terminated. • At random intervals, the authenticator sends a new challenge to the peer, and repeats steps 1 to 3. • PAP - Password Authentication Protocol • Allows for a username and password to be included • Device attached to has to check and ok password 1-5

  6. Network Control Protocols • Can handle more than one network type • First configure the network type • Include information about network in each communication 1-6

  7. Types of PPP Control • Two Types of control • Serial Link Control • Modem Link Control 1-7

  8. Material Needed for PPP Examples • A PPP Host that can be accessed over a serial port • Two Modems • A remote access server 1-8

  9. Supported Functions • Can handle PPP over direct serial • Can handle modem setup and PPP • Requires fixed IP addresses 1-9

  10. Example Applications • Echo Client to Remote Echo Server through Remote Access Server over Modem on Com2 • FTP Server Available through Direct Serial Connection on Com1 • HTTP Server Available through Remote Access Over Modem on COM2 • IP Routing Between a Direct Serial Connection to a Modem Connection 1-10

  11. Echo Client to Remote Echo Server through Remote Access Server over Modem on Com2 • Modem connection with modem control • Sets modem to either send or receive • Sends and receives data • Have to adjust numbers and IP addresses 1-11

  12. FTP Server Available through Direct Serial Connection on Com1 • Serial connection only • Has authentication built in • IP addresses need to be set 1-12

  13. HTTP Server Available through Remote Access Over Modem on COM2 • Uses modem connection • Sets up modem configuration and makes or allows calls • Waits for call • Acts as webserver 1-13

  14. IP Routing Between a Direct Serial Connection to a Modem Connection • Combination version • Uses serial for one connection • Modem for other connection • Sends data to modem to setup for operation • Board waits for connection on modem • Already has connection over serial 1-14

  15. State Diagrams 1-15

  16. Modem State Diagram NASetSysAccess Unitialized PPPCreateDevice PPPSetModemAutoAnswerRingsPPPSetModemDialString PPPSetVJ PPPSetPeerAddr PPPSetAuth Stopped PPPModemClose PPPModemInit Started PPPCheckLink PPPAddRoute PPPDelRoute PPPGetPeerAssignedAddress 1-16

  17. Direct Serial State Diagram NASetSysAccess Unitialized PPPCreateDevice Stopped PPPSetVJ PPPSetPeerAddr PPPSetAuth PPPSerialClose PPPSerialInit Started PPPCheckLink PPPAddRoute PPPDelRoute PPPGetPeerAssignedAddress 1-17

  18. State Diagrams 1-18

  19. PPP Enhancements - API Changes • PPPAddUser() superseded by NAsetSysAccess() • PPPSetAuthentication() superseded by PPPSetAuth() • PPPDelRoute() was added for cases where addresses provided by remote site such as an ISP • PPPGetPeerAssignedAddress() was added to get address from a remote site such as an ISP 1-19

  20. PPP Enhancements - Modem Driver Changes • AT&FE1 modem command from NET+OS 3 removed • Modem hardware hang up / reset (toggle DTR) replaces software hang up / reset (+++ATH command) • Dial-up client mode no longer sends ATS0=x command, only dial-up server mode sends ATS0=x command 1-20

  21. PPP Enhancements - Application Changes • NAsetSysAccess() replaces PPPAddUser() in all examples • PPPSetAuth() replaces PPPSetAuthentication() in all examples • Dial-up client example (echomod2) modified to better handle common modem communications errors. The code outlines how to close the modem on a disconnect so that the connection can be reestablished. 1-21

More Related