# cat /etc/hosts # # Internet host table # 127.0.0.1 localhost 192.168.130.10 local2-peer loghost 192.168.130.11 local1-net 10.0.0.25 farISP
/etc/hosts 文件示例适用于虚构的 LocalCorp 中的本地路由器。请注意服务提供商的远程对等点 farISP 的 IP 地址和主机名。
在以下租用线路链路示例中,将创建文件 /etc/ppp/peers/farISP。
# cat /etc/ppp/peers/farISP init '/etc/ppp/conf_hsi' local /dev/hihp1 sync noauth 192.168.130.10:10.0.0.25 passive persist noccp nopcomp novj noaccomp
下表对 /etc/ppp/peers/farISP 中使用的各个选项和参数进行了说明。
|
# cat /etc/ppp/demand #!/bin/sh if [ -f /system/volatile/ppp-demand.pid ] && /usr/bin/kill -s 0 `/bin/cat /system/volatile/ppp-demand.pid` then : else /usr/bin/pppd call farISP fi
demand 脚本包含用于建立租用线路链路的 pppd 命令。下表对 $PPPDIR/demand 的内容进行了说明。
|
作为引导过程的一部分,Solaris PPP 4.0 启动脚本 /etc/rc2.d/S47pppd 会调用 demand 脚本。/etc/rc2.dS47pppd 中的以下行用于搜索是否存在名为 $PPPDIR/demand 的文件。
if [ -f $PPPDIR/demand ]; then . $PPPDIR/demand fi
如果找到该文件,则执行 $PPPDIR/demand。在执行 $PPPDIR/demand 过程中,将建立链路。
另请参见
如果您已按照本章中的所有过程进行操作,则至此已完成租用线路链路的配置。以下列出了相关的参考信息。
要查找故障排除信息,请参见修复租用线路问题。
要了解有关本章中使用的文件和选项的更多信息,请参见在文件中和命令行上使用 PPP 选项。