输入 eth0 ,这是ADSL相连的网卡的名字。
当出现:
Enter the demand value (default no):
输入 no.
当出现:
Enter the DNS information here:
输入 "server" ,这表示使用ADSL拨号自动获得的DNS服务器IP地址。
当出现:
Please enter your PPPoE password:
输入ADSL帐号的密码。
当出现:
Choose a type of firewall (0-2):
输入 0 ,不使用防火墙。
当出现:
Accept these settings and adjust configuration files (y/n)?
如果输入的信息正确,输入 y ,完成配置,否则,输入 n 重新输入。
这样就完成了ADSL的配置,这时试着运行一下adsl-start,正确的话应该可以看到connected的信息,如果有问题试着看看/var/log/message的信息,然后重新进行配置。
运行adsl-start成功连接后,运行ifconfig -a看看网络设备信息,应该可以看到ppp0的信息,这就是ADSL建立的连接,应该可以看到电信分配的IP地址之类的信息。
此时,Michael尝试设置了其他的电脑的ip信息,比如设置了另外一台接在HUB上的笔记本的ip地址为192.168.0.128,网关设置为192.168.0.1,打开ie上网,呵呵,大功告成!
4、配置DHCP服务
为了让家里的网络环境更方便,于是开始在代理服务器上配置DHCP服务,下面是 DHCP的简单配置过程;从光盘或者网上找到dhcp-2.0pl5-8.i386.rpm和dhcpcd-1.3.22pl1-7.i386.rpm两个包,用rpm -hiv 安装。拷贝/usr/share/doc/dhcp-2.0pl5/dhcpd.conf.sample 文件到 /etc/dhcpd.conf 然后根据自己具体情况修改部分配置信息,下面是Michael的dhcpd.conf文件内容:
subnet 192.168.0.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option nis-domain "toplee.com";
option domain-name "toplee.com";
option domain-name-servers 202.106.196.115,202.106.196.152,202.96.199.133;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.0.128 192.168.0.255;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host ns {
next-server ns.toplee.com;
hardware ethernet 00:03:0F:F8:60:22;
fixed-address 192.168.0.1;
}
}
基本上你直接拷贝上面的内容就可以了。
然后运行/etc/init.d/dhcpd start 启动dhcp服务(另外可以在setup里面设置启动的时候自动运行dhcp服务)一切ok,设置内网其他的机器使用自动获取就ok了!你可以通过查看 /var/lib/dhcp/dhcpd.leases 文件查看客户机器租用ip的情况。
好了,有点晚了,Michael就写到这里,基本上都说清楚了,大家有什么问题或者发现Michael有些什么设置不够好的都可以告诉我!大家相互交流,共同进步!