在 FreeBSD 使用 PPPoE 撥接
跳至導覽
跳至搜尋
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
作者:Joe Horn( joehorn AT leobbs DOT net )
授權:[CC授權:姓名標示-非商業性-相同方式分享 2.5]
附註:安裝步驟適用於 FreeBSD 平台,其它 UNIX-Like OS 可能有所不同。
設定
/etc/ppp/ppp.conf
以 Hinet ADSL 為例,在 /etc/ppp/ppp.conf 末端加入以下設定:
default: set log tun command ident user-ppp VERSION (built COMPILATIONDATE) set timeout 0 # enable dns Hinet: set device PPPoE:re0:Hinet set mru 1492 set mtu 1492 set timeout 0 set authname [帳號] set authkey [密碼] set dial set login set redial 0 0 set ifaddr 10.0.0.1/0 10.0.0.2/0 delete ALL # add default HISADDR
注意
- 設定檔中的 Hinet 代表設定名稱,關係到 ppp 指令的參數。
- 範例中,set device 的 re0 為網卡 device name。
- 如果要使用 ADSL 的 DNS 設定,請把 enable dns 打開。
- 最後一行的 add default HISADDR 會關係到 FreeBSD 是否使用 ADSL 作預設對外線路(defaultrouter)
/etc/rc.conf
ppp_enable="YES" ppp_mode="ddial" ppp_profile="Hinet"
啟動
使用以下指令,馬上就可以啟動。
/etc/rc.d/ppp start