金子邦彦研究室インストールFreeBSDFreeBSD で DION の ADSL/XDSL(PPPoE)

FreeBSD で DION の ADSL/XDSL(PPPoE)

FreeBSD で xDSL を使う方法についてです.

私の経験では、

DION の ADSL/XDSL(PPPoE) で通信しよう

カーネルの再構築

次のように設定してカーネルを再構築します.
options NETGRAPH
options NETGRAPH_ETHER
options NETGRAPH_PPPOE
options NETGRAPH_SOCKET

/etc/ppp/ppp.conf の設定

設定に冗長なところがあるかも知れませんが、通信できたので、追求をやめま した。 なお、「 set device PPPoE:vr0」の行は、お使いのイーサネットデバイスに 合わせて変更してください。

default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION (built COMPILATIONDATE)

 # Ensure that "device" references the correct serial port
 # for your modem. (cuaa0 = COM1, cuaa1 = COM2)
 #
 set device PPPoE:vr0
 set MRU 1454
 set MTU 1454
 add default HISADDR
 set server /var/run/internet "" 0177
 set dial
 set authname <ログインID>
 set authkey <ログインパスワード>

papchap:
 #
 # edit the next three lines and replace the items in caps with
 # the values which have been assigned by your ISP.
 #

 set authname <ログインID>
 set authkey <ログインパスワード>
 set openmode active
 accept pap

 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
 add default HISADDR                    # Add a (sticky) default route

/etc/rc.conf

次の3行を追加です.
ppp_enable="YES"
ppp_mode="ddial"
ppp_profile="papchap"

通信できなかったら、

/var/log/ppp.log にログが残っているので、これでうまく行かない原因を推理します.

うまく通信できているときのログの例(一部分です)

