星期二, 4月 24, 2007

FreeBSD 以 ADSL撥接上網


剛好看到這篇文章,把它記下來,才不會忘記。


設定檔 /etc/ppp/ppp.conf
----------------------------------------------------------------------------------------------------


#################################################################
# PPP Sample Configuration File
# Originally written by Toshiharu OHNO
# Simplified 5/14/1999 by wself@cdrom.com
#
# See /usr/share/examples/ppp/ for some examples
#
# $FreeBSD: src/etc/ppp/ppp.conf,v 1.2.2.5 2001/07/13 10:55:23 brian Exp $
#################################################################
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:lnc0
set speed sync
set mru 1492
set mtu 1492
set ctsrts off
set timeout 30 # 3 minute idle timer (the default)
disable lqr
deny lqr
add default HISADDR
enable dns # request DNS info (for resolv.conf)
HiNET: # 注意:這裡的hz163是你的ISP名,要比下面的set語句多出一點(一個空格).
set authname user(把這裡的user換成你的ADSL用戶名)
set authkey password (把這裡的password換成你的ADSL密碼)
set dial
set login
set ifaddr 10.0.0.1/0 10.0.0.2/0
nat enable yes
----------------------------------------------------------------------------------------------------


撥接連上ADSL網路
# ppp -ddial HiNET