設定ppp.conf

vi /etc/ppp/ppp.conf
default:
 set log Phase Chat LCP IPCP CCP tun command
 nat enable yes
 nat same_ports yes
 nat use_sockets yes
 set redial 15 28800
 set reconnect 15 28800

pppoe:           
 set device PPPoE:em0:  #em0改成自己的網卡名稱   
 set mru 1492
 set mtu 1492
 set speed sync
 enable lqr
 set lqrperiod 5
 set cd 5
 set dial
 set login
 set timeout 0
 set authname 88888888@hinet.net  #ADSL撥接帳號        
 set authkey 12345678       #ADSL撥接密碼 
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
 add default HISADDR
 enable dns
 # end of ppp configuration

啟動

ppp -ddial pppoe

如果在執行ppp -ddial pppoe時出現

Warning: Add route failed: 0.0.0.0/0 already exists


set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
註解成
#set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
即可

Categories: FreeBSD