Differences between revisions 5 and 12 (spanning 7 versions)
Revision 5 as of 2004-08-09 00:50:08
Size: 3623
Editor: Horus
Comment:
Revision 12 as of 2009-12-25 07:12:31
Size: 3553
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
含有章节索引的中文 文章模板 Horus的ADSL指南.
Line 5: Line 5:

-- hd [[[DateTime(2004-08-09T00:35:03Z)]]]
[[TableOfContents]]
<<TableOfContents>>
Line 14: Line 12:
{{{
Line 16: Line 15:
}}}
Line 17: Line 18:
{{{
Line 18: Line 20:
Line 20: Line 21:
Line 22: Line 22:
}}}
Line 24: Line 25:

_#################################################################
{{{
#################################################################
Line 28: Line 28:
Line 30: Line 29:
Line 32: Line 30:
Line 35: Line 32:
Line 38: Line 34:

_
#################################################################
#################################################################
Line 42: Line 37:
Line 44: Line 38:

Line 47: Line 39:
Line 49: Line 40:
Line 51: Line 41:
Line 53: Line 42:

Line 56: Line 43:
Line 58: Line 44:
Line 60: Line 45:
Line 62: Line 46:
Line 64: Line 47:
Line 66: Line 48:
Line 68: Line 49:
Line 70: Line 50:
Line 72: Line 51:
Line 74: Line 52:
Line 76: Line 53:
Line 78: Line 54:
Line 80: Line 55:
Line 82: Line 56:
Line 84: Line 57:
Line 86: Line 58:
}}}
Line 90: Line 62:
{{{
Line 91: Line 64:
}}}
Line 93: Line 67:
{{{
Line 95: Line 69:
}}}
Line 98: Line 73:
{{{
Line 99: Line 75:
inet 192.168.0.254 netmask 0xffffff00 broadcast 192.168.0.255
inet6 fe80::20c:29ff:fe98:25a6%lnc0 prefixlen 64 scopeid 0x1 ether 00:0c:29:98:25:a6
lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1492
inet 218.72.106.94 --> 61.174.64.21 netmask 0xffffffff
         Opened by PID 54
}}}
Line 100: Line 90:
inet 192.168.0.254 netmask 0xffffff00 broadcast 192.168.0.255

inet6 fe80::20c:29ff:fe98:25a6%lnc0 prefixlen 64 scopeid 0x1 ether 00:0c:29:98:25:a6

lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384

 inet6 ::1 prefixlen 128

 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3

 inet 127.0.0.1 netmask 0xff000000

ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500

sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552

faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500

tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1492

inet 218.72.106.94 --> 61.174.64.21 netmask 0xffffffff

 Opened by PID 54

数字部分就是:ISP分的IP地址 -> ISP的DNS服务器的IP. 这样你就上了网啦!
inet后的数字部分就是:ISP分的IP地址 -> ISP的DNS服务器的IP. 这样你就上了网啦!
Line 131: Line 95:
{{{
Line 133: Line 97:
Line 135: Line 98:
Line 137: Line 99:
Line 139: Line 100:
Line 141: Line 101:
Line 143: Line 102:
Line 145: Line 103:
Line 147: Line 104:
Line 149: Line 105:
}}}

Horus的ADSL指南.

FreeBSD ADSL 安装 Howto

简单几步,让你用ADSL上网

FreeBSD ADSL 安装Go!Go!Go!

1.配置网络连接

配置ppp.conf

先登录系统,这样:

Login: root  (以Root用户登录)
Password: (输入你的密码,因安全问题,这里你看不到输入的结果.)

由于是ADSL上网,配置文件是 /etc/ppp下的 ppp.conf,在 /etc/ppp 下可能已经有了 ppp.conf 也可能只有 ppp.conf.sample ,总之,我放弃使用现有的ppp.conf 从ppp.conf.sample新建一个.你可以这样做:

# rm ppp.conf  (删除ppp.conf , 如果有的话)
# cp ppp.conf.sample ppp.conf
# ee ppp.conf  (随自己喜好,使用 ee 或 vi )

这里把我的ppp.conf 附上,以此为范本.

#################################################################
# PPP  Sample Configuration File
# Originally written by Toshiharu OHNO
# Simplified 5/14/1999 by [email protected]
#
# 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)
hz163:   # 注意:这里的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

连接网络

配置好了ppp.conf,你就成功了一半,接下来的就是输入命令、连接网络喽!

#ppp –ddial hz163

之后看看连接状态。

#ifconfig

我的结果:

lnc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.0.254 netmask 0xffffff00 broadcast 192.168.0.255
inet6 fe80::20c:29ff:fe98:25a6%lnc0 prefixlen 64 scopeid 0x1 ether 00:0c:29:98:25:a6
lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet6 ::1 prefixlen 128 
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 
        inet 127.0.0.1 netmask 0xff000000 
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1492
inet 218.72.106.94 --> 61.174.64.21 netmask 0xffffffff 
         Opened by PID 54

inet后的数字部分就是:ISP分的IP地址 -> ISP的DNS服务器的IP. 这样你就上了网啦!

配置rc.conf使ADSL开机上网

想一开机就上网?简单!让我们来配置 /etc/rc.conf吧,这很简单! 就填上这几句:

ifconfig_lnc0="192.168.0.254/24"
defaultrouter="192.168.0.254"
inetd_enable="yes"
gateway_enable="yes"
ppp_enable="yes"
ppp_mode="ddial"
ppp_nat="yes"
ppp_profile="hz163"
named_enable="yes"

这几句就把FreeBSD虚拟机配置成了一NAT网关,兼软路由、BIND8名字服务器。

bsd/ADSLInstallHowto (last edited 2009-12-25 07:12:31 by localhost)