1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > freebsd8.1 adsl虚拟拨号上网设置

freebsd8.1 adsl虚拟拨号上网设置

时间:2024-02-17 14:00:11

相关推荐

freebsd8.1 adsl虚拟拨号上网设置

我家的电脑是虚拟拨号,下面的设置是在我的电脑上是可以上网的。

在命令行输入:ee /etc/ppp/ppp.conf 并修改成如下代码就可以了。其中的xxxx 和yyyy换成adsl的用户名和密码。千万注意除了default:和adsl: 不缩进一个空格外,其余每一行都要缩进一个空格。 修改完后在命令行中输入: ppp -ddial adsl ,再用ifconfig 查看是否成功,一般自动获取网址和DNS的要过30秒才能获取网址和DNS,只要看到有网址了就可以上网了,也可以用ping 这一行命令来测试。

# PPP Sample Configuration File

# Originally written by Toshiharu OHNO

# Simplified 5/14/1999 by wself@

#

# See /usr/share/examples/ppp/ for some examples

#

# $FreeBSD: src/etc/ppp/ppp.conf,v 1.11.2.2.2.1 /06/14 02:09:06 kensmith Exp $

#################################################################

default:

set log Phase tun

ident user-ppp VERSION

# Ensure that "device" references the correct serial port

# for your modem. (cuau0 = COM1, cuau1 = COM2)

#

set device PPPoE:rl0 #rl0是我的网卡设备名

set speed 115200 #设置速度

set mru 1452

set mtu 1452

set dial

set timeout 30 #设置重拨的间隔时间

enable dns # request DNS info (for resolv.conf)

adsl:

#

# edit the next three lines and replace the items in caps with

# the values which have been assigned by your ISP.

#

set authname xxxx

set authkey yyyy

set login

set timeout 0 #设置空闲多少时间后断开

set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255

add default HISADDR

nat enable yes

如果要开机自动拨号可以命令行中输入:ee /etc/rc.conf

编辑rc.conf文件如下就可以了。保存后重启就OK了。(补充一下,因为是自动获取网址和dns,所以在rc.conf文件中不用设置网址和路由,在resolv.conf中也不用设置DNS。)

# -- sysinstall generated deltas -- # Sun Mar 6 08:54:24

# Created: Sun Mar 6 08:54:24

# Enable network daemons for user convenience.

# Please make all changes to this file, not to /etc/defaults/rc.conf.

# This file now contains just the overrides from /etc/defaults/rc.conf.

hostname="ll"

keymap="us.iso"

moused_enable="YES"

gdm_enable="yes"

gnome_enable="yes"

#以下是自动拨号的代码

ppp_enable="yes"

ppp_mode="ddial"

ppp_profile="adsl"

有不明白的可加FreeBSD学习交流群,群号: 54029939

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。