免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1992 | 回复: 2
打印 上一主题 下一主题

DHCP Server Configuration in Debian [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-09-11 18:08 |只看该作者 |倒序浏览
1,Installing DHCP server in Debian

#apt-get install dhcp3-server

Once you press enter installation will start it will ask you some questions just you need to click ok for all three times

Configuring DHCP server

The main Configuration file for DHCP server is /etc/dhcp3/dhcpd.conf

Before doing any changes take backup copy of this file and add the following lines

subnet 192.168.1.0 netmask 255.255.255.0 {

  option subnet-mask 255.255.255.0;
  option broadcast-address 192.168.1.255;

  option domain-name "globalrealsource.local";
  option domain-name-servers 192.168.1.20, 192.168.1.5;
  option routers 192.168.1.5;

  range 192.168.1.100 192.168.1.200;

  option ntp-servers 192.168.1.5;

  option netbios-scope "";
  option netbios-node-type 8;

  key "globalrealsource.local" {
        algorithm hmac-md5;
        secret
        "rruXyAiuAZnKPjDCyS4LBpp8WmOr7xPHulXuG9KAAVWcWc/yyzOG31MUJ4k6F2HzGaBLtwgQDW7LPhk+vC/0ug==";
  };

  zone globalrealsource.local {
        primary 192.168.1.20;
        key "globalrealsource.local";
  }

  zone 1.168.192.in-addr.arpa {
        primary 192.168.1.20;
        key "globalrealsource.local";
  }
}


2,If you want to configure static ipaddress for some machines follow this

host hostname {
hardware ethernet 00:B0:CF:8B:49:37;
fixed-address 192.168.1.100;
}


You need to restart the DHCP daemon to take effect of your new changes.

#/etc/init.d/dhcp3-server restart

If it restarts without any errors your configuration is correct. If you get any errors you need to check the log files for more error information

#tail /var/log/syslog

The following file give you the complete details about the DHCP clients connecting to the DHCP server this details includes the following

IP address of the client machine
MAC address of the client machine
Name of the client machine
Beginning and ending of ipaddress lease time


3,Client Machine Configuration

You need to modify the following file

# vi /etc/network/interfaces

You need to add the following lines and save the file.

auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

Now you need to restart the networking service to take these new changes

#/etc/init.d/networking restart

If you want to check your machine is configured properly you need to run the following command

#ifconfig

Finally you can check your log file(/var/log/messages) everything is properly configured or not.

论坛徽章:
0
2 [报告]
发表于 2007-09-11 19:30 |只看该作者
顶,我强烈的支持一下

论坛徽章:
0
3 [报告]
发表于 2007-10-19 09:47 |只看该作者
我也要强烈支持以下,好人
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP