LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 838|回复: 0

dhcp 菜鸟配置成功

[复制链接]
发表于 2005-4-19 02:06:41 | 显示全部楼层 |阅读模式
前几天用iptables作了个共享感觉还不错.但是单位有30多台电脑一台台指定ip地址也麻烦,于是开始想作个dhcp,那想到几天没有成功,后来在论坛上看见一个兄弟的dhcp.conf,他说他的这个配置也不能启动.一时抓狂,把他的cp过来居然启动成功,狂喜,现在贴出来让菜鸟们也来cp,老鸟莫笑,
我的配置是:eth0:192.168.0.1接adsl eth1:192.168.0.2接hub.操作系统redhat 9

ddns-update-style interim;
ignore client-updates;
subnet 192.168.0.0 netmask 255.255.255.0 { #网段和掩码,这个括号千万要有
option routers 192.168.0.1; #默认路由如果没有请添加:route add -host 255.255.255.255 dev eth1
option subnet-mask 255.255.255.0; #这句用途我也不懂

# option nis-domain "domain.org";
option domain-name "domain.org"; #生搬硬套居然能用
option domain-name-servers 202.98.160.68; #我所在城市电信的dns.填上你的.可不能生搬硬套
option broadcast-address 192.168.0.255; #广播地址

# option time-offset -18000;
range 192.168.0.100 192.168.0.150; #分配的地址范围
default-lease-time 21600; #申请的时间
max-lease-time 43200;
} #这个括号千万要有,不然会报"semicolon expected"错误
哈哈到这里保存吧,启动看看
winxp下ipconfig /renew
Ethernet adapter 本地连接:



        Connection-specific DNS Suffix  . : domain.org

        Description . . . . . . . . . . . : Realtek RTL8139 Family PCI Fast Ethe

rnet NIC

        Physical Address. . . . . . . . . : 00-D0-F8-0B-D1-C9

        Dhcp Enabled. . . . . . . . . . . : Yes

        Autoconfiguration Enabled . . . . : Yes

        IP Address. . . . . . . . . . . . : 192.168.0.150

        Subnet Mask . . . . . . . . . . . : 255.255.255.0

        Default Gateway . . . . . . . . . : 192.168.0.1

        DHCP Server . . . . . . . . . . . : 192.168.0.2

        DNS Servers . . . . . . . . . . . : 202.98.160.68

        Lease Obtained. . . . . . . . . . : 2005年4月17日 17:16:48

        Lease Expires . . . . . . . . . . : 2005年4月17日 23:16:48
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表