码迷,mamicode.com
首页 > 其他好文 > 详细

dhcp 配置

时间:2016-01-26 18:49:00      阅读:206      评论:0      收藏:0      [点我收藏+]

标签:dhcp配置

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 配置

标签:dhcp配置

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!