# cat /usr/local/etc/mpd5/mpd.conf
Код: Выделить всё
startup:
set user foo bar admin
set user foo1 bar1
set console self 127.0.0.1 5005
set console open
set web self 0.0.0.0 5006
set web open
default:
load pppoe_server
pppoe_server:
create bundle template B
set ipcp ranges 10.0.0.1/24 10.0.0.2/24
set ipcp dns 10.0.0.1
create link template common pppoe
set link enable multilink
set link action bundle B
set link disable chap pap eap
set link enable chap
set pppoe service "superisp"
create link template em0 common
set link max-children 1000
set pppoe iface em0
set link enable incoming
# cat /usr/local/etc/mpd5/mpd.secret
# cat /etc/rc.conf
Код: Выделить всё
defaultrouter="192.168.1.1"
gateway_enable="YES"
hostname="mpd5.example.net"
ifconfig_em0="inet 192.168.1.252 netmask 255.255.255.0"
inetd_enable="YES"
linux_enable="YES"
sshd_enable="YES"
mpd_enable="YES"
# ps ax | grep mpd
Код: Выделить всё
981 ?? Ss 0:00.34 /usr/local/sbin/mpd5 -p /var/run/mpd5.pid -b
# cat /etc/syslog.conf
До соединения pppoe клиента
# ifconfig -a
Код: Выделить всё
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=b<RXCSUM,TXCSUM,VLAN_MTU>
inet 192.168.1.252 netmask 0xffffff00 broadcast 192.168.1.255
ether 00:0c:29:5e:07:7a
media: Ethernet autoselect (1000baseTX <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
После соединения pppoe клиента
# ifconfig -a
Код: Выделить всё
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=b<RXCSUM,TXCSUM,VLAN_MTU>
inet 192.168.1.252 netmask 0xffffff00 broadcast 192.168.1.255
ether 00:0c:29:5e:07:7a
media: Ethernet autoselect (1000baseTX <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
ng0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> mtu 1480
inet 10.0.0.1 --> 10.0.0.2 netmask 0xffffffff
# cat /var/log/mpd.log
Код: Выделить всё
...
Jan 26 17:12:22 mpd5 mpd: Multi-link PPP daemon for FreeBSD
Jan 26 17:12:22 mpd5 mpd:
Jan 26 17:12:22 mpd5 mpd: process 981 started, version 5.2 (root@mpd5.example.ne t 21:11 25-Jan-2009)
Jan 26 17:12:22 mpd5 mpd: CONSOLE: listening on 127.0.0.1 5005
Jan 26 17:12:22 mpd5 mpd: web: listening on 0.0.0.0 5006
Jan 26 17:12:22 mpd5 mpd: PPPoE: waiting for connection on em0:, service "superi sp"
Jan 26 17:12:29 mpd5 mpd: Incoming PPPoE connection request via em0: for service "superisp" from 00:02:44:af:09:98
Jan 26 17:12:29 mpd5 mpd: [em0-2] Accepting PPPoE connection
Jan 26 17:12:29 mpd5 mpd: [em0-2] Link: OPEN event
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: Open event
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: state change Initial --> Starting
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: LayerStart
Jan 26 17:12:29 mpd5 mpd: [em0-2] PPPoE: connection successful
Jan 26 17:12:29 mpd5 mpd: [em0-2] Link: UP event
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: Up event
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: state change Starting --> Req-Sent
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: SendConfigReq #1
Jan 26 17:12:29 mpd5 mpd: [em0-2] PROTOCOMP
Jan 26 17:12:29 mpd5 mpd: [em0-2] MRU 1492
Jan 26 17:12:29 mpd5 mpd: [em0-2] MAGICNUM 36f40951
Jan 26 17:12:29 mpd5 mpd: [em0-2] AUTHPROTO CHAP MSOFTv2
Jan 26 17:12:29 mpd5 mpd: [em0-2] MP MRRU 2048
Jan 26 17:12:29 mpd5 mpd: [em0-2] MP SHORTSEQ
Jan 26 17:12:29 mpd5 mpd: [em0-2] ENDPOINTDISC [802.1] 00 0c 29 5e 07 7a
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: rec'd Configure Request #0 (Req-Sent)
Jan 26 17:12:29 mpd5 mpd: [em0-2] MRU 1480
Jan 26 17:12:29 mpd5 mpd: [em0-2] MAGICNUM 1e0f0cbe
Jan 26 17:12:29 mpd5 mpd: [em0-2] CALLBACK 6
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: SendConfigRej #0
Jan 26 17:12:29 mpd5 mpd: [em0-2] CALLBACK 6
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: rec'd Configure Reject #1 (Req-Sent)
Jan 26 17:12:29 mpd5 mpd: [em0-2] PROTOCOMP
Jan 26 17:12:29 mpd5 mpd: [em0-2] MP MRRU 2048
Jan 26 17:12:29 mpd5 mpd: [em0-2] MP SHORTSEQ
Jan 26 17:12:29 mpd5 mpd: [em0-2] ENDPOINTDISC [802.1] 00 0c 29 5e 07 7a
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: SendConfigReq #2
Jan 26 17:12:29 mpd5 mpd: [em0-2] MRU 1492
Jan 26 17:12:29 mpd5 mpd: [em0-2] MAGICNUM 36f40951
Jan 26 17:12:29 mpd5 mpd: [em0-2] AUTHPROTO CHAP MSOFTv2
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: rec'd Configure Request #1 (Req-Sent)
Jan 26 17:12:29 mpd5 mpd: [em0-2] MRU 1480
Jan 26 17:12:29 mpd5 mpd: [em0-2] MAGICNUM 1e0f0cbe
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: SendConfigAck #1
Jan 26 17:12:29 mpd5 mpd: [em0-2] MRU 1480
Jan 26 17:12:29 mpd5 mpd: [em0-2] MAGICNUM 1e0f0cbe
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: state change Req-Sent --> Ack-Sent
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: rec'd Configure Ack #2 (Ack-Sent)
Jan 26 17:12:29 mpd5 mpd: [em0-2] MRU 1492
Jan 26 17:12:29 mpd5 mpd: [em0-2] MAGICNUM 36f40951
Jan 26 17:12:29 mpd5 mpd: [em0-2] AUTHPROTO CHAP MSOFTv2
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: state change Ack-Sent --> Opened
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: auth: peer wants nothing, I want CHAP
Jan 26 17:12:29 mpd5 mpd: [em0-2] CHAP: sending CHALLENGE #1 len: 21
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: LayerUp
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: rec'd Ident #2 (Opened)
Jan 26 17:12:29 mpd5 mpd: [em0-2] MESG: MSRASV5.10
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: rec'd Ident #3 (Opened)
Jan 26 17:12:29 mpd5 mpd: [em0-2] MESG: MSRAS-0-PROXYD
Jan 26 17:12:29 mpd5 mpd: [em0-2] CHAP: rec'd RESPONSE #1 len: 60
Jan 26 17:12:29 mpd5 mpd: [em0-2] Name: "pppoed"
Jan 26 17:12:29 mpd5 mpd: [em0-2] AUTH: Trying INTERNAL
Jan 26 17:12:29 mpd5 mpd: [em0-2] AUTH: INTERNAL returned: undefined
Jan 26 17:12:29 mpd5 mpd: [em0-2] CHAP: Auth return status: undefined
Jan 26 17:12:29 mpd5 mpd: [em0-2] CHAP: Response is valid
Jan 26 17:12:29 mpd5 mpd: [em0-2] CHAP: Reply message: S=AEB1CCB8CB9831BE12A1C19 1BDAC44AB32DCE676
Jan 26 17:12:29 mpd5 mpd: [em0-2] CHAP: sending SUCCESS #1 len: 46
Jan 26 17:12:29 mpd5 mpd: [em0-2] LCP: authorization successful
Jan 26 17:12:29 mpd5 mpd: [em0-2] Link: Matched action 'bundle "B" ""'
Jan 26 17:12:29 mpd5 mpd: [em0-2] Creating new bundle using template "B".
Jan 26 17:12:29 mpd5 mpd: [B-1] Bundle: Interface ng0 created
Jan 26 17:12:29 mpd5 mpd: [em0-2] Link: Join bundle "B-1"
Jan 26 17:12:29 mpd5 mpd: [B-1] Bundle: Status update: up 1 link, total bandwidt h 64000 bps
Jan 26 17:12:29 mpd5 mpd: [B-1] IPCP: Open event
Jan 26 17:12:29 mpd5 mpd: [B-1] IPCP: state change Initial --> Starting
Jan 26 17:12:29 mpd5 mpd: [B-1] IPCP: LayerStart
Jan 26 17:12:29 mpd5 mpd: [B-1] IPCP: Up event
Jan 26 17:12:29 mpd5 mpd: [B-1] IPCP: state change Starting --> Req-Sent
Jan 26 17:12:29 mpd5 mpd: [B-1] IPCP: SendConfigReq #1
Jan 26 17:12:29 mpd5 mpd: [B-1] IPADDR 10.0.0.1
Jan 26 17:12:29 mpd5 mpd: [B-1] COMPPROTO VJCOMP, 16 comp. channels, no comp-c id
Jan 26 17:12:30 mpd5 mpd: [em0-2] rec'd unexpected protocol CCP, rejecting
Jan 26 17:12:30 mpd5 mpd: [B-1] IPCP: rec'd Configure Request #5 (Req-Sent)
Jan 26 17:12:30 mpd5 mpd: [B-1] IPADDR 0.0.0.0
Jan 26 17:12:30 mpd5 mpd: [B-1] NAKing with 10.0.0.2
Jan 26 17:12:30 mpd5 mpd: [B-1] PRIDNS 0.0.0.0
Jan 26 17:12:30 mpd5 mpd: [B-1] NAKing with 10.0.0.1
Jan 26 17:12:30 mpd5 mpd: [B-1] PRINBNS 0.0.0.0
Jan 26 17:12:30 mpd5 mpd: [B-1] SECDNS 0.0.0.0
Jan 26 17:12:30 mpd5 mpd: [B-1] SECNBNS 0.0.0.0
Jan 26 17:12:30 mpd5 mpd: [B-1] IPCP: SendConfigRej #5
Jan 26 17:12:30 mpd5 mpd: [B-1] PRINBNS 0.0.0.0
Jan 26 17:12:30 mpd5 mpd: [B-1] SECDNS 0.0.0.0
Jan 26 17:12:30 mpd5 mpd: [B-1] SECNBNS 0.0.0.0
Jan 26 17:12:30 mpd5 mpd: [B-1] IPCP: rec'd Configure Reject #1 (Req-Sent)
Jan 26 17:12:30 mpd5 mpd: [B-1] COMPPROTO VJCOMP, 16 comp. channels, no comp-c id
Jan 26 17:12:30 mpd5 mpd: [B-1] IPCP: SendConfigReq #2
Jan 26 17:12:30 mpd5 mpd: [B-1] IPADDR 10.0.0.1
Jan 26 17:12:30 mpd5 mpd: [B-1] IPCP: rec'd Configure Request #6 (Req-Sent)
Jan 26 17:12:30 mpd5 mpd: [B-1] IPADDR 0.0.0.0
Jan 26 17:12:30 mpd5 mpd: [B-1] NAKing with 10.0.0.2
Jan 26 17:12:30 mpd5 mpd: [B-1] PRIDNS 0.0.0.0
Jan 26 17:12:30 mpd5 mpd: [B-1] NAKing with 10.0.0.1
Jan 26 17:12:30 mpd5 mpd: [B-1] IPCP: SendConfigNak #6
Jan 26 17:12:30 mpd5 mpd: [B-1] IPADDR 10.0.0.2
Jan 26 17:12:30 mpd5 mpd: [B-1] PRIDNS 10.0.0.1
Jan 26 17:12:31 mpd5 mpd: [B-1] IPCP: rec'd Configure Ack #2 (Req-Sent)
Jan 26 17:12:31 mpd5 mpd: [B-1] IPADDR 10.0.0.1
Jan 26 17:12:31 mpd5 mpd: [B-1] IPCP: state change Req-Sent --> Ack-Rcvd
Jan 26 17:12:31 mpd5 mpd: [B-1] IPCP: rec'd Configure Request #7 (Ack-Rcvd)
Jan 26 17:12:31 mpd5 mpd: [B-1] IPADDR 10.0.0.2
Jan 26 17:12:31 mpd5 mpd: [B-1] 10.0.0.2 is OK
Jan 26 17:12:31 mpd5 mpd: [B-1] PRIDNS 10.0.0.1
Jan 26 17:12:31 mpd5 mpd: [B-1] IPCP: SendConfigAck #7
Jan 26 17:12:31 mpd5 mpd: [B-1] IPADDR 10.0.0.2
Jan 26 17:12:31 mpd5 mpd: [B-1] PRIDNS 10.0.0.1
Jan 26 17:12:31 mpd5 mpd: [B-1] IPCP: state change Ack-Rcvd --> Opened
Jan 26 17:12:31 mpd5 mpd: [B-1] IPCP: LayerUp
Jan 26 17:12:31 mpd5 mpd: [B-1] 10.0.0.1 -> 10.0.0.2
Jan 26 17:12:31 mpd5 mpd: [B-1] IFACE: Up event
...