Nov 14 23:24:09 unixmach ppp[51]: tun0: Phase: Received NGM_PPPOE_ACNAME (hook "DION")
Nov 14 23:24:10 unixmach ppp[51]: tun0: Phase: Received NGM_PPPOE_SUCCESS (hook "tun0")
Nov 14 23:24:10 unixmach ppp[51]: tun0: Phase: deflink: carrier -> login
Nov 14 23:24:10 unixmach ppp[51]: tun0: Phase: deflink: login -> lcp
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: FSM: Using "deflink" as a transport
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: deflink: State change Initial --> Closed
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: deflink: State change Closed --> Stopped
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: deflink: RecvConfigReq(14) state = Stopped
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP:  MRU[4] 1454
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP:  AUTHPROTO[4] 0xc023 (PAP)
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP:  MAGICNUM[6] 0xXXXXXXXX
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: deflink: SendConfigReq(1) state = Stopped
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP:  ACFCOMP[2]
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP:  PROTOCOMP[2]
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP:  ACCMAP[6] 0x00000000
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP:  MRU[4] 1454
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP:  MAGICNUM[6] 0xXXXXXXXX
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: deflink: SendConfigAck(14) state = Stopped
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP:  MRU[4] 1454
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP:  AUTHPROTO[4] 0xc023 (PAP)
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP:  MAGICNUM[6] 0xXXXXXXXX
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: deflink: LayerStart
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: deflink: State change Stopped --> Ack-Sent
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: deflink: RecvConfigAck(1) state = Ack-Sent
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: deflink: State change Ack-Sent --> Opened
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: deflink: LayerUp
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: Sending ident magic 2ddf6bd1 text user-ppp 2.3.3 (built Jun 11 2002)
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: deflink: SendIdent(0) state = Opened
Nov 14 23:24:10 unixmach ppp[51]: tun0: Phase: bundle: Authenticate
Nov 14 23:24:10 unixmach ppp[51]: tun0: Phase: deflink: his = PAP, mine = none
Nov 14 23:24:10 unixmach ppp[51]: tun0: Phase: Pap Output: XXXXXXXXXX@XXX.XXXX.XX.XX ********
Nov 14 23:24:10 unixmach ppp[51]: tun0: Phase: Pap Input: SUCCESS ()
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: Using trigger address 0.0.0.0
Nov 14 23:24:10 unixmach ppp[51]: tun0: CCP: FSM: Using "deflink" as a transport
Nov 14 23:24:10 unixmach ppp[51]: tun0: CCP: deflink: State change Initial --> Closed
Nov 14 23:24:10 unixmach ppp[51]: tun0: CCP: deflink: LayerStart.
Nov 14 23:24:10 unixmach ppp[51]: tun0: CCP: MPPE: Not usable without CHAP81
Nov 14 23:24:10 unixmach ppp[51]: tun0: CCP: deflink: SendConfigReq(1) state = Closed
Nov 14 23:24:10 unixmach ppp[51]: tun0: CCP:  DEFLATE[4] win 15
Nov 14 23:24:10 unixmach ppp[51]: tun0: CCP:  PRED1[2] 
Nov 14 23:24:10 unixmach ppp[51]: tun0: CCP: deflink: State change Closed --> Req-Sent
Nov 14 23:24:10 unixmach ppp[51]: tun0: Phase: deflink: lcp -> open
Nov 14 23:24:10 unixmach ppp[51]: tun0: Phase: bundle: Network
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: FSM: Using "deflink" as a transport
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: deflink: State change Initial --> Closed
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: deflink: LayerStart.
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: deflink: SendConfigReq(1) state = Closed
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP:  IPADDR[6]  0.0.0.0
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP:  COMPPROTO[6]  16 VJ slots with slot compression
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: deflink: State change Closed --> Req-Sent
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: deflink: RecvConfigReq(103) state = Req-Sent
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP:  IPADDR[6]  XXX.XXX.XX.XX
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: deflink: SendConfigAck(103) state = Req-Sent
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP:  IPADDR[6]  XXX.XXX.XX.XX
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: deflink: State change Req-Sent --> Ack-Sent
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: deflink: RecvProtocolRej(15) state = Opened
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: deflink: -- Protocol 0x80fd (Compression Control Protocol) was rejected!
Nov 14 23:24:10 unixmach ppp[51]: tun0: CCP: deflink: State change Req-Sent --> Stopped
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: deflink: RecvConfigRej(1) state = Ack-Sent
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: Sending ident magic 2ddf6bd1 text user-ppp 2.3.3 (built Jun 11 2002)
Nov 14 23:24:10 unixmach ppp[51]: tun0: LCP: deflink: SendIdent(1) state = Opened
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP:  COMPPROTO[6]  16 VJ slots with slot compression
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: deflink: SendConfigReq(2) state = Ack-Sent
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP:  IPADDR[6]  0.0.0.0
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: deflink: RecvConfigNak(2) state = Ack-Sent
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP:  IPADDR[6]  XXX.XXX.XXX.XXX
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP:  IPADDR[6]  changing address: 0.0.0.0  --> XXX.XXX.XXX.XXX
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: deflink: SendConfigReq(3) state = Ack-Sent
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP:  IPADDR[6]  XXX.XXX.XXX.XXX
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: deflink: RecvConfigAck(3) state = Ack-Sent
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: deflink: State change Ack-Sent --> Opened
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: deflink: LayerUp.
Nov 14 23:24:10 unixmach ppp[51]: tun0: IPCP: myaddr XXX.XXX.XXX.XXX hisaddr = XXX.XXX.XX.XX
Nov 14 23:25:10 unixmach ppp[51]: tun0: LCP: deflink: RecvEchoRequest(16) state = Opened
Nov 14 23:25:10 unixmach ppp[51]: tun0: LCP: deflink: SendEchoReply(16) state = Opened
Nov 14 23:26:10 unixmach ppp[51]: tun0: LCP: deflink: RecvEchoRequest(17) state = Opened
Nov 14 23:26:10 unixmach ppp[51]: tun0: LCP: deflink: SendEchoReply(17) state = Opened
Nov 14 23:27:10 unixmach ppp[51]: tun0: LCP: deflink: RecvEchoRequest(18) state = Opened
Nov 14 23:27:10 unixmach ppp[51]: tun0: LCP: deflink: SendEchoReply(18) state = Opened