Share via

Powershell - creating a DUN dialup script that also delays start of PPP LCP handshake after connection completes

Gordon Finlay 21 Reputation points
2021-02-09T20:02:41.973+00:00

Is there a way to implement a Powershell script that:

  1. Uses RAS remote access or DUN dial-up networking services to establish a connection to dial out to a 3G HSPA cellular modem (using "ATD*99#") to establish a PPP packet-radio connection?
  2. Configures the DUN dialup network connection such that there is a 500ms delay after dialing before initiating the LCP handshake to negotiate a PPP session?

A delay is needed after dialing before the start of the PPP LCP handshake because we wish to avoid the peer server dropping (failing to receive) a premature LCP Configure-Request (ConfReq) packet sent by the local Windows PC before the remote server has had a chance to complete PPP stack startup initialization. If the first LCP ConfReq packet is not received, the peer server will not send a ConfAck. Then the local PC will timeout waiting for a ConfAck, and it will retry the ConfReq request after 4-5 seconds.

I know how to implement a delay before start of LCP handshake on Linux with the pppd utility by using the "connect-delay nnn" parameter in a peer script / chat script (where nnn is the delay in milliseconds before LCP handshake is started once a connection is established by dialing). But I need a Windows equivalent solution.

Any suggestions on how to do this?

Thanks,
Gord Finlay

Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.