From owner-svn-doc-head@FreeBSD.ORG Thu Sep 13 11:33:54 2012 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 678BE106566B; Thu, 13 Sep 2012 11:33:54 +0000 (UTC) (envelope-from loader@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50FBD8FC08; Thu, 13 Sep 2012 11:33:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8DBXsRb088036; Thu, 13 Sep 2012 11:33:54 GMT (envelope-from loader@svn.freebsd.org) Received: (from loader@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8DBXsSB088034; Thu, 13 Sep 2012 11:33:54 GMT (envelope-from loader@svn.freebsd.org) Message-Id: <201209131133.q8DBXsSB088034@svn.freebsd.org> From: Fukang Chen Date: Thu, 13 Sep 2012 11:33:54 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r39524 - head/zh_CN.GB2312/books/handbook/advanced-networking X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 11:33:54 -0000 Author: loader Date: Thu Sep 13 11:33:53 2012 New Revision: 39524 URL: http://svn.freebsd.org/changeset/doc/39524 Log: MFen: r36946 -> r38600 Language improvements. [1] Merging work done by: delphij, loader Submitted by: fuzhli (https://www.freebsdchina.org/forum/viewtopic.php?t=54463) [1] Obtained from: The FreeBSD Simplified Chinese Project Modified: head/zh_CN.GB2312/books/handbook/advanced-networking/chapter.sgml Modified: head/zh_CN.GB2312/books/handbook/advanced-networking/chapter.sgml ============================================================================== --- head/zh_CN.GB2312/books/handbook/advanced-networking/chapter.sgml Wed Sep 12 22:46:03 2012 (r39523) +++ head/zh_CN.GB2312/books/handbook/advanced-networking/chapter.sgml Thu Sep 13 11:33:53 2012 (r39524) @@ -2,7 +2,7 @@ The FreeBSD Documentation Project The FreeBSD Chinese Documentation Project - Original revision: 1.436 + Original revision: r38600 $FreeBSD$ --> @@ -34,6 +34,10 @@ + 如何配置从网络 PXE 启动一个 NFS 根文件系统。 + + + 如何配置网络地址转换 (NAT)。 @@ -325,7 +329,7 @@ host2.example.com link#1 UC 的局域网里的,用于您那边的连接,对于 ISP 的局域网里的其它机子,其路由会自动产生。 因此,您就已经知道了如何到达机子 T1-GW, - 那么也就没必要中那一步了——发送通信给 ISP 服务器。 + 那么也就没必要中间那一步了——发送通信给 ISP 服务器。 通常使用地址 X.X.X.1 做为一个局域网的网关。 @@ -507,8 +511,8 @@ Internet: Destination Gateway Flags Refs Use Netif Expire default 10.0.0.1 UGS 0 49378 xl0 127.0.0.1 127.0.0.1 UH 0 6 lo0 -10.0.0/24 link#1 UC 0 0 xl0 -192.168.1/24 link#2 UC 0 0 xl1 +10.0.0.0/24 link#1 UC 0 0 xl0 +192.168.1.0/24 link#2 UC 0 0 xl1 使用当前的路由表,RouterA 是不能到达我们的内网——Internal Net 2 的。它没有到 CAPS 字段则给出了网络类型及其提供的功能, 其中包括: - - - E - - - Extended Service Set (ESS)。 表示通讯站是 - infrastructure 网络 (相对于 IBSS/ad-hoc 网络) 的成员。 - - - - - I - - - IBSS/ad-hoc 网络。 表示通讯站是 ad-hoc - 网络 (相对于 ESS 网络) 的成员。 - - + + 通讯站功能代码 - - P + + + + 功能代码 + 含义 + + + + + + + E + Extended Service Set (ESS)。 表示通讯站是 + infrastructure 网络 (相对于 IBSS/ad-hoc 网络) 的成员。 + - - 私密。 在 BSS 中交换的全部数据帧均需保证数据保密性。 - 这表示 BSS 需要通讯站使用加密算法, - 例如 WEP、 TKIP 或 AES-CCMP 来加密/解密与其他通讯站交换的数据帧。 - - + + I + IBSS/ad-hoc 网络。 表示通讯站是 ad-hoc + 网络 (相对于 ESS 网络) 的成员。 + - - S + + P + 私密。 在 BSS 中交换的全部数据帧均需保证数据保密性。 + 这表示 BSS 需要通讯站使用加密算法, + 例如 WEP、 TKIP 或 AES-CCMP 来加密/解密与其他通讯站交换的数据帧。 + - - 短前导码 (Short Preamble)。 表示网络采用的是短前导码 + + S + 短前导码 (Short Preamble)。 表示网络采用的是短前导码 (由 802.11b High Rate/DSSS PHY 定义, 短前导码采用 56-位 同步字段, - 而不是在长前导码模式中所采用的 128-位 字段)。 - - - - - s - - - 短碰撞槽时间 (Short slot time)。 表示由于不存在旧式 (802.11b) - 通讯站, 802.11g 网络正使用短碰撞槽时间。 - - - + 而不是在长前导码模式中所采用的 128-位 字段)。 + + + + s + 短碰撞槽时间 (Short slot time)。 表示由于不存在旧式 (802.11b) + 通讯站, 802.11g 网络正使用短碰撞槽时间。 + + + +
要显示目前已知的网络, 可以使用下面的命令: @@ -1067,7 +1070,7 @@ ifconfig_wlan0="authmode shared wepmode 在您选定了无线访问点, 并配置了验证参数之后, 还必须获得 IP 地址才能真正开始通讯。 多数时候, 您会通过 DHCP 来获得无线 IP 地址。 要达到这个目的, - 只需简单地编辑 /etc/rc.conf 并在配置中加入 + 需要编辑 /etc/rc.conf 并在配置中加入 DHCP wlans_ath0="wlan0" @@ -1123,7 +1126,7 @@ ifconfig_wlan0="inet 192.16 以及一些其它的安全弱点。 WPA 采用了 802.1X 认证协议, 并采用从多种与 WEP 不同的加密算法中选择一种来保证数据保密性。 WPA 支持的唯一一种加密算法是 TKIP (临时密钥完整性协议), - 这是一种对 WEP 所采用的基本 RC4 加密算法的扩展, + TKIP 是一种对 WEP 所采用的基本 RC4 加密算法的扩展, 除此之外还提供了对检测到的入侵的响应机制。 TKIP 被设计用来与旧式硬件一同工作, 只需要进行部分软件修改; 它提供了一种改善安全性的折衷方案, @@ -1177,7 +1180,7 @@ ifconfig_wlan0="inet 192.16 wlans_ath0="wlan0" ifconfig_wlan0="WPA DHCP" - 下面, 启用无线网络接口: + 下面启用无线网络接口: &prompt.root; /etc/rc.d/netif start Starting wpa_supplicant. @@ -1229,15 +1232,16 @@ wlan0: flags=8843<UP,BROADCAST,RUNNIN wme burst roaming MANUAL - 如果 /etc/rc.conf 的配置中, - 使用了 ifconfig_wlan0="DHCP", - 就不需要手工运行 - dhclient 命令了, 因为 - dhclient 将在 - wpa_supplicant 探测到密钥之后执行。 + 如果在 /etc/rc.conf 中把 + ifconfig_wlan0 + 设置成了 DHCP + (像 ifconfig_wlan0="DHCP" 这样), + 那么在 wpa_supplicant + 连上了无线接入点 (AP) 之后,则会自动运行 + dhclient - 在这个例子中, DHCP 并不可用, 您可以在 + 如果不打算使用 DHCP 或者 DHCP 不可用, 您可以在 wpa_supplicant 为通讯站完成了身份认证之后, 指定静态 IP 地址: @@ -1264,15 +1268,15 @@ wlan0: flags=8843<UP,BROADCAST,RUNNIN 使用 EAP-TLS 的 WPA - 使用 WPA 的第二种方式是使用 802.1X 后端验证服务器, + 使用 WPA 的第二种方式是使用 802.1X 后端验证服务器。 在这个例子中, WPA 也称作 企业-WPA, 以便与安全性较差、 采用事先分发密钥的 个人-WPA 区分开来。 在 企业-WPA 中, 验证操作是采用 EAP 完成的 (可扩展认证协议)。 - EAP 并未附带加密方法, + EAP 并未附带加密方法。 因此设计者决定将 EAP 放在加密信道中进行传送。 - 为此设计了许多 EAP 验证方法, + 目前有许多 EAP 验证方法, 最常用的方法是 EAP-TLS、 EAP-TTLS 和 EAP-PEAP。 @@ -1460,10 +1464,13 @@ wlan0: flags=8843<UP,BROADCAST,RUNNIN 使用 EAP-PEAP 的 WPA - PEAP (受保护的 EAP) 被设计用以替代 EAP-TTLS。 - 有两种类型的 PEAP 方法, 最常用的是 PEAPv0/EAP-MSCHAPv2。 - 在这篇文档余下的部分中, 术语 PEAP 是指这种 EAP 方法。 - PEAP 是在 EAP-TLS 之后最为常用的 EAP 标准, + + PEAPv0/EAP-MSCHAPv2 是最常见的 PEAP 方法。 + 此文档的以下部分将使用 PEAP 指代这些方法。 + + + PEAP (受保护的 EAP) 被设计用以替代 EAP-TTLS, + 并且是在 EAP-TLS 之后最为常用的 EAP 标准。 换言之, 如果您的网络中有多种不同的操作系统, PEAP 将是仅次于 EAP-TLS 的支持最广的标准。 @@ -1575,15 +1582,15 @@ wlan0: flags=8843<UP,BROADCAST,RUNNIN 密钥来进行数据传输。 这里我们使用第三个密钥。 它必须与无线接入点的配置一致。 如果你不清楚你的无线接入点, - 你应该尝试用 1 + 尝试用 1 (就是说第一个密钥)来设置这个变量。 - wepkey 表示设置所选的 WEP 密钥。 + wepkey 用于选择 WEP 密钥。 其格式应为 - index:key, 如果没有给出 index 值, - 则默认为 1。 因此, + index:key, + key 默认为 1; 如果需要设置的密钥不是第一个, 就必需指定 index 了。 @@ -1696,7 +1703,7 @@ cryptocaps=1f<WEP,TKIP,AES,AES_CCM,TK 这段输出显示了网卡所支持的各种功能; 其中的关键字 HOSTAP 表示这块网卡可以作为无线网络接入点来使用。 - 此外, 这里还会给出所支持的加密算法: WEP、 TKIP、 AES, 等等, + 此外, 这里还会给出所支持的加密算法: WEP、 TKIP、 AES, 等等。 这些信息对于知道在访问接入点上使用何种安全协议非常重要。 只有创建网络伪设备时能够配置无线设备是否以 hostap 模式运行, @@ -2988,7 +2995,8 @@ BEGEMOT-BRIDGE-MIB::begemotBridgeDefault 只通过主网口收发数据。 如果主网口不可用, 则使用下一个激活的网口。 您在这里加入的第一个网口便会被视为主网口; 此后加入的其他网口, - 则会被视为故障转移的备用网口。 + 则会被视为故障转移的备用网口。 如果发生故障转移之后, + 原先的网口又恢复了可用状态, 则它仍会作为主网口使用。 @@ -3062,16 +3070,19 @@ BEGEMOT-BRIDGE-MIB::begemotBridgeDefault channel-group 1 mode active channel-protocol lacp - 在 &os; 使用 - fxp0 和 - fxp1 创建 &man.lagg.4; 接口: - - &prompt.root; ifconfig lagg0 create -&prompt.root; ifconfig lagg0 up laggproto lacp laggport fxp0 laggport fxp1 + 使用 + fxp0fxp1 + 创建 &man.lagg.4; 接口, 启用这个接口并配置 IP 地址 + 10.0.0.3/24 + + &prompt.root; ifconfig fxp0 up +&prompt.root; ifconfig fxp1 up +&prompt.root; ifconfig lagg0 create +&prompt.root; ifconfig lagg0 up laggproto lacp laggport fxp0 laggport fxp1 10.0.0.3/24 用下面的命令查看接口状态: - &prompt.root; ifconfig lagg0 + &prompt.root; ifconfig lagg0 标记为 ACTIVE 的接口是激活据合组的部分, @@ -3107,26 +3118,39 @@ Fa0/2 SA 32768 0005.5d71.8d 如欲查看进一步的详情, 则需要使用 show lacp neighbor detail 命令。 + + 如果希望在系统重启时保持这些设置, 应在 + /etc/rc.conf 中增加如下配置: + + ifconfig_fxp0="up" +ifconfig_fxp1="up" +cloned_interfaces="lagg0" +ifconfig_lagg0="laggproto lacp laggport fxp0 laggport fxp1 10.0.0.3/24" + 故障转移模式 故障转移模式中, 当首选链路发生问题时, - 会自动切换到备用端口。 下面的命令会创建 - lagg0 接口, 并使用 - fxp0 作为首选接口, 而 - fxp1 作为备用接口: - - &prompt.root; ifconfig lagg0 create -&prompt.root; ifconfig lagg0 up laggproto failover laggport fxp0 laggport fxp1 + 会自动切换到备用端口。 首先启用成员接口, + 接着是配置 &man.lagg.4; 接口, 其中, 使用 + fxp0 作为首选接口, + fxp1 作为备用接口, + 并在整个接口上配置 IP 地址 10.0.0.15/24 + + &prompt.root; ifconfig fxp0 up +&prompt.root; ifconfig fxp1 up +&prompt.root; ifconfig lagg0 create +&prompt.root; ifconfig lagg0 up laggproto failover laggport fxp0 laggport fxp1 10.0.0.15/24 创建成功之后, 接口状态会是类似下面这样, 主要的区别是 MAC 地址和设备名: - &prompt.root; ifconfig lagg0 + &prompt.root; ifconfig lagg0 lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=8<VLAN_MTU> ether 00:05:5d:71:8d:b8 + inet 10.0.0.15 netmask 0xffffff00 broadcast 10.0.0.255 media: Ethernet autoselect status: active laggproto failover @@ -3137,6 +3161,15 @@ lagg0: flags=8843<UP,BROADCAST,RUNNIN fxp0 上进行流量的收发。 如果 fxp0 的连接中断, 则 fxp1 会自动成为激活连接。 如果主端口的连接恢复, 则它又会成为激活连接。 + + 如果希望在系统重启时保持这些设置, 应在 + /etc/rc.conf 中增加如下配置: + + ifconfig_fxp0="up" +ifconfig_fxp1="up" +cloned_interfaces="lagg0" +ifconfig_lagg0="laggproto failover laggport fxp0 laggport fxp1 10.0.0.15/24" + 有线网络和无线网络接口间的自动切换 @@ -3181,16 +3214,18 @@ bge0: flags=8843<UP,BROADCAST,RUNNING &prompt.root; ifconfig wlan0 create wlandev iwn0 ssid my_router up - 创建 &man.lagg.4; 接口, 其中 bge0 + 启用 bge0 接口。 创建 + &man.lagg.4; 接口, 其中 bge0 作为主网络接口, 而以 wlan0 作为备选接口: - &prompt.root; ifconfig lagg0 create -&prompt.root; ifconfig lagg0 up laggproto failover laggport bge0 laggport wlan0 + &prompt.root; ifconfig bge0 up +&prompt.root; ifconfig lagg0 create +&prompt.root; ifconfig lagg0 up laggproto failover laggport bge0 laggport wlan0 新创建的接口的状态如下, 您系统上的 MAC 地址和设备名等可能会有所不同: - &prompt.root; ifconfig lagg0 + &prompt.root; ifconfig lagg0 lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=8<VLAN_MTU> ether 00:21:70:da:ae:37 @@ -3200,16 +3235,19 @@ lagg0: flags=8843<UP,BROADCAST,RUNNIN laggport: wlan0 flags=0<> laggport: bge0 flags=5<MASTER,ACTIVE> - 通过设置下列的 - /etc/rc.conf 配置, - 可以避免每次启动系统时都手工重复上面的设置操作: + 接着用 DHCP 客户端来获取 IP 地址: + + &prompt.root; dhclient lagg0 + + 如果希望在系统重启时保持这些设置, 应在 + /etc/rc.conf 中增加如下配置: ifconfig_bge0="up" ifconfig_iwn0="ether 00:21:70:da:ae:37" wlans_iwn0="wlan0" ifconfig_wlan0="WPA" -cloned_interfaces="lagg0" -ifconfig_lagg0="laggproto failover laggport bge0 laggport wlan0 DHCP" +cloned_interfaces="lagg0" +ifconfig_lagg0="laggproto failover laggport bge0 laggport wlan0 DHCP" @@ -3421,9 +3459,9 @@ ifconfig_lagg0="laggproto failover laggp 服务器可以回应 BOOTP 和 DHCP 的请求。 - ISC DHCP 3.1 + ISC DHCP 4.2 并不属于基本系统。首先您需要安装 - net/isc-dhcp31-server + net/isc-dhcp42-server port 或相应的 一旦安装了 ISC DHCP, @@ -3819,6 +3857,296 @@ cd /usr/src/etc; make distribution + + + + + Craig + Rodrigues + +
rodrigc@FreeBSD.org
+
+ 原作者 +
+
+
+ 从 PXE 启动一个 NFS 根文件系统 + + &intel; 预启动执行环境 (PXE) + 能让操作系统从网络启动。 通常由近代主板的 BIOS + 提供 PXE 支持,它可以通过在 BIOS + 设置里选择从网络启动开启。 一个功能完整的 PXE + 配置还需要正确地设置 DHCPTFTP + 服务。 + + 当计算机启动的时候, 通过 DHCP 获取关于 + 从 TFTP 得到引导加载器(boot loader)的信息。 + 在计算机接受此信息以后, 便通过 TFTP + 下载并执行引导加载器。 这些记载于 + + 预启动执行环境 (PXE) 规范 的 2.2.1 章节中。 + 在 &os; 中, 在 PXE 过程中获取的引导加载器为 + /boot/pxeboot。 在 /boot/pxeboot + 执行之后, &os; 的内核被加载, 接着是其他的 &os; 相关引导部分依次被执行。 + 更多关于 &os; 启动过程的详细信息请参阅 + + + 配置用于 NFS 根文件系统的 <command>chroot</command> 环境 + + + + Choose a directory which will have a &os; installation + which will be NFS mountable. For example, a directory such + as /b/tftpboot/FreeBSD/install can be used. + 选择一个可被用户 NFS 挂载并安装有 &os; 的目录。 + 比如可以使用像 /b/tftpboot/FreeBSD/install + 这样的一个目录。 + + &prompt.root; export NFSROOTDIR=/b/tftpboot/FreeBSD/install +&prompt.root; mkdir -p ${NFSROOTDIR} + + + + 使用如下的命令开启 NFS 服务 + . + + + + 将下面这行加入 /etc/exports + 用以通过 NFS 导出此目录: + + /b -ro -alldirs + + + + 重起 NFS 服务: + + &prompt.root; /etc/rc.d/nfsd restart + + + + 按照 + 中标明的步骤启用 &man.inetd.8;。 + + + + 将如下这行加入到 + /etc/inetd.conf + + tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /b/tftpboot + + + + 重启 inetd: + + &prompt.root; /etc/rc.d/inetd restart + + + + 重新编译 &os; 内核和用户态: + + &prompt.root; cd /usr/src +&prompt.root; make buildworld +&prompt.root; make buildkernel + + + + 把 &os; 安装到 NFS 挂载目录: + + +&prompt.root; make installworld DESTDIR=${NFSROOTDIR} +&prompt.root; make installkernel DESTDIR=${NFSROOTDIR} +&prompt.root; make distribution DESTDIR=${NFSROOTDIR} + + + + + 测试 TFTP 服务是否能下载将从 + PXE 获取的引导加载器: + + +&prompt.root; tftp localhost +tftp> get FreeBSD/install/boot/pxeboot +Received 264951 bytes in 0.1 seconds + + + + + 编辑 ${NFSROOTDIR}/etc/fstab + 并加入以下这行挂载 NFS 根文件系统: + + +# Device Mountpoint FSType Options Dump Pass +myhost.example.com:/b/tftpboot/FreeBSD/install / nfs ro 0 0 + + + 用你的 NFS 服务器主机名或者 IP 地址替换 + myhost.example.com。 在此例中, + 根文件系统是以“只读”的方式挂载用来防止 NFS + 客户端可能意外删除根文件系统上的文件。 + + + + 设置 &man.chroot.8; 环境中的 root 密码。 + &prompt.root; chroot ${NFSROOTDIR} +&prompt.root; passwd + 此为设置从 PXE + 启动的客户机的 root 密码。 + + + + 允许 ssh root 登录从 PXE 启动的客户机, + 编辑 ${NFSROOTDIR}/etc/ssh/sshd_config + 并开启 PermitRootLogin 选项。 + 关于此选项的说明请参阅 &man.sshd.config.5;。 + + + + 对 ${NFSROOTDIR} 的 &man.chroot.8; 环境做些其他的定制。 + 这可以是像使用 &man.pkg.add.1; 安装二进制包, + 使用 &man.vipw.8; 修改密码, 或者编辑 &man.amd.conf.5; + 映射自动挂载等。例如: + + +&prompt.root; chroot ${NFSROOTDIR} +&prompt.root; pkg_add -r bash + + + + + + 配置 <filename>/etc/rc.initdiskless</filename> 中用到的内存文件系统 + + 如果你从一个 NFS 根卷启动, + /etc/rc + 如果检测到是从 NFS 启动便会运行 + /etc/rc.initdiskless 脚本。 + 请阅读此脚本中的注释部分以便了解到底发生了什么。 + 我们需要把 /etc 和 + /var + 做成内存文件系统的原因是这些目录需要能被写入, + 但 NFS 根文件系统是只读的。 + +&prompt.root; chroot ${NFSROOTDIR} +&prompt.root; mkdir -p conf/base +&prompt.root; tar -c -v -f conf/base/etc.cpio.gz --format cpio --gzip etc +&prompt.root; tar -c -v -f conf/base/var.cpio.gz --format cpio --gzip var + + 当系统启动的时候, /etc 和 + /var 内存文件系统就会被创建并挂载, + cpio.gz 就会被复制进去。 + + + + 配置 DHCP 服务 + + PXE 需要配置一个 TFTP 服务器和一个 + DHCP 服务器。 DHCP + 服务并不要求与 TFTP 服务在同一台机器上, + 但是必须能够从你的网络访问到它。 + + + + 按照此文档处 + 方法安装 DHCP 服务。 + 确保 /etc/rc.conf 和 + /usr/local/etc/dhcpd.conf + 都配置正确。 + + + + /usr/local/etc/dhcpd.conf 中配置 + next-serverfilename, + option root-path 选项指向你的 + TFTP 服务器的 IP 地址, + 以及 TFTP/boot/pxeboot + 文件的路径, 和 NFS 根文件系统的路径。 + 这里一份 dhcpd.conf 实例: + + +subnet 192.168.0.0 netmask 255.255.255.0 { + range 192.168.0.2 192.168.0.3 ; + option subnet-mask 255.255.255.0 ; + option routers 192.168.0.1 ; + option broadcast-address 192.168.0.255 ; + option domain-name-server 192.168.35.35, 192.168.35.36 ; + option domain-name "example.com"; + + # IP address of TFTP server + next-server 192.168.0.1 ; + + # path of boot loader obtained + # via tftp + filename "FreeBSD/install/boot/pxeboot" ; + + # pxeboot boot loader will try to NFS mount this directory for root FS + option root-path "192.168.0.1:/b/tftpboot/FreeBSD/install/" ; + +} + + + + + + + 配置 PXE 客户端与调试连接问题 + + + + 当客户端启动的时候, 进入 BIOS + 配置菜单。 设置 BIOS 从网络启动。 + 如果之前你所有的配置步骤都正确的话, 那么所有部分应该能 + "正常工作"。 + + + + 使用 net/wireshark + port 查看 DHCPTFTP + 的网络流量来调试各种问题。 + + + + 确保 pxeboot 能从 + TFTP 获取。 + 在你的 TFTP 服务器上检查 + /var/log/xferlog 日志确保 + pxeboot 被从正确的位置获取。 + 可以这样测试上面例子 dhcpd.conf + 中所设置的: + + &prompt.root; tftp 192.168.0.1 +tftp> get FreeBSD/install/boot/pxeboot +Received 264951 bytes in 0.1 seconds + + 请阅读 &man.tftpd.8; 和 &man.tftp.1;。 + 其中的 BUGS 列出了 + TFTP 的一些限制。 + + + + 确保根文件系统能够从 NFS 挂载。 + 可以这样测试上面例子 dhcpd.conf + 中所设置的: + + &prompt.root; mount -t nfs 192.168.0.1:/b/tftpboot/FreeBSD/install /mnt + + + + 阅读 src/sys/boot/i386/libi386/pxe.c + 中的代码以了解 pxeboot 加载器如何设置诸如 + boot.nfsroot.server 和 + boot.nfsroot.path 之类的变量。 + 这些变量被用在了 + src/sys/nfsclient/nfs_diskless.c + 的 NFS 无盘根挂载代码中。 + + + + Read &man.pxeboot.8; and &man.loader.8;. + + + +
ISDN