首页 > 其他 > 详细

dhcp 配置

时间:2016-01-26 18:48:29      阅读:213      评论:0      收藏:0      [点我收藏+]

DHCP配置 

 

1,/etc/dhcpd.conf/etc/dhcp/dhcpd.conf

 

ddns-update-styleinterim;

ignoreclient-updates;

subnet 10.10.10.0netmask 255.255.255.0 {

# --- default gateway

        option routers                  10.10.10.1;

        option subnet-mask              255.255.255.0;

#       option netbios-node-type 2;

        option domain-name-servers 172.16.31.1;

        range dynamic-bootp 10.10.10.10010.10.10.110;

        default-lease-time 21600;

        max-lease-time 43200;

        # we want the nameserver to appear at afixed address

}

2,/etc/sysconfig/dhcpd

# Command lineoptions here

DHCPDARGS=eth1 #用于DHCP的网卡接口

user=root

group=root

3,iptables –t filter–F

  Iptables –t nat –F

4,iptables –t nat –L–n

iptables -t nat -IPOSTROUTING -s 10.10.10.0/24 -j SNAT --to 172.16.31.6

POSTROUTING链中做源地址转换

5,/etc/sysctl.conf

net.ipv4.ip_forward= 1

6,保存配置

/etc/rc.d/init.d/iptablessave

Iptables-save >iptables.bak

Iptables-restore<iptables.bak


dhcp 配置

原文:http://1317745.blog.51cto.com/1307745/1738601

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!