Hi,
I can't diagnose your problem, but I can show you a working 3G ppp setup.
I normally have my Huawei E1762 USB 3G modem plugged into my Billion router where it provides the Internet gateway for the entire home network. However, life was not always so easy, as the Billion firmware used to be troublesome on cloudy days (despite a dual bandwidth 3G antenna on a 6.5 m mast).
On those cloudy days, I would switch the 3G modem to a USB port on my FreeBSD system. The ppp configuration file I use to dial out is shown below.
The linkup and linkdown scripts show the default route being managed (moved between the ppp link and the Billion router).
The IP address of the Billion router is 192.168.1.254 (host name is billion).
Below is the ifconfig and netstat with the Billion router providing the default route (no ppp) and then with ppp running and providing the default route.
What's not shown is that when ppp is running, I usually also turn off the Billion router and push its IP address as an alias onto em0 (my kernel routes) -- so the the old default route still works for everything else on the network.
My ISP identifies itself as "internode" and the script tag "internerd" is for them.
Upon review, there are a couple of things that worry me below, including a netmask of 0xffffffff. I need to investigate this. But it works reliably.
/etc/ppp/ppp.conf
Code:
# Run this as root (if you want linkup and linkdown route changes to work)
#
# /usr/sbin/ppp -ddial internerd
#
default:
allow users *
#set log Phase Chat Connect hdlc LCP IPCP IPV6CP CCP tun
set log Phase Chat Connect
internerd:
set device /dev/cuaU0.0
set timeout 0
set authname my.login.name
set authkey my.login.password
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
\"\" \
AT OK-AT-OK \
AT+CFUN=1 OK-AT-OK \
AT+CMEE=2 OK-AT-OK \
AT+CSQ OK \
AT+CGDCONT=1,\\\"IP\\\",\\\"internode\\\" OK \
AT+CGACT? OK-AT-OK \
AT+CGATT? OK \
AT+CGCLASS? OK \
AT+COPS? OK \
\\dATD*99# TIMEOUT 40 CONNECT"
set crtscts on
disable vjcomp
disable acfcomp
disable deflate
disable deflate24
disable pred1
disable protocomp
disable mppe
disable ipv6cp
disable lqr
disable echo
nat enable yes
#disable dns
resolv writable
#set dns 208.67.220.220 208.67.222.222
set ifaddr 10.1.0.2/0 10.1.0.1/0 255.255.255.255 0.0.0.0
#add default HISADDR
/etc/ppp/ppp.linkup
Code:
# These commands executed with uid of ppp invoker!
internerd:
shell route delete default
shell route add default -interface INTERFACE
/etc/ppp/ppp.linkdown
Code:
# These commands executed with uid of ppp invoker!
default:
shell logger "LABEL down (up UPTIME): OCTETSIN received, OCTETSOUT sent"
internerd:
shell route delete default
shell route add default billion
[CMD=""]ifconfig -a # before dialing out[/CMD]
Code:
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
ether 00:07:e9:d4:e9:3b
inet 192.168.1.24 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
[CMD=""]netstat -rn # before dialing out[/CMD]
Code:
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.1.254 UGS 0 10260 em0
127.0.0.1 link#4 UH 0 215 lo0
192.168.1.0/24 link#2 U 2 9870 em0
192.168.1.24 link#2 UHS 0 0 lo0
[CMD=""]ifconfig -a # after dialing out[/CMD]
Code:
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
ether 00:07:e9:d4:e9:3b
inet 192.168.1.24 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet 127.0.0.1 netmask 0xff000000
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
inet 59.167.9.135 --> 10.1.0.1 netmask 0xffffffff
Opened by PID 1634
[CMD=""]netstat -rn # after dialing out[/CMD]
Code:
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default tun0 US 0 5 tun0
10.1.0.1 link#5 UHS 0 0 tun0
59.167.9.135 link#5 UHS 0 0 lo0
127.0.0.1 link#4 UH 0 0 lo0
192.168.1.0/24 link#2 U 2 808 em0
192.168.1.24 link#2 UHS 0 0 lo0
I have attached the ppp log
View attachment ppp_log.txt.
HTH.
--
Phil