Disable IPv6 during connection

Issue:My startup script will sometimes fail and sometimes hang because of the script attempting to IPv6. My current scenario is a static IPv4 from my internet provider. After several attempts to connect to IPv6 I either get a failure and then the modem hangs up or the script just sits and hangs and doesnt’ every close. I have disabled IPv6 on the entire Raspberry Pi via /etc/sysctl.conf.

I don’t see anything in the rak2013 specifically stating IPv4 or IPv6 but I would love to find a way to only attempt IPv6 and then close the connect script successfully.

Any thoughts on this?

Sleeping for 12...
Initializing modem and connecting to Verizon, please wait...
pppd options in effect:
debug		# (from /etc/ppp/peers/gprs)
nodetach		# (from /etc/ppp/peers/gprs)
dump		# (from /etc/ppp/peers/gprs)
noauth		# (from /etc/ppp/peers/gprs)
remotename 3gppp		# (from /etc/ppp/peers/gprs)
/dev/ttyAMA0		# (from /etc/ppp/peers/gprs)
921600		# (from /etc/ppp/peers/gprs)
lock		# (from /etc/ppp/peers/gprs)
connect chat -s -v -f /etc/chatscripts/quectel-chat-connect -T we01.vzwstatic	# (from /etc/ppp/peers/gprs)
disconnect chat -s -v -f /etc/chatscripts/quectel-chat-disconnect		# (from /etc/ppp/peers/gprs)
nocrtscts		# (from /etc/ppp/peers/gprs)
modem		# (from /etc/ppp/peers/gprs)
asyncmap 0		# (from /etc/ppp/options)
lcp-echo-failure 4		# (from /etc/ppp/options)
lcp-echo-interval 30		# (from /etc/ppp/options)
hide-password		# (from /etc/ppp/peers/gprs)
novj		# (from /etc/ppp/peers/gprs)
novjccomp		# (from /etc/ppp/peers/gprs)
ipcp-accept-local		# (from /etc/ppp/peers/gprs)
ipcp-accept-remote		# (from /etc/ppp/peers/gprs)
ipparam 3gppp		# (from /etc/ppp/peers/gprs)
noipdefault		# (from /etc/ppp/peers/gprs)
ipcp-max-failure 30		# (from /etc/ppp/peers/gprs)
defaultroute		# (from /etc/ppp/peers/gprs)
usepeerdns		# (from /etc/ppp/peers/gprs)
noccp		# (from /etc/ppp/peers/gprs)
noipx		# (from /etc/ppp/options)
abort on (BUSY)
abort on (NO CARRIER)
abort on (NO DIALTONE)
abort on (ERROR)
abort on (NO ANSWER)
timeout set to 30 seconds
send (AT^M)
expect (OK)
AT^M^M
OK
 -- got it

send (ATE0^M)
expect (OK)
^M
ATE0^M^M
OK
 -- got it

send (ATI;+CSUB;+CSQ;+COPS?;+CGREG?;&D2^M)
expect (OK)
^M
^M
Quectel^M
EG95^M
Revision: EG95NAFBR05A04M4G^M
^M
SubEdition: V01^M
^M
+CSQ: 26,99^M
^M
+COPS: 0,0,"Verizon Wireless",7^M
^M
+CGREG: 0,1^M
^M
OK
 -- got it

send (AT+CGDCONT=1,"IP","we01.vzwstatic",,0,0^M)
expect (OK)
^M
^M
OK
 -- got it

send (ATD*99#^M)
expect (CONNECT)
^M
^M
CONNECT
 -- got it

Script chat -s -v -f /etc/chatscripts/quectel-chat-connect -T we01.vzwstatic finished (pid 1098), status = 0x0
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/ttyAMA0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xebf6955f> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x1031a317> <pcomp> <accomp>]
No auth is possible
sent [LCP ConfRej id=0x0 <auth chap MD5>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xebf6955f> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x1031a317> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x1031a317> <pcomp> <accomp>]
sent [LCP EchoReq id=0x0 magic=0xebf6955f]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::985f:a85c:ead4:d0a3>]
rcvd [LCP DiscReq id=0x2 magic=0x1031a317]
rcvd [LCP EchoRep id=0x0 magic=0x1031a317 eb f6 95 5f]
rcvd [IPCP ConfReq id=0x0]
sent [IPCP ConfNak id=0x0 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x1 <addr XX.XX.XX.XX> <ms-dns1 XX.XX.XX.XX> <ms-dns2 XX.XX.XX.XX>]
sent [IPCP ConfReq id=0x2 <addr XX.XX.XX.XX> <ms-dns1 XX.XX.XX.XX> <ms-dns2 XX.XX.XX.XX>]
rcvd [IPCP ConfReq id=0x1]
sent [IPCP ConfAck id=0x1]
rcvd [IPCP ConfAck id=0x2 <addr XX.XX.XX.XX> <ms-dns1 XX.XX.XX.XX> <ms-dns2 XX.XX.XX.XX>]
Could not determine remote IP address: defaulting to 10.64.64.64
Script /etc/ppp/ip-pre-up started (pid 1103)
Script /etc/ppp/ip-pre-up finished (pid 1103), status = 0x0
local  IP address XX.XX.XX.XX
remote IP address 10.64.64.64
primary   DNS address XX.XX.XX.XX
secondary DNS address XX.XX.XX.XX
Script /etc/ppp/ip-up started (pid 1106)
Script /etc/ppp/ip-up finished (pid 1106), status = 0x0
sent [IPV6CP ConfReq id=0x1 <addr fe80::985f:a85c:ead4:d0a3>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::985f:a85c:ead4:d0a3>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::985f:a85c:ead4:d0a3>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::985f:a85c:ead4:d0a3>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::985f:a85c:ead4:d0a3>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::985f:a85c:ead4:d0a3>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::985f:a85c:ead4:d0a3>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::985f:a85c:ead4:d0a3>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::985f:a85c:ead4:d0a3>]
IPV6CP: timeout sending Config-Requests

Found the solution:

in the file /etc/ppp/options just add the option noipv6

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.