中治@鳥取です。

NTT西日本だからダメなのかどうかがとても気になりますが、おそらく、それも含
めて僕が何かを間違えているのでしょう。

>>>>> In 
>>>>> <[&#x30E1;&#x30FC;&#x30EB;&#x30A2;&#x30C9;&#x30EC;&#x30B9;&#x4FDD;&#x8B77;]>
>>>>>  
>>>>>   NAKAJI Hiroyuki 
>>>>> <[&#x30E1;&#x30FC;&#x30EB;&#x30A2;&#x30C9;&#x30EC;&#x30B9;&#x4FDD;&#x8B77;]>
>>>>>  wrote:

> mpdを使うとうまくいくこともある
> http://lists.freebsd.org/pipermail/freebsd-questions/2007-March/144035.html
> http://wiki.cyberleo.net/index.php/MultiHomedRouter

> という体験談を見つけました。あとで試してみます。

net/mpd5 でマネをしてみました。設定を間違えたのか、NTT西日本相手だからなの
かわかりませんが、やはり、

  IFACE: Adding IPv4 address to ng1 failed: File exists

で、接続を確立できませんでした。;_;

/usr/local/etc/mpd5/mpd.conf を以下のように書きました。

mpd5だと書き方がmpd3とは少し違うので、上記サイトの設定のマネをちゃんとでき
ているかどうかわかりません。startupは、これがないといけないようなので、
sampleのをそのまま書いています。

startup:
        # configure mpd users
        set user foo bar admin
        set user foo1 bar1
        # configure the console
        set console self 127.0.0.1 5005
        set console open
        # configure the web server
        set web self 0.0.0.0 5006
        set web open

default:
        load flets

flets:
        create bundle static Flets
        set iface addrs 10.0.0.1 10.0.0.2
        set iface route 10.60.16.0/20
        set iface route 10.174.0.0/20
        set ipcp ranges 0.0.0.0/0 0.0.0.0/0
        set iface disable on-demand
        set iface idle 0
        set ipcp yes vjcomp
        #
        create link static flets pppoe
        set link action bundle Flets
        set link no multilink
        set link no acfcomp protocomp
        set link mtu 1438
        set link mru 1438
        set auth authname 
[&#x30E1;&#x30FC;&#x30EB;&#x30A2;&#x30C9;&#x30EC;&#x30B9;&#x4FDD;&#x8B77;]
        set auth password flets
        set pppoe iface vr0
        set pppoe service ""
        load client_standard
        open

また、/usr/local/etc/mpd5/mpd.links を以下のようにしました。

flets:
        set link type pppoe
        set pppoe iface vr0
        set pppoe service "FletsSquare"
        set pppoe disable incoming
        set pppoe enable originate

# mpd5 flets
を実行すると、

(前略)
[Flets] IPCP: state change Ack-Sent --> Opened
[Flets] IPCP: LayerUp
[Flets]   10.183.51.228 -> 210.247.16.1
[Flets] IFACE: Adding IPv4 address to ng1 failed: File exists
[Flets] IFACE: Up event

となります。mpd5を実行したときの全出力は以下の通りです。

Multi-link PPP daemon for FreeBSD
 
process 44637 started, version 5.1 
([&#x30E1;&#x30FC;&#x30EB;&#x30A2;&#x30C9;&#x30EC;&#x30B9;&#x4FDD;&#x8B77;] 
16:13 25-Aug-2008)
CONSOLE: listening on 127.0.0.1 5005
web: listening on 0.0.0.0 5006
[Flets] Bundle: Interface ng1 created
[flets] Link: OPEN event
[flets] LCP: Open event
[flets] LCP: state change Initial --> Starting
[flets] LCP: LayerStart
[flets] PPPoE: Connecting to ''
PPPoE: rec'd ACNAME "nttw-ctu"
[flets] rec'd proto LCP while dead
[flets] PPPoE: connection successful
[flets] Link: UP event
[flets] Link: origination is local
[flets] LCP: Up event
[flets] LCP: state change Starting --> Req-Sent
[flets] LCP: SendConfigReq #1
[flets]   MRU 1438
[flets]   MAGICNUM d9718951
[flets] LCP: rec'd Configure Ack #1 (Req-Sent)
[flets]   MRU 1438
[flets]   MAGICNUM d9718951
[flets] LCP: state change Req-Sent --> Ack-Rcvd
[flets] LCP: state change Ack-Rcvd --> Req-Sent
[flets] LCP: SendConfigReq #2
[flets]   MRU 1438
[flets]   MAGICNUM d9718951
[flets] LCP: rec'd Configure Ack #2 (Req-Sent)
[flets]   MRU 1438
[flets]   MAGICNUM d9718951
[flets] LCP: state change Req-Sent --> Ack-Rcvd
[flets] LCP: rec'd Configure Request #38 (Ack-Rcvd)
[flets]   MRU 1438
[flets]   AUTHPROTO CHAP MD5
[flets]   MAGICNUM 8bdc14c8
[flets] LCP: SendConfigAck #38
[flets]   MRU 1438
[flets]   AUTHPROTO CHAP MD5
[flets]   MAGICNUM 8bdc14c8
[flets] LCP: state change Ack-Rcvd --> Opened
[flets] LCP: auth: peer wants CHAP, I want nothing
[flets] LCP: LayerUp
[flets] CHAP: rec'd CHALLENGE #82 len: 29
[flets]   Name: "nttw-ctu"
[flets] CHAP: Using authname 
"[&#x30E1;&#x30FC;&#x30EB;&#x30A2;&#x30C9;&#x30EC;&#x30B9;&#x4FDD;&#x8B77;]"
[flets] CHAP: sending RESPONSE #82 len: 32
[flets] LCP: rec'd Configure Request #39 (Opened)
[flets]   MRU 1438
[flets]   AUTHPROTO CHAP MD5
[flets]   MAGICNUM 8bdc14c8
[flets] LCP: LayerDown
[flets] LCP: SendConfigReq #3
[flets]   MRU 1438
[flets]   MAGICNUM d9718951
[flets] LCP: SendConfigAck #39
[flets]   MRU 1438
[flets]   AUTHPROTO CHAP MD5
[flets]   MAGICNUM 8bdc14c8
[flets] LCP: state change Opened --> Ack-Sent
[flets] LCP: rec'd Configure Ack #3 (Ack-Sent)
[flets]   MRU 1438
[flets]   MAGICNUM d9718951
[flets] LCP: state change Ack-Sent --> Opened
[flets] LCP: auth: peer wants CHAP, I want nothing
[flets] LCP: LayerUp
[flets] CHAP: rec'd CHALLENGE #83 len: 29
[flets]   Name: "nttw-ctu"
[flets] CHAP: Using authname 
"[&#x30E1;&#x30FC;&#x30EB;&#x30A2;&#x30C9;&#x30EC;&#x30B9;&#x4FDD;&#x8B77;]"
[flets] CHAP: sending RESPONSE #83 len: 32
[flets] CHAP: rec'd SUCCESS #83 len: 4
[flets] LCP: authorization successful
[flets] Link: Matched action 'bundle "Flets" ""'
[flets] Link: Join bundle "Flets"
[Flets] Bundle: Status update: up 1 link, total bandwidth 64000 bps
[Flets] IPCP: Open event
[Flets] IPCP: state change Initial --> Starting
[Flets] IPCP: LayerStart
[Flets] IPCP: Up event
[Flets] IPCP: state change Starting --> Req-Sent
[Flets] IPCP: SendConfigReq #1
[Flets]   IPADDR 0.0.0.0
[Flets]   COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
[Flets] IPCP: rec'd Configure Request #1 (Req-Sent)
[Flets]   IPADDR 210.247.16.1
[Flets]     210.247.16.1 is OK
[Flets] IPCP: SendConfigAck #1
[Flets]   IPADDR 210.247.16.1
[Flets] IPCP: state change Req-Sent --> Ack-Sent
[Flets] IPCP: rec'd Configure Reject #1 (Ack-Sent)
[Flets]   COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
[Flets] IPCP: SendConfigReq #2
[Flets]   IPADDR 0.0.0.0
[Flets] IPCP: rec'd Configure Nak #2 (Ack-Sent)
[Flets]   IPADDR 10.183.51.228
[Flets]     10.183.51.228 is OK
[Flets] IPCP: SendConfigReq #3
[Flets]   IPADDR 10.183.51.228
[Flets] IPCP: rec'd Configure Ack #3 (Ack-Sent)
[Flets]   IPADDR 10.183.51.228
[Flets] IPCP: state change Ack-Sent --> Opened
[Flets] IPCP: LayerUp
[Flets]   10.183.51.228 -> 210.247.16.1
[Flets] IFACE: Adding IPv4 address to ng1 failed: File exists
[Flets] IFACE: Up event
[flets] CONSOLE: root: quit
caught fatal signal term
[Flets] IFACE: Close event
[Flets] IPCP: Close event
[Flets] IPCP: state change Opened --> Closing
[Flets] IPCP: SendTerminateReq #4
[Flets] IPCP: LayerDown
[Flets] IFACE: Removing IPv4 address from ng1 failed: Can't assign requested 
address
[Flets] IFACE: Down event
[Flets] IPCP: rec'd Terminate Ack #4 (Closing)
[Flets] IPCP: state change Closing --> Closed
[Flets] IPCP: LayerFinish
[Flets] Bundle: No NCPs left. Closing links...
[Flets] Bundle: closing link "flets"...
[flets] Link: CLOSE event
[flets] LCP: Close event
[flets] LCP: state change Opened --> Closing
[flets] Link: Leave bundle "Flets"
[Flets] Bundle: Status update: up 0 links, total bandwidth 9600 bps
[Flets] IPCP: Close event
[Flets] IPCP: Down event
[Flets] IPCP: state change Closed --> Initial
[flets] LCP: SendTerminateReq #4
[flets] LCP: LayerDown
[flets] LCP: rec'd Terminate Ack #4 (Closing)
[flets] LCP: state change Closing --> Closed
[flets] LCP: LayerFinish
[flets] Link: DOWN event
[flets] LCP: Down event
[flets] LCP: state change Closed --> Initial
[Flets] Bundle: Shutdown
[flets] Link: Shutdown
process 44637 terminated

なお、routing tablesとifconfig -aは以下の通りです。

$ netstat -nr -f inet
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            210.247.16.1       UGS         0   677514   tun0
60.32.13.192       ff:ff:ff:ff:ff:ff  UHLWb       1       20    xl0 =>
60.32.13.192/29    link#1             UC          0        0    xl0
60.32.13.193       00:30:05:0c:cf:82  UHLW        1    58630    xl0    376
60.32.13.194       127.0.0.1          UH          0     1037    lo0
60.32.13.195       00:00:4c:17:57:3c  UHLW        1  2124541    xl0    592
60.32.13.197       00:00:4c:63:55:83  UHLW        1    16746    xl0    673
60.32.13.199       ff:ff:ff:ff:ff:ff  UHLWb       1      340    xl0
127.0.0.1          127.0.0.1          UH          0   593228    lo0
210.247.16.1       60.32.13.194       UH          1        0   tun0

$ ifconfig -a
xl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        options=8<VLAN_MTU>
        inet6 fe80::260:8ff:fea4:e3bf%xl0 prefixlen 64 scopeid 0x1 
        inet 60.32.13.194 netmask 0xfffffff8 broadcast 60.32.13.199
        inet6 2001:3e0:a84:: prefixlen 64 anycast 
        inet6 2001:3e0:a84::1 prefixlen 64 
        ether 00:60:08:a4:e3:bf
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
vr0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        options=8<VLAN_MTU>
        inet6 fe80::211:5bff:fefb:c9dc%vr0 prefixlen 64 scopeid 0x2 
        ether 00:11:5b:fb:c9:dc
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet6 ::1 prefixlen 128 
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 
        inet 127.0.0.1 netmask 0xff000000 
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1438
        inet 60.32.13.194 --> 210.247.16.1 netmask 0xfffffff8 
        Opened by PID 455
gif0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1280
        tunnel inet 60.32.13.194 --> 43.244.255.36
        inet6 fe80::260:8ff:fea4:e3bf%gif0 prefixlen 64 scopeid 0x6 

おまけ:

$ kldstat 
Id Refs Address    Size     Name
 1   18 0xc0400000 80eca4   kernel
 2    1 0xc0c0f000 198c     accf_data.ko
 3    1 0xc0c11000 2364     accf_http.ko
 4    1 0xc0c14000 5c838    acpi.ko
 5   10 0xc5e86000 a000     netgraph.ko
 6    1 0xc5ea4000 3000     ng_ether.ko
 7    1 0xc5ea7000 5000     ng_pppoe.ko
 8    1 0xc5eac000 4000     ng_socket.ko
 9    1 0xc695a000 2000     blank_saver.ko
10    1 0xc743a000 3000     ng_mppc.ko
11    1 0xc6150000 2000     rc4.ko
12    1 0xc83e0000 3000     ng_iface.ko
13    1 0xca0c7000 6000     ng_ppp.ko
14    1 0xc9757000 4000     ng_bpf.ko
15    1 0xc999b000 4000     ng_vjc.ko
16    1 0xc7d6a000 3000     ng_tee.ko
-- 
NAKAJI Hiroyuki (中治 弘行)

メールによる返信