Friday, January 03, 2020

LCP keepalive timeout for PPPOE

Greetings,

I am getting LCP keepalive timeout errors when setting up a PPPOE
connection to a fiber optic line. I am attempting this on
BeagleBone Black running OpenBSD 6.6 GENERIC armv7.

I have two interfaces which I set up as follows:

# cat /etc/hostname.cpsw0
up

# cat /etc/hostname.pppoe0
inet 0.0.0.0 255.255.255.255 NONE \
pppoedev cpsw0 authproto pap \
authname '12345678@isp.net' authkey 'abcd1234' up
dest 0.0.0.1
#inet6 eui64
!/sbin/route add default -ifp pppoe0 0.0.0.1
#!/sbin/route add -inet6 default -ifp pppoe0 fe80::%pppoe0

(IPv6 is not supported by my ISP)

Internet works on bootup for a while, but after about 5 minutes,
I see this error in /var/log/messages:

/bsd: pppoe0: LCP keepalive timeout

Networking will work for about 5 minutes, then there will be a
disconnection lasting for about 30 seconds. Each time, it's because
of an LCP keepalive timeout.

I can confirm that similar PPPOE setups as above used to work on
my x64 PCs until last month, when I suspect my ISP changed its
settings. My non-OpenBSD router continues to function as normal using
the fiber optic PPPOE. I am convinced that I need to modify the
LCP keepalive settings to match my ISP's.

Someone had suggested I take a look into npppd.

# cat /etc/npppd/npppd.conf

tunnel PPPOE protocol pppoe {
listen on interface cpsw0
lcp-keepalive yes
lcp-keepalive-interval 150
lcp-keepalive-retry-interval 30
lcp-keepalive-max-retries 20
lcp-timeout 3
debug-dump-pktin lcp

authentication-method pap
}
authentication LOCAL type local {
users-file "/etc/npppd/npppd-users"
}
ipcp IPCP {
dns-servers 8.8.8.8
}
interface pppx0 address 10.0.0.1 ipcp IPCP

bind tunnel from PPPOE authenticated by LOCAL to pppx0

# cat /etc/npppd/npppd-users
12345678@isp.net:\
:password=abcd1234:

I also toggled the sysctl for pipex:

# cat /etc/sysctl.conf
net.pipex.enable=1

I started npppd:

# npppd -d
2020-01-03 16:03:50:NOTICE: Starting npppd pid=9452 version=5.0.0
2020-01-03 16:03:50:WARNING: pptpd GRE protocol not allowed
2020-01-03 16:03:50:NOTICE: Load configuration from='/etc/npppd/npppd.conf' successfully.
2020-01-03 16:03:50:INFO: pppx0 Started pppx
2020-01-03 16:03:50:INFO: ipcp=IPCP pool
2020-01-03 16:03:50:INFO: Loading pool config successfully.
2020-01-03 16:03:50:INFO: pppoed Listening on cpsw0 (PPPoE) [PPPOE] address=40:bd:32:d3:fc:ab

Here's what ifconfig shows:

$ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768
index 3 priority 0 llprio 3
groups: lo
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet 127.0.0.1 netmask 0xff000000
cpsw0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 40:bd:32:d3:fc:ab
index 1 priority 0 llprio 3
media: Ethernet autoselect (100baseTX full-duplex)
status: active
enc0: flags=0<>
index 2 priority 0 llprio 3
groups: enc
status: active
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33168
index 4 priority 0 llprio 3
groups: pflog
pppoe0: flags=8851<UP,POINTOPOINT,RUNNING,SIMPLEX,MULTICAST> mtu 1492
index 5 priority 0 llprio 3
dev: cpsw0 state: session
sid: 0x1 PADI retries: 1 PADR retries: 0 time: 00:01:45
sppp: phase network authproto pap
groups: pppoe egress
status: active
inet 114.35.21.203 --> 111.245.96.254 netmask 0xffffffff

I notice there is no pppx0 device. I'm not sure if that matters.
With this configuration (including /etc/hostname.pppoe0), I
continue to get LCP timeout errors roughly every 5 minutes.

I was told by a friend that npppd and hostname.pppoe0 should not exist
simultaneously, so I tried deleting /etc/hostname.pppoe0, rebooting,
then running npppd by itself:

# rcctl enable npppd
# rcctl restart npppd

Now it seems I have no connectivity whatsoever:

# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
ping: sendmsg: No route to host

If it helps, here is my /etc/pf.conf:

# cat /etc/pf.conf

set skip on lo
match in all scrub (no-df random-id max-mss 1440)
block return
pass
block return in on ! lo0 proto tcp to port 6000:6010

Although I'm doing this on a BeagleBone Black, I've had

Attached is my dmesg if that helps:

real mem = 477679616 (455MB)
avail mem = 457969664 (436MB)
mainbus0 at root: TI AM335x BeagleBone Black
cpu0 at mainbus0 mpidr 0: ARM Cortex-A8 r3p2
cpu0: 32KB 64b/line 4-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu0: 256KB 64b/line 8-way L2 cache
omap0 at mainbus0
prcm0 at omap0 rev 0.2
dmtimer0 at omap0 rev 3.1
dmtimer1 at omap0 rev 3.1
simplebus0 at mainbus0: "ocp"
simplebus1 at simplebus0: "l4_wkup"
"wkup_m3" at simplebus1 not configured
simplebus2 at simplebus1: "prcm"
"l4_per_cm" at simplebus2 not configured
"l4_wkup_cm" at simplebus2 not configured
"mpu_cm" at simplebus2 not configured
"l4_rtc_cm" at simplebus2 not configured
"gfx_l3_cm" at simplebus2 not configured
"l4_cefuse_cm" at simplebus2 not configured
syscon0 at simplebus3: "scm_conf"
pinctrl0 at simplebus3
"wkup_m3_ipc" at simplebus3 not configured
"dma-router" at simplebus3 not configured
intc0 at simplebus0 rev 5.0
"edma" at simplebus0 not configured
"tptc" at simplebus0 not configured
"tptc" at simplebus0 not configured
"tptc" at simplebus0 not configured
omgpio0 at simplebus0: rev 0.1
gpio0 at omgpio0: 32 pins
omgpio1 at simplebus0: rev 0.1
gpio1 at omgpio1: 32 pins
omgpio2 at simplebus0: rev 0.1
gpio2 at omgpio2: 32 pins
omgpio3 at simplebus0: rev 0.1
gpio3 at omgpio3: 32 pins
com0 at simplebus0: ti16750, 64 byte fifo
com0: console
tiiic0 at simplebus0 rev 0.11
iic0 at tiiic0
"atmel,24c256" at iic0 addr 0x50 not configured
nxphdmi0 at iic0 addr 0x70: rev 0x0301
nxphdmi0: no display detected
tiiic1 at simplebus0 rev 0.11
iic1 at tiiic1
"atmel,24c256" at iic1 addr 0x54 not configured
"atmel,24c256" at iic1 addr 0x55 not configured
"atmel,24c256" at iic1 addr 0x56 not configured
"atmel,24c256" at iic1 addr 0x57 not configured
ommmc0 at simplebus0
sdmmc0 at ommmc0: 4-bit, sd high-speed, mmc high-speed
ommmc1 at simplebus0
sdmmc1 at ommmc1: 1-bit
"spinlock" at simplebus0 not configured
omdog0 at simplebus0 rev 0.1
"mailbox" at simplebus0 not configured
"timer" at simplebus0 not configured
"timer" at simplebus0 not configured
"timer" at simplebus0 not configured
"timer" at simplebus0 not configured
"timer" at simplebus0 not configured
"timer" at simplebus0 not configured
"rtc" at simplebus0 not configured
"usb" at simplebus0 not configured
cpsw0 at simplebus0: version 1.12 (0), address 40:bd:32:d3:fc:ab
ukphy0 at cpsw0 phy 0: Generic IEEE 802.3u media interface, rev. 1: OU, model 0x000f
"ocmcram" at simplebus0 not configured
amdisplay0 at simplebus0
amdisplay0: no display attached.
"emif" at simplebus0 not configured
"sham" at simplebus0 not configured
"aes" at simplebus0 not configured
"mcasp" at simplebus0 not configured
"rng" at simplebus0 not configured
sdmmc0: can't enable card
scsibus0 at sdmmc1: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <Kingston, M62704, 0000> removable
sd0: 3648MB, 512 bytes/sector, 7471104 sectors
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
bootfile: sd0a:/bsd
boot device: sd0
root on sd0a (d5018eab85909b4e.a) swap on sd0b dump on sd0b
WARNING: CHECK AND RESET THE DATE!
pppoe0: LCP keepalive timeout
pppoe0: LCP keepalive timeout

(last line repeats 100x)

jrmu

No comments:

Post a Comment