ぽっぺん日記@karashi.org
2008-01-30(Wed) [長年日記]
_ ルータ・マシンのPPPoEデーモンをnet/mpdからnet/mpd4に変更した
ルータ・マシンのPPPoEデーモンにはmpd-3.18を使っていて、特に不満もないので、ずっとアップグレードもせずそのままだったのだが、 mpd4で追加されたset no noretryとset link max-redial 0による自動再接続が緊急時に役に立つかもしれないので乗り換えてみることにした (mpd5もリリースされたけれど、まだ熱そうなので、もうちょっと様子見)。
ちなみに、mpdはnetraphを使っているので、バージョンが上がったからといって通信速度が上がるという訳ではないらしいので注意。
結論から書くと、net/mpd(mpd-3.18)の設定がほぼそのままで流用できた。大きな変更点は
- kernelモジュールはng_etherではなく、ng_pppoeを使う
- set bundle authnameやset bundle passwordは、それぞれset auth authnameとset auto passwordに変更
- open ifaceはopenに変更
くらい。
設定後、LANケーブルを抜いた状態で、mpd4を立ち上げてからLANケーブルを挿すと、ちゃんとPPPoEされた。 たぶん、自動再接続は上手くいっているのではないかと思う。
設定したファイルはこんな感じ。
/boot/loader.conf
ng_pppoe_load="YES"
mpd.conf
ついでに、フレッツスクウェアのルーティングもNTT東日本フレッツ公式:フレッツ・スクウェア|ルーティングアドレス情報を参考に最新のものに更新。
startup: # configure the console set console port 5005 set console ip 0.0.0.0 set console user foo baa set console open # configure the web server set web port 5006 set web user foo baa set web open default: load isp load flets isp: new -i ng0 isp PPPoE0 set iface route default set auth authname ほげ load client_standard flets: new -i ng1 flets PPPoE1 set iface route 220.210.194.0/25 set iface route 220.210.195.0/26 set iface route 220.210.195.64/26 set iface route 220.210.197.0/25 set iface route 220.210.199.32/27 set iface route 220.210.199.200/29 set iface route 220.210.199.160/27 set iface route 220.210.199.192/27 set iface route 220.210.196.0/25 set iface route 220.210.196.128/26 set iface route 220.210.199.64/28 set iface route 220.210.198.0/26 set iface route 220.210.199.144/28 set auth authname guest@flets set auth password guest load client_standard client_standard: set iface addrs 1.1.1.1 2.2.2.2 set iface mtu 1454 set iface enable tcpmssfix set iface up-script /usr/local/etc/mpd4/link.sh set iface down-script /usr/local/etc/mpd4/link.sh set iface disable on-demand set iface idle 0 set bundle disable multilink set bundle no noretry set link max-redial 0 set link no acfcomp protocomp set link disable pap chap set link accept chap set link mtu 1454 set link mru 1454 set ipcp yes vjcomp set ipcp ranges 0.0.0.0/0 0.0.0.0/0 open
mpd.links
PPPoE0: set link type pppoe set pppoe iface fxp0 set pppoe service "whatever" set pppoe disable incoming set pppoe enable originate PPPoE1: set link type pppoe set pppoe iface fxp0 set pppoe service "whatever" set pppoe disable incoming set pppoe enable originate
links.sh
#!/bin/sh
case $# in
# options when linkup.
# link.sh <interface> <proto> <local address> <remote address> <authname>
5|7|9)
case "$1" in
ng0)
/sbin/route delete default
/sbin/route add default $4
/etc/rc.d/pf stop > /dev/null 2>&1
/etc/rc.d/pf reload > /dev/null 2>&1
/etc/rc.d/pf start > /dev/null 2>&1
;;
ng1)
/etc/rc.d/pf stop > /dev/null 2>&1
/etc/rc.d/pf reload > /dev/null 2>&1
/etc/rc.d/pf start > /dev/null 2>&1
;;
esac
;;
# options when linkdown.
# link.sh <interface> <proto> <authname>
3)
;;
*)
echo "Usage: `basename $0` <interface> <proto> [<local address> <remote address>] <authname>" >&2
;;
esac
mpd.secret
mpd.secret.sampleを見れば一目瞭然なので略。
参考
[ツッコミを入れる]
[]
本日のPingbacks(全0件)


まで頂ければ幸いです。
叛逆としての科学―本を語り、文化を読む22章(フリーマン・ダイソン)
ゲバルト時代 SINCE1966-1973 あるヘタレ過激派活動家の青春(中野正夫)