Freebsd下宽带拨号上网

来源:互联网 发布:杜甫知李白死 编辑:程序博客网 时间:2024/04/30 11:50
Freebsd下宽带拨号上网
Freebsd 这个操作系统真的很不错,希望大家有机会用用.
首先 ,以 root 用户进入系统.
        # vi /etc/ppp/ppp.conf
         
default:
        set log Phass Chart 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:vr0:
        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  用户名 #你拨号的用户名
        set authkey   密码         #你的拨号密码
        set ifaddr  10.0.0.1/0  10.0.0.2/0  255.255.255.0
        add default HISADDR
        enable dns
  
# end of ppp configuration 
 
以上是我的ppp.conf 文件的全部内容.
 
 
然后 vi /etc/rc.conf 
           在rc.conf文件后面添加以下内容
        network_interfaces="auto"
        ifconfig_vr0="inet 10.0.0.1 netmask 255.0.0.0 -arp up"  #vr0是你网卡的名称,如果你不知道可以用ifconfig 命令来查看你的网卡的名称
        ppp_enable = "YES"
        PPP_mode="ddial"
        ppp_profile="pppoe"
 
#end of /etc/rc.conf
 
以上是我的rc.conf 文件的全部内容.
最后 vi /etc/resolv.conf   #在freebsd 里是没有这个文件的, 我们要自己建立这个文件
 
     nameserver        211.95.43.126    #这个是你的DNS,如果你不知道可以在windows 下用 ipconfig /all 命令来查看你DNS
 
 
#end of /etc/resolv.conf
 
以上是我的resolv.conf 文件的全部内容.
 
在freebsd下实现拨号上网就是这些了.
用ppp -background pppoe
来看看是否配置成功.
 
原创粉丝点击