雖然已經是老東西了,但還是時常用的到,就打下來吧...

路徑:/etc/ppp/

vi ppp.conf

default:
set log Phase Chat LCP IPCP CCP tun command
set redial 1 86400
set reconnect 1 5
#========新增下列======

Hinet: #自設,只要記得後面有對應到就好
set device PPPoE:rl0 # 網卡卡號
set speed sync
set mru 1492
set mtu 1492
enable lqr
set lqrperiod 5
set cd 5!
set dial
set login
add default HISADDR
set authname "ADSL帳號"
set authkey "ADSL密碼"

# tuch /ect/ppp/ppp.deny

測試:
# ppp -ddial Hinet
# ifconfig 

lnc0: flags=108843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500
        ether 2b:00:00:00:00:2b
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1492
        inet 163.140.4.109 --> 163.170.102.254 netmask 0xffffffff
        Opened by PID 763

OK.

寫入rc.conf 讓它開機就上網吧

# vi /etc/rc.conf

#=====加入=====
ppp_enable="YES"
ppp_mode="ddial"
ppp_profile="Hinet"

    全站熱搜

    zgod 發表在 痞客邦 留言(0) 人氣()