Netgraph mpd as a PPPoE access concentrator
Motonori Shindo
mshindo at mshindo.net
Sun Jul 10 07:28:29 GMT 2005
Hi,
I'm trying to use Netgraph (mpd) as a PPPoE access concentrator
(i.e. PPPoE server). It is working OK but with one minor potential
problem which I haven't been able to solve.
The following is the mpd log file (replacing ip addresses with
XXX.XXX.XXX.XXX) and configuration files. As we see in this log, the
first incoming request succeeds and operates normally. However,
"device" seems to be getting an attempt to bring it up again right
after the first call is disconnected. This attempt never succeeds and
is repeated indefinitely.
Even in this state, subsequent PPPoE incoming request succeeds, so
this is not a significant problem, but I just don't feel
comfortable. Can anyone can give me an advice to get this problem
solved? Thanks!
ober# mpd
Multi-link PPP for FreeBSD, by Archie L. Cobbs.
Based on iij-ppp, by Toshiharu OHNO.
mpd: pid 15311, version 3.18 (root at freebsd.org 22:43 3-Apr-2005)
[AC0] ppp node is "mpd15311-AC0"
[AC0] exec: /sbin/ifconfig bge0 up
[AC0] using interface ng0
[AC1] ppp node is "mpd15311-AC1"
[AC1] using interface ng1
[AC1:AC1] [AC0] PPPoE server listening on bge0: for service "*"
Incoming PPPoE connection request via bge0: for service "*" from 00:90:4b:74:2a:7a
[AC0] Accepting PPPoE connection
[AC0] PPPoE response sent
[AC0] IPCP: Open event
[AC0] IPCP: state change Initial --> Starting
[AC0] IPCP: LayerStart
[AC0] bundle: OPEN event in state CLOSED
[AC0] opening link "AC0"...
[AC0] link: OPEN event
[AC0] LCP: Open event
[AC0] LCP: state change Initial --> Starting
[AC0] LCP: LayerStart
[AC0] device: OPEN event in state DOWN
[AC0] PppoeOpen() on incoming call
[AC0] device is now in state OPENING
[AC0] PPPoE connection successful
[AC0] device: UP event in state OPENING
[AC0] device is now in state UP
[AC0] link: UP event
[AC0] link: origination is remote
[AC0] LCP: Up event
[AC0] LCP: state change Starting --> Req-Sent
[AC0] LCP: phase shift DEAD --> ESTABLISH
[AC0] LCP: SendConfigReq #1
MRU 1492
MAGICNUM fc5008f5
AUTHPROTO CHAP MD5
[AC0] LCP: rec'd Configure Request #0 link 0 (Req-Sent)
MRU 1480
MAGICNUM 250854c3
CALLBACK
Not supported
[AC0] LCP: SendConfigRej #0
CALLBACK
[AC0] LCP: rec'd Configure Ack #1 link 0 (Req-Sent)
MRU 1492
MAGICNUM fc5008f5
AUTHPROTO CHAP MD5
[AC0] LCP: state change Req-Sent --> Ack-Rcvd
[AC0] LCP: rec'd Configure Request #1 link 0 (Ack-Rcvd)
MRU 1480
MAGICNUM 250854c3
[AC0] LCP: SendConfigAck #1
MRU 1480
MAGICNUM 250854c3
[AC0] LCP: state change Ack-Rcvd --> Opened
[AC0] LCP: phase shift ESTABLISH --> AUTHENTICATE
[AC0] LCP: auth: peer wants nothing, I want CHAP
[AC0] CHAP: sending CHALLENGE
[AC0] LCP: LayerUp
[AC0] LCP: rec'd Ident #2 link 0 (Opened)
MESG: MSRASV5.10
[AC0] LCP: rec'd Ident #3 link 0 (Opened)
MESG: MSRAS-0-SHINDO-DELL
[AC0] CHAP: rec'd RESPONSE #1
Name: "pppoe2"
Peer name: "pppoe2"
Response is valid
[AC0] CHAP: sending SUCCESS
[AC0] LCP: authorization successful
[AC0] LCP: phase shift AUTHENTICATE --> NETWORK
[AC0] setting interface ng0 MTU to 1480 bytes
[AC0] up: 1 link, total bandwidth 64000 bps
[AC0] IPCP: Up event
[AC0] IPCP: state change Starting --> Req-Sent
[AC0] IPCP: SendConfigReq #1
IPADDR XXX.XXX.XXX.XXX
COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
[AC0] rec'd unexpected protocol CCP on link 0, rejecting
[AC0] IPCP: rec'd Configure Request #5 link 0 (Req-Sent)
IPADDR 0.0.0.0
NAKing with XXX.XXX.XXX.XXX
PRIDNS 0.0.0.0
PRINBNS 0.0.0.0
SECDNS 0.0.0.0
SECNBNS 0.0.0.0
[AC0] IPCP: SendConfigRej #5
PRIDNS 0.0.0.0
PRINBNS 0.0.0.0
SECDNS 0.0.0.0
SECNBNS 0.0.0.0
[AC0] IPCP: rec'd Configure Reject #1 link 0 (Req-Sent)
COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
[AC0] IPCP: SendConfigReq #2
IPADDR XXX.XXX.XXX.XXX
[AC0] IPCP: rec'd Configure Request #6 link 0 (Req-Sent)
IPADDR 0.0.0.0
NAKing with XXX.XXX.XXX.XXX
[AC0] IPCP: SendConfigNak #6
IPADDR XXX.XXX.XXX.XXX
[AC0] IPCP: rec'd Configure Ack #2 link 0 (Req-Sent)
IPADDR XXX.XXX.XXX.XXX
[AC0] IPCP: state change Req-Sent --> Ack-Rcvd
[AC0] IPCP: rec'd Configure Request #7 link 0 (Ack-Rcvd)
IPADDR XXX.XXX.XXX.XXX
XXX.XXX.XXX.XXX is OK
[AC0] IPCP: SendConfigAck #7
IPADDR XXX.XXX.XXX.XXX
[AC0] IPCP: state change Ack-Rcvd --> Opened
[AC0] IPCP: LayerUp
XXX.XXX.XXX.XXX -> XXX.XXX.XXX.XXX
[AC0] IFACE: Up event
[AC0] IFACE: Opening
[AC0] setting interface ng0 MTU to 1480 bytes
[AC0] exec: /sbin/ifconfig ng0 XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX netmask 0xffffffff -link0
[AC0] exec: /usr/sbin/arp -s XXX.XXX.XXX.XXX 0:1:2:73:d:14 pub
[AC0] exec: command returned 256
[AC0] exec: /sbin/route add XXX.XXX.XXX.XXX -iface lo0
[AC0] IFACE: Up event
(at this point, PPPoE session is manually disconnected)
[AC0] LCP: rec'd Terminate Request #8 link 0 (Opened)
[AC0] LCP: state change Opened --> Stopping
[AC0] LCP: phase shift NETWORK --> TERMINATE
[AC0] setting interface ng0 MTU to 1500 bytes
[AC0] up: 0 links, total bandwidth 9600 bps
[AC0] IPCP: Down event
[AC0] IPCP: state change Opened --> Starting
[AC0] IPCP: LayerDown
[AC0] IFACE: Down event
[AC0] exec: /sbin/route delete XXX.XXX.XXX.XXX -iface lo0
[AC0] exec: /sbin/ifconfig ng0 down delete -link0
[AC0] LCP: SendTerminateAck #2
[AC0] LCP: LayerDown
[AC0] LCP: rec'd Terminate Request #9 link 0 (Stopping)
[AC0] LCP: SendTerminateAck #3
[AC0] LCP: state change Stopping --> Stopped
[AC0] LCP: phase shift TERMINATE --> ESTABLISH
[AC0] LCP: LayerFinish
[AC0] device: CLOSE event in state UP
[AC0] device is now in state CLOSING
[AC0] device: DOWN event in state CLOSING
[AC0] device is now in state DOWN
[AC0] link: DOWN event
[AC0] LCP: Down event
[AC0] LCP: state change Stopped --> Starting
[AC0] LCP: phase shift ESTABLISH --> DEAD
[AC0] LCP: LayerStart
[AC0] device: OPEN event in state DOWN
[AC0] pausing 4 seconds before open
[AC0] device is now in state DOWN
[AC0] device: OPEN event in state DOWN
[AC0] device is now in state DOWN
[AC0] closing link "AC0"...
[AC0] link: CLOSE event
[AC0] LCP: Close event
[AC0] LCP: state change Starting --> Initial
[AC0] LCP: LayerFinish
[AC0] device: CLOSE event in state DOWN
[AC0] device is now in state DOWN
[AC0] opening link "AC0"...
[AC0] link: OPEN event
[AC0] LCP: Open event
[AC0] LCP: state change Initial --> Starting
[AC0] LCP: LayerStart
[AC0] device: OPEN event in state DOWN
[AC0] pausing 1 seconds before open
[AC0] device is now in state DOWN
[AC0] device: OPEN event in state DOWN
[AC0] PPPoE originate option is not enabled
[AC0] device is now in state OPENING
[AC0] device: DOWN event in state OPENING
[AC0] device is now in state DOWN
[AC0] link: DOWN event
[AC0] LCP: Down event
[AC0] device: OPEN event in state DOWN
[AC0] pausing 4 seconds before open
[AC0] device is now in state DOWN
[AC0] device: OPEN event in state DOWN
[AC0] pausing 2 seconds before open
[AC0] device is now in state DOWN
[AC0] device: OPEN event in state DOWN
[AC0] PPPoE originate option is not enabled
[AC0] device is now in state OPENING
[AC0] device: DOWN event in state OPENING
[AC0] device is now in state DOWN
[AC0] link: DOWN event
[AC0] LCP: Down event
[AC0] device: OPEN event in state DOWN
[AC0] pausing 6 seconds before open
[AC0] device is now in state DOWN
:
:
:
(this repeats indefinitely)
[mpd.conf]
default:
load AC0
load AC1
AC0:
new -i ng0 AC0 AC0
set ipcp ranges 221.245.168.210/32 221.245.168.212/32
load pppoe_common
AC1:
new -i ng1 AC1 AC1
set ipcp ranges 221.245.168.210/32 221.245.168.213/32
load pppoe_common
pppoe_common:
set iface disable on-demand
set bundle disable multilink
set iface enable proxy-arp
set iface idle 0
set link no acfcomp protocomp
set link no pap chap
set link enable chap
set link mtu 1492
set link keep-alive 10 60
set ipcp yes vjcomp
[mpd.links]
AC0:
set link type pppoe
set pppoe iface bge0
set pppoe service "*"
set pppoe enable incoming
set pppoe disable originate
AC1:
set link type pppoe
set pppoe iface bge0
set pppoe service "*"
set pppoe enable incoming
set pppoe disable originate
---
Motonori Shindo
Fivefront Corporation
More information about the freebsd-net
mailing